aerys / minko

3D framework for web, desktop and mobile devices.
http://minko.io
Other
905 stars 210 forks source link

install_emscripten.sh Not Working On Linux #166

Closed ghost closed 10 years ago

ghost commented 10 years ago

I'm using Xubuntu 14.04 64 bit.

When I run the install_emscripten.sh script it produces this:

Installing the Emscripten SDK to /usr/local/emsdk. Press any key to continue... 

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20.6M  100 20.6M    0     0  1325k      0  0:00:15  0:00:15 --:--:-- 1046k
Unsupported OS, cannot update!
Error: No tool or SDK found by name 'sdk-1.13.0-64bit'.

Looking into the python script "emsdk" inside the usr/local/emsdk directory lead me to the problem. The function here that reports the error:

def update_emsdk():
  if WINDOWS:
    download_and_unzip(urlparse.urljoin(emsdk_packages_url, 'emsdk_windows_upda$
    rmfile('zips/emsdk_windows_update.zip')
  elif OSX:
    download_and_unzip(urlparse.urljoin(emsdk_packages_url, 'emsdk_osx_update.t$
    rmfile('zips/emsdk_windows_update.tar.gz')
  else:
    print 'Unsupported OS, cannot update!'

It's supposed to have an "If" statement for Linux, but doesn't. The offical repo has this function in the same place:

def update_emsdk():
  if WINDOWS:
    download_and_unzip(urlparse.urljoin(emsdk_packages_url, 'emsdk_windows_update.zip'), emsdk_path(), download_even_if_exists=True)
    rmfile('zips/emsdk_windows_update.zip')
  elif OSX or LINUX:
    download_and_unzip(urlparse.urljoin(emsdk_packages_url, 'emsdk_unix_update.tar.gz'), emsdk_path(), download_even_if_exists=True)
    rmfile('zips/emsdk_unix_update.tar.gz')
  else:
    print 'Unsupported OS, cannot update!'

Official SDK Script on GitHub

I still haven't been able to get emscripten working on my linux install, will update if I can figure out a workaround (Simply adding "LINUX" to the if statement didn't work)

ghost commented 10 years ago

I managed to install Emscripten SDK 1.16.0 manually but minko projects still won't compile

Error:

==== Building minkoTest (html5_release) ====
Running pre-link commands
test -e /home/scott/Documents/minko/framework/asset && cp -R /home/scott/Documents/minko/framework/asset "bin/html5/release" || :
test -e asset && cp -R asset "bin/html5/release" || :
Linking minkoTest
/usr/local/emsdk/emscripten/1.16.0/em++ -o bin/html5/release/minkoTest.bc obj/html5/release/main.o -L../../Documents/minko/plugin/webgl/bin/html5/release -L../../Documents/minko/framework/bin/html5/release -L../../Documents/minko/plugin/sdl/bin/html5/release   -lminko-plugin-webgl -lminko-framework -lminko-plugin-sdl
Running post-build commands
/home/scott/Documents/minko//tool/lin/script/emcc.sh bin/html5/release/minkoTest.bc -o bin/html5/release/minkoTest.html -O2 --closure 1 -s CLOSURE_ANNOTATIONS=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s DISABLE_EXCEPTION_CATCHING=0 -s TOTAL_MEMORY=268435456 --preload-file bin/html5/release/asset || bash /home/scott/Documents/minko/tool/lin/script/fail.sh bin/html5/release/minkoTest.bc
/usr/local/emsdk/emscripten/1.16.0/emcc bin/html5/release/minkoTest.bc
error: unresolved symbol: _ZN5minko5input8JoystickC2ENSt3__110shared_ptrINS_14AbstractCanvasEEEi
error: unresolved symbol: _ZN5minko5input8KeyboardC2Ev
error: unresolved symbol: _ZN5minko6render12WebGLContextC1Ev
error: unresolved symbol: _ZN5minko5input5MouseC2ENSt3__110shared_ptrINS_14AbstractCanvasEEE
aborting from js compiler due to exception: Aborting compilation due to previous errors | undefined
Traceback (most recent call last):
  File "/usr/local/emsdk/emscripten/1.16.0/emscripten.py", line 1433, in <module>
    _main(environ=os.environ)
  File "/usr/local/emsdk/emscripten/1.16.0/emscripten.py", line 1421, in _main
    temp_files.run_and_clean(lambda: main(
  File "/usr/local/emsdk/emscripten/1.16.0/tools/tempfiles.py", line 39, in run_and_clean
    return func()
  File "/usr/local/emsdk/emscripten/1.16.0/emscripten.py", line 1429, in <lambda>
    DEBUG_CACHE=DEBUG_CACHE,
  File "/usr/local/emsdk/emscripten/1.16.0/emscripten.py", line 1316, in main
    jcache=jcache, temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE)
  File "/usr/local/emsdk/emscripten/1.16.0/emscripten.py", line 845, in emscript_fast
    assert '//FORWARDED_DATA:' in out, 'Did not receive forwarded data in pre output - process failed?'
AssertionError: Did not receive forwarded data in pre output - process failed?
Traceback (most recent call last):
  File "/usr/local/emsdk/emscripten/1.16.0/emcc", line 1575, in <module>
    final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
  File "/usr/local/emsdk/emscripten/1.16.0/tools/shared.py", line 1370, in emscripten
    assert os.path.exists(filename + '.o.js') and len(open(filename + '.o.js', 'r').read()) > 0, 'Emscripten failed to generate .js: ' + str(compiler_output)
AssertionError: Emscripten failed to generate .js: 
Post-build command failed for project bin/html5/release/minkoTest.bc
make[1]: *** [bin/html5/release/minkoTest.bc] Error 1
make: *** [minkoTest] Error 2
warrenseine commented 10 years ago

Hi,

Yes, the Emscripten SDK didn't support Linux until last week. Please upgrade to the latest SDK. The next beta of Minko will come with support for this new SDK out-of-the-box, but you can already use it.

Regards, Warren.

warrenseine commented 10 years ago

Ok, you did manage to run Emscripten.

1.16.0 should work flawlessly. Can you make sure you didn't compile a part of the SDK with 1.13.0 and the other one with 1.16.0? Cleaning the repository and rebuilding should do it.

ghost commented 10 years ago

Hello Warren, The 1.16.0 compile was done on a fresh install, there was no 1.13.0 installed beforehand.

Regardless, I cleaned and compiled again with the same result.

unicomp21 commented 10 years ago

Is the next beta getting close?

On Thu, Jul 17, 2014 at 4:28 AM, SimplyScotty notifications@github.com wrote:

Hello Warren, The 1.16.0 compile was done on a fresh install, there was no 1.13.0 installed beforehand.

Regardless, I cleaned and compiled again with the same result.

— Reply to this email directly or view it on GitHub https://github.com/aerys/minko/issues/166#issuecomment-49272436.

ghost commented 10 years ago

Yes, they said they'll have it released within "days": http://minko.io/forums/topic/android-support-timeframe/ http://minko.io/forums/topic/next-beta/

unicomp21 commented 10 years ago

great, thanks

On Thu, Jul 17, 2014 at 4:30 AM, SimplyScotty notifications@github.com wrote:

Yes, they said they'll have it released within "days": http://minko.io/forums/topic/android-support-timeframe/ http://minko.io/forums/topic/next-beta/

— Reply to this email directly or view it on GitHub https://github.com/aerys/minko/issues/166#issuecomment-49272715.

warrenseine commented 10 years ago

It's closer than ever :)

JMLX42 commented 10 years ago

It's actually available in the dev branch now.