New emscripten SDK

About Monkey 2 Forums Monkey 2 Development New emscripten SDK

This topic contains 8 replies, has 4 voices, and was last updated by  Mark Sibly 1 year, 2 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #13870

    Mark Sibly
    Keymaster

    Hi,

    I’ve put together a new ‘devtools’ based emscripten SDK and would like everyone to try it out if possible, especially if you’ve never had emscripten installed or going. This was inspired by an attempt made by Playniax that almost worked, but I think may have been foiled by the Window 10 Creator’s Update which seems to have broken quite a few things including the version of python built into the ‘official’ emscripten package.

    The experimental emscripten SDK is available from the download page here:

    Monkey 2 Files

    You’ll also need to update bin/env_windows.txt (this has already been updated in the develop branch at github) – here’s what the ’emscripten’ vars should look like:

    ‘***** EMSCRIPTEN TARGET *****

    ‘This is for the emsdk download available at http://monkeycoder.co.nz/monkey2-files/

    ‘If you have a different emscripten installation installed that you want to use, comment this lot out.

    EMSDK=${MX2_HOME}\devtools\emsdk-1.37.35_64bit
    EM_CONFIG=${EMSDK}\.emscripten
    BINARYEN_ROOT = ${EMSDK}\clang\e1.37.35_64bit\binaryen
    JAVA_HOME = ${EMSDK}\java\8.152_64bit
    EMSCRIPTEN = ${EMSDK}\emscripten\1.37.35

    PATH=${EMSDK};${PATH}
    PATH=${EMSDK}\clang\e1.37.35_64bit;${PATH}
    PATH=${EMSDK}\node\8.9.1_64bit\bin;${PATH}
    PATH=${EMSDK}\python\2.7.5.3_64bit;${PATH}
    PATH=${EMSDK}\java\8.152_64bit\bin;${PATH}
    PATH=${EMSDK}\emscripten\1.37.35;${PATH}

    ‘Add mserver_winnt emscripten mini-server/launcher.

    MX2_MSERVER=”${MX2_HOME}\devtools\mserver-v86c\mserver_winnt.exe”

    ‘Linker options
    MX2_LD_OPTS_EMSCRIPTEN=-s USE_SDL=2 -s TOTAL_MEMORY=536870912 -s DISABLE_EXCEPTION_CATCHING=1
    MX2_LD_OPTS_EMSCRIPTEN_WASM=-s BINARYEN=1
    MX2_LD_OPTS_EMSCRIPTEN_DEBUG=-O2 -s ASSERTIONS=2
    MX2_LD_OPTS_EMSCRIPTEN_RELEASE=-O3

    ‘C Compiler options
    MX2_CC_OPTS_EMSCRIPTEN=-std=gnu99 -s USE_SDL=2 -s TOTAL_MEMORY=536870912 -s DISABLE_EXCEPTION_CATCHING=1
    MX2_CC_OPTS_EMSCRIPTEN_DEBUG=-O2
    MX2_CC_OPTS_EMSCRIPTEN_RELEASE=-O3 -DNDEBUG

    ‘C++ Compiler options
    MX2_CPP_OPTS_EMSCRIPTEN=-std=c++11 -Wno-all -s USE_SDL=2 -s TOTAL_MEMORY=536870912 -s DISABLE_EXCEPTION_CATCHING=1
    MX2_CPP_OPTS_EMSCRIPTEN_DEBUG=-O2
    MX2_CPP_OPTS_EMSCRIPTEN_RELEASE=-O3 -DNDEBUG

    Note that ‘mserver’ is still a separate devtools package – if this worse reasonably well, I’ll probably combine the 2.

    You’ll have to rebuild modules after installing emscripten, and the first time you build something it may take a LONG time as it has to download and pre-build some libs like SDL2 and OpenAL.

    #13872

    Playniax
    Participant

    Will test this asap.

    Can you get me some more details why our first attempt broke your emscripten? It works on my Windows 10 machine and I would like to improve it.

    #13873

    Mark Sibly
    Keymaster

    Not 100% sure if it’s windows 10 update related but here’s the emscripten thread I started re: problems with your (well, the official!) installer:

    https://groups.google.com/forum/#!topic/emscripten-discuss/yNv7y1cFI20

    As far as I can tell, 2 out of 3 emscripten installs (windows, macos) are currently broken/uninstallable.

    Another guy is having the same python problem too:

    https://groups.google.com/forum/#!topic/emscripten-discuss/4BTW7rdyXdw

    This problem only occurs when emsdk install tries to download one particular file though, and since my SDK includes all files normally downloaded by emsdk install (I hope) it’s not an issue.

    I was also having problems with git lately that required installing some mysterious .NET security thing – man, hackers must love all this craptacular software! But I was thinking this may be related to the python problem, ie: windows 10 update is handling SSL slightly differently or something – dunno really, not my thing, really really wish I didn’t have to know anything about it!

    #13877

    abakobo
    Participant

    tried on a free from python/emscrptem W10 and had the following:

    Had to unpack the sdk in short named path because in my {desktop}/monkey2-w/devtools the path was too long (so went to C:\devtools). But I suppose you can’t do anything about that.

    When trying to build modules for emscriptem I had a W10 promp saying that python27.dll could not be found. I could not find the dll by searching on the disk myself. (there is pythoncom27.dll and pythoncomloader27.dll but python27.dll is there only in my GIMP and DropBox contents but those two files have diffrent size, so I don’t know wich one to copy!)

    Edit: I’ve installed WinPython-64bit-2.7.5.3 to try to have a correct python27.dll (it’s 2.7.5150.1013). Then I copied that python27.dll into devtools\emsdk-1.37.35_64bit\python\2.7.5.3_64bit. But then I have this error (on outup console this time).

    #13878

    Mark Sibly
    Keymaster

    python27.dll could not be found

    Ok, it appears this is ‘missing’ from the latest python installers. It doesn’t appear to be included in emscripten’s version of python either.

    It looks like python was only working on my machine because I had python27.dll in my windows/system32 dir. If I delete this file, I get the python27.dll not found error too, so it looks like python was only working at all thanks to an earlier installation.

    I’ve zipped and uploaded python27.dll here:

    http://monkeycoder.co.nz/get-file/?file=python27.zip

    Note you’ll have to copy and paste the link, for some reason WP can’t link to it properly.

    Unzip this into your monkey2 devtools\emsdk-1.37.35_64bit\python\2.7.5.3_64bit folder and try again – this fixes the python issue for me so here’s hoping…it could be good you found this!

    Have you ever installed python before? emscripten?

    #13881

    abakobo
    Participant

    ok it’s going farther with your python27.dll than with the one I got from winpython 2.7.5.3

    (now waiting, module building seems to be ok)

    have you ever installed python emscriptem

    never ever installed python or emscriptem but now have installed winpython 2.7.5.3 to cath a python27.dll. But it is not copying stuff into windows dirs I think. It’s a standalone package.
    I have LLVM in my PATH though

    #13882

    abakobo
    Participant

    I have bunnies jumping all around on my browser! (perf: 960 bunnies to get 60FPS)

    So the pack seems to work! (with python27.dll added)

    #13883

    rskgames
    Participant

    Used the New emscripten SDK (copied the python27.dll) and ran the mojo3d water example and it runs fine in wasm and asmjs targets.

    Previously I had emscripten SDK 1.37.1 and was able to use the asmjs target but never wasm.

    #13886

    Mark Sibly
    Keymaster

    Woohoo, will update the emsdk to include python27.dll and mserver.exe later today. Thanks for the help everyone, this is most promising…!

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.