This might not be very helpful, but I haven't seen this type of error on Windows yet. I have spent some time a few months ago to make my build system work on Windows for emscripten.
I have seen similarly strange errors in the past (mostly on OSX) when running a parallel build after a new emscripten SDK install or SDK update, where the emscripten C runtime libs are compiled in the background, which happens after compiling and before asm.js code generation for executable targets. If several of those ran in parallel I saw all types of strange error messages and half-finished builds, but this is only for the first build after an SDK update. This is different from your error though, since you are building sequentially and only a single executable. The only other problem I ran into under Windows: I was hitting the 8192 character command line length limit with long linker command lines, the only way around that was to use linker-response-files (https://gcc.gnu.org/wiki/Response_Files), which I only got working via cmake when targeting GNU Make, not Ninja as build tool, but it was not trivial to find a GNU Make tool which actually *works* on Windows in the normal command line environment (outside of Cygwin). In the past I was simply running emscripten builds in a Linux VM, which was much easier to setup (and much faster!) then running the compilation on Windows (in Win10, the new Linux subsystem also might be an option). But once I got all Windows build issues resolved (which were actually build tool issues), it works quite well (but much slower than Linux or OSX, but that seems to be because clang is slower on Windows). Cheers, -Floh. Am Samstag, 10. Juni 2017 20:43:41 UTC+2 schrieb Michel Rouzic: > > I'm new to emscripten and I'm experiencing some extraordinary > inconsistencies with emcc when trying to build hello_world.c. Here's an > example, the commands are ran in quick succession with no outside changes: > > C:\Program Files\Emscripten\emscripten\1.37.1>emcc tests/hello_world.c > > C:\Program Files\Emscripten\emscripten\1.37.1>node a.out.js > > C:\Program Files\Emscripten\emscripten\1.37.1>emcc tests/hello_world.c > > C:\Program Files\Emscripten\emscripten\1.37.1>node a.out.js > > C:\Program Files\Emscripten\emscripten\1.37.1>emcc tests/hello_world.c > > C:\Program Files\Emscripten\emscripten\1.37.1>node a.out.js > hello, world! > > so most of the time it doesn't seem to compile properly but sometimes it > does? And without me changing anything, just trying again? > > while other times I just get this: > C:\Program Files\Emscripten\emscripten\1.37.1>emcc tests/hello_world.c > Traceback (most recent call last): > File "C:\Program Files\Emscripten\emscripten\1.37.1\\emcc", line 13, in > <module> > emcc.run() > File "C:\Program Files\Emscripten\emscripten\1.37.1\emcc.py", line 1635, > in run > final = shared.Building.emscripten(final, append_ext=False, > extra_args=extra_args) > File "C:\Program Files\Emscripten\emscripten\1.37.1\tools\shared.py", > line 1745, in emscripten > call_emscripten(cmdline) > File "C:\Program Files\Emscripten\emscripten\1.37.1\emscripten.py", line > 1783, in _main > temp_files.run_and_clean(lambda: main( > File "C:\Program Files\Emscripten\emscripten\1.37.1\tools\tempfiles.py", > line 78, in run_and_clean > return func() > File "C:\Program Files\Emscripten\emscripten\1.37.1\emscripten.py", line > 1788, in <lambda> > DEBUG=DEBUG, > File "C:\Program Files\Emscripten\emscripten\1.37.1\emscripten.py", line > 1689, in main > temp_files=temp_files, DEBUG=DEBUG) > File "C:\Program Files\Emscripten\emscripten\1.37.1\emscripten.py", line > 93, in emscript > glue, forwarded_data = compiler_glue(metadata, settings, libraries, > compiler_engine, temp_files, DEBUG) > File "C:\Program Files\Emscripten\emscripten\1.37.1\emscripten.py", line > 293, in compiler_glue > cwd=path_from_root('src'), error_limit=300) > File "C:\Program Files\Emscripten\emscripten\1.37.1\tools\jsrun.py", > line 122, in run_js > raise Exception('Expected the command ' + str(command) + ' to finish > with return code ' + str(assert_returncode) + ', but it returned with code > ' + str(proc > .returncode) + ' instead! Output: ' + str(ret)[:error_limit]) > Exception: Expected the command ['C:/Program > Files/Emscripten/node/4.1.1_64bit/bin/node.exe', 'C:\\Program > Files\\Emscripten\\emscripten\\1.37.1\\src\\compiler. > js', 'c:\\users\\user\\appdata\\local\\temp\\tmpqrxkb5.txt', 'C:\\Program > Files\\Emscripten\\emscripten\\1.37.1\\src\\library_pthread_stub.js'] to > finish with r > eturn code 0, but it returned with code 1 instead! Output: // The Module > object: Our interface to the outside world. We import > // and export values on it, and do the work to get that through > // closure compiler if necessary. There are various ways Module can be > used: > // 1. Not defined. We create it here > // 2. A function parameter, function(Module) { ..gener > > WTF? I'm running it on Windows 7, it's a fresh install and this is what I > get when I run emcc -v: > C:\Program Files\Emscripten\emscripten\1.37.1>emcc -v > emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) > 1.37.1 > clang version 3.9.0 (emscripten 1.37.1 : 1.37.1) > Target: x86_64-pc-windows-msvc > Thread model: posix > InstalledDir: C:\Program Files\Emscripten\clang\e1.37.1_64bit > INFO:root:Checking JS engine ['C:/Program > Files/Emscripten/node/4.1.1_64bit/bin/node.exe'] failed. Check your config > file. Details: Expected the command ['C:/Pr > ogram Files/Emscripten/node/4.1.1_64bit/bin/node.exe', 'C:\\Program > Files\\Emscripten\\emscripten\\1.37.1\\src\\hello_world.js'] to finish with > return code 0, b > ut it returned with code 1 instead! Output: > INFO:root:(Emscripten: Running sanity checks) > CRITICAL:root:The JavaScript shell used for compiling (['C:/Program > Files/Emscripten/node/4.1.1_64bit/bin/node.exe']) does not seem to work, > check the paths in > C:\Users\user\.emscripten > > > The last line looks a bit worrying... I have no idea what's wrong, help. > Thank you! > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
