I can compile C++ to .so , but cannot compile it to wasm

28 views
Skip to first unread message

hannong cheng

unread,
May 23, 2023, 10:12:05 PM5/23/23
to emscripten-discuss
emcc: error: '/home/chn/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN --sysroot=/home/chn/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -std=c++11 -v ikfastec66_emcc.cpp -c -o /tmp/emscripten_temp_9h7smuih/ikfastec66_emcc_0.o' failed (received SIGKILL (-9))

Sam Clegg

unread,
May 23, 2023, 11:02:07 PM5/23/23
to emscripte...@googlegroups.com
It looks like the compiler process was killed via SIGKILL.  Any idea why that might be?   This can happen if some external process kills the compiler or, if think, if the kernel runs out of memory.   Is the source file you are compiling particularly large? 

cheers,
sam

On Tue, May 23, 2023 at 7:12 PM hannong cheng <hannon...@gmail.com> wrote:
emcc: error: '/home/chn/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN --sysroot=/home/chn/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -std=c++11 -v ikfastec66_emcc.cpp -c -o /tmp/emscripten_temp_9h7smuih/ikfastec66_emcc_0.o' failed (received SIGKILL (-9))

--
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 emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/2c2502d6-8ef4-415a-a5ef-4a0e9b4f5554n%40googlegroups.com.

hannong cheng

unread,
May 26, 2023, 6:19:03 PM5/26/23
to emscripten-discuss
-->Is the source file you are compiling particularly large? 
thanks, Yes, it is about 3.3MB.  and about 110,000 lines, mainly produced by another tool. and it only computes and output the results without any display function

Sam Clegg

unread,
May 26, 2023, 8:36:30 PM5/26/23
to emscripte...@googlegroups.com
On Fri, May 26, 2023 at 3:19 PM hannong cheng <hannon...@gmail.com> wrote:
-->Is the source file you are compiling particularly large? 
thanks, Yes, it is about 3.3MB.  and about 110,000 lines, mainly produced by another tool. and it only computes and output the results without any display function

It sounds like you could just be running out of memory on the build machine.     Can you split up the large file?


在2023年5月24日星期三 UTC+8 11:02:07<s...@google.com> 写道:
It looks like the compiler process was killed via SIGKILL.  Any idea why that might be?   This can happen if some external process kills the compiler or, if think, if the kernel runs out of memory.   Is the source file you are compiling particularly large? 

cheers,
sam

On Tue, May 23, 2023 at 7:12 PM hannong cheng <hannon...@gmail.com> wrote:
emcc: error: '/home/chn/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN --sysroot=/home/chn/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -std=c++11 -v ikfastec66_emcc.cpp -c -o /tmp/emscripten_temp_9h7smuih/ikfastec66_emcc_0.o' failed (received SIGKILL (-9))

--
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 emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/2c2502d6-8ef4-415a-a5ef-4a0e9b4f5554n%40googlegroups.com.

--
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 emscripten-disc...@googlegroups.com.

hannong cheng

unread,
May 27, 2023, 5:54:27 PM5/27/23
to emscripten-discuss
thanks, you are right, that's the memory problem, the cpp file is complex because it was produced by machine. so I changed memory from 16GB to 32GB then this problem is gone so far, many thanks
Reply all
Reply to author
Forward
0 new messages