Stellarium / stellarium-web-engine

JavaScript planetarium engine
425 stars 88 forks source link

Problem building stellarium web engine #74

Closed anzgar01 closed 3 years ago

anzgar01 commented 3 years ago

Hello, I am having trouble compiling the web engine using "make js". I am using a fresh install of Ubuntu 18.04 with emsdk and scons installed, but still get errors.

adminuser@ubuntu:~/stellarium-web-engine$ make js emscons scons -j8 mode=release scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/erfa/erfa.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/erfa/erfa.c /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/inih/ini.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/inih/ini.c /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/json/json-builder.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/json/json-builder.c /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/json/json.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/json/json.c /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/md4c/entity.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/md4c/entity.c /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/md4c/md4c-html.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/md4c/md4c-html.c /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/md4c/md4c.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/md4c/md4c.c /home/adminuser/emsdk/upstream/emscripten/tools/scons/site_scons/site_tools/emscripten/../../../../../emcc -o build/ext_src/nanovg/nanovg.o -c -Wall -std=gnu11 -Wno-unknown-pragmas -D_GNU_SOURCE -Wno-missing-braces -DHAVE_UNISTD_H -DMD4C_USE_UTF8 -Werror -DNDEBUG -include config.h -Wno-initializer-overrides -DNO_LIBCURL -DNO_ARGP "-DGLES2 1" -s MODULARIZE=1 -s EXPORT_NAME=StelWebEngine -s ALLOW_MEMORY_GROWTH=1 -s ALLOW_TABLE_GROWTH=1 --pre-js src/js/pre.js --pre-js src/js/obj.js --pre-js src/js/geojson.js --pre-js src/js/canvas.js -s STRICT=1 -s RESERVED_FUNCTION_POINTERS=10 -O3 -s USE_WEBGL2=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=[]" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','GL','UTF8ToString','_free','_malloc','addFunction','allocate','ccall','cwrap','getValue','intArrayFromString','lengthBytesUTF8','removeFunction','setValue','stringToUTF8','writeAsciiToMemory','writeArrayToMemory']" -s FILESYSTEM=0 -Isrc -Iext_src/erfa -Iext_src/json -Iext_src/uthash -Iext_src/stb -Iext_src/zlib -Iext_src/inih -Iext_src/nanovg -Iext_src/md4c -Iext_src/webp -Iext_src/webp/src ext_src/nanovg/nanovg.c emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS emcc: error: legacy setting used in strict mode: RESERVED_FUNCTION_POINTERS scons: [build/ext_src/nanovg/nanovg.o] Error 1 scons: [build/ext_src/json/json-builder.o] Error 1 scons: [build/ext_src/md4c/md4c-html.o] Error 1 scons: [build/ext_src/json/json.o] Error 1 scons: [build/ext_src/erfa/erfa.o] Error 1 scons: [build/ext_src/md4c/entity.o] Error 1 scons: [build/ext_src/md4c/md4c.o] Error 1 scons: [build/ext_src/inih/ini.o] Error 1 scons: building terminated because of errors. Makefile:6: recipe for target 'js' failed make: *** [js] Error 2

Can anyone please point me in the right direction, as I can't see why this is failing.

Thanks a lot

anzgar01 commented 3 years ago

Ok I think I found the issue: Using the latest emsdk gave those errors. Downgrading to emsdk 1.40.1 seems to have solved the issues and it is now compiling. :-)

xalioth commented 3 years ago

ok!

GildedHonour commented 1 year ago

@anzgar01 how did you downgrade to 1.40.1? By what command?

anzgar01 commented 1 year ago

Sorry @GildedHonour I can't recall how I did it. Did you try Google?

wykhuh commented 1 year ago

@GildedHonour Downgrade to 1.40.1 instructions are in this post https://github.com/Stellarium/stellarium-web-engine/issues/140#issuecomment-1342624501