Compiling to emscripten/wasm

About Monkey 2 Forums Monkey 2 Programming Help Compiling to emscripten/wasm

This topic contains 1 reply, has 2 voices, and was last updated by  Mark Sibly 1 year, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #7983



    I installed emscriptem, NodeJS and LLVM (Clang) latest 64-bit version, but I get this error when trying to compile:


    Mx2cc version 1.1.04

    ***** Building app 'C:/Monkey2-v1.1.04/bananas/audiotest/audiotest.monkey2' *****

    Build error: System command 'em++ -I"C:/Monkey2-v1.1.04/modules/" -I"C:/Monkey2-v1.1.04/modules/monkey/native" -I"C:/Monkey2-v1.1.04/bananas/audiotest/" -std=c++11 -s USE_SDL=2 -s TOTAL_MEMORY=67108864 -s DISABLE_EXCEPTION_CATCHING=1 -O2 -I"C:/Monkey2-v1.1.04/modules/freetype/freetype-2.6.3/include/" -I"C:/Monkey2-v1.1.04/modules/sdl2/SDL/include/" -c -o "C:/Monkey2-v1.1.04/bananas/audiotest/audiotest.buildv1.1.04/emscripten_debug/build/_1include_2_0r.cpp.o" "C:/Monkey2-v1.1.04/bananas/audiotest/audiotest.buildv1.1.04/emscripten_debug/include/_r.cpp"' failed.

    em++ -I"C:/Monkey2-v1.1.04/modules/" -I"C:/Monkey2-v1.1.04/modules/monkey/native" -I"C:/Monkey2-v1.1.04/bananas/audiotest/" -std=c++11 -s USE_SDL=2 -s TOTAL_MEMORY=67108864 -s DISABLE_EXCEPTION_CATCHING=1 -O2 -I"C:/Monkey2-v1.1.04/modules/freetype/freetype-2.6.3/include/" -I"C:/Monkey2-v1.1.04/modules/sdl2/SDL/include/" -c -o "C:/Monkey2-v1.1.04/bananas/audiotest/audiotest.buildv1.1.04/emscripten_debug/build/_1include_2_0r.cpp.o" "C:/Monkey2-v1.1.04/bananas/audiotest/audiotest.buildv1.1.04/emscripten_debug/include/_r.cpp"

    CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:


    (no targets could be identified: [Error 2] Systemet finner ikke angitt fil)


    CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see

    INFO:root:(Emscripten: Running sanity checks)

    CRITICAL:root:Cannot find c:\PROGRA~1\LLVM\bin\opt, check the paths in ~/.emscripten

    ***** Fatal mx2cc error *****

    Internal mx2cc build error[/code]


    Mark Sibly

    Yes, emscripten can be challenging to install!

    Things are getting better though – try the instructions here:

    (might want to cleanup/delete existing installation).

    This installs binaries for all platforms, and you shouldn’t need to install anything else like node or python (it installs them for you in private dirs).

    The important bit is this once you’ve ‘installed latest’:

    emsdk activate –global latest

    This adds emscripten dirs to your global paths/env vars.

    If you’re still having problems, you might want to ask here:!forum/emscripten-discuss

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

You must be logged in to reply to this topic.