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, 12 months ago.
- 
		AuthorPosts
 - 
		
			
				
April 21, 2017 at 10:06 am #7983
Hi!
I installed emscriptem, NodeJS and LLVM (Clang) latest 64-bit version, but I get this error when trying to compile:
[code]
Mx2cc version 1.1.04
***** Building app 'C:/Monkey2-v1.1.04/bananas/audiotest/audiotest.monkey2' *****
Parsing...
Semanting...
Translating...
Compiling...
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 http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
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]
April 22, 2017 at 2:16 am #7988Yes, emscripten can be challenging to install!
Things are getting better though – try the instructions here:
https://github.com/juj/emsdk/blob/master/README.md
(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:
https://groups.google.com/forum/#!forum/emscripten-discuss
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.