stellarium-web-engine icon indicating copy to clipboard operation
stellarium-web-engine copied to clipboard

Won't Compile? (linker setting ignored during compilation: 'MODULARIZE')

Open antgiant opened this issue 3 years ago • 4 comments

I have followed the instructions in the Readme to setup my enviornment but when I run make js I get

emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/inih/ini.o] Error 1
scons: *** [build/ext_src/erfa/erfa.o] Error 1
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/json/json-builder.o] Error 1
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/json/json.o] Error 1
scons: *** [build/ext_src/md4c/entity.o] Error 1
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/md4c/md4c-html.o] Error 1
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/nanovg/nanovg.o] Error 1
scons: *** [build/ext_src/md4c/md4c.o] Error 1
scons: building terminated because of errors.
make: *** [Makefile:6: js] Error 2

When I run make js-debug I get

emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
scons: *** [build/ext_src/erfa/erfa.o] Error 1
emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
scons: *** [build/ext_src/inih/ini.o] Error 1
scons: *** [build/ext_src/json/json-builder.o] Error 1
emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
scons: *** [build/ext_src/json/json.o] Error 1
emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
scons: *** [build/ext_src/md4c/entity.o] Error 1
scons: *** [build/ext_src/md4c/md4c-html.o] Error 1
emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
emcc: error: Invalid command line option -s ASM_JS=2: asm.js output is not supported any more
scons: *** [build/ext_src/nanovg/nanovg.o] Error 1
scons: *** [build/ext_src/md4c/md4c.o] Error 1
scons: building terminated because of errors.
make: *** [Makefile:10: js-debug] Error 2

antgiant avatar Jan 26 '22 22:01 antgiant

I have the same issue

Edit: @antgaint Refer https://github.com/Stellarium/stellarium-web-engine/issues/74

xXFracXx avatar Mar 01 '22 07:03 xXFracXx

@xXFracXx Thanksss. It's working

Commands I used (Ubuntu 20.04):

emsdk install 1.40.1
emsdk active 1.40.1
bash /home/<path_to_emsdk/emsdk_env.sh
make js

luk0y avatar Dec 08 '22 12:12 luk0y

I have the same errors.

@liudonghua123 ➜ /workspaces/stellarium-web-engine (master) $ make js
emscons scons -j8 mode=release
Traceback (most recent call last):
  File "/workspaces/stellarium-web-engine/emsdk/upstream/emscripten/emscons.py", line 21, in <module>
    sys.exit(subprocess.call(sys.argv[1:], env=env))
  File "/home/codespace/.python/current/lib/python3.10/subprocess.py", line 345, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/home/codespace/.python/current/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/codespace/.python/current/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'scons'
make: *** [Makefile:6: js] Error 1
@liudonghua123 ➜ /workspaces/stellarium-web-engine (master) $ emscons scons -j8 mode=release
Traceback (most recent call last):
  File "/workspaces/stellarium-web-engine/emsdk/upstream/emscripten/emscons.py", line 21, in <module>
    sys.exit(subprocess.call(sys.argv[1:], env=env))
  File "/home/codespace/.python/current/lib/python3.10/subprocess.py", line 345, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/home/codespace/.python/current/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/codespace/.python/current/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'scons'
@liudonghua123 ➜ /workspaces/stellarium-web-engine (master) $ pip install SCons
Collecting SCons
  Downloading SCons-4.6.0-py3-none-any.whl.metadata (9.0 kB)
Requirement already satisfied: setuptools in /usr/local/python/3.10.13/lib/python3.10/site-packages (from SCons) (68.2.2)
Downloading SCons-4.6.0-py3-none-any.whl (4.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 35.3 MB/s eta 0:00:00
Installing collected packages: SCons
Successfully installed SCons-4.6.0

[notice] A new release of pip is available: 23.3.1 -> 23.3.2
[notice] To update, run: python -m pip install --upgrade pip
@liudonghua123 ➜ /workspaces/stellarium-web-engine (master) $ make js
emscons scons -j8 mode=release
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/workspaces/stellarium-web-engine/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 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
/workspaces/stellarium-web-engine/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 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
/workspaces/stellarium-web-engine/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 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
/workspaces/stellarium-web-engine/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 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
/workspaces/stellarium-web-engine/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 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
/workspaces/stellarium-web-engine/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 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
/workspaces/stellarium-web-engine/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 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
/workspaces/stellarium-web-engine/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 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
shared:INFO: (Emscripten: Running sanity checks)
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/inih/ini.o] Error 1
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/md4c/md4c.o] Error 1
scons: *** [build/ext_src/erfa/erfa.o] Error 1
scons: *** [build/ext_src/md4c/md4c-html.o] Error 1
scons: *** [build/ext_src/md4c/entity.o] Error 1
scons: *** [build/ext_src/nanovg/nanovg.o] Error 1
scons: *** [build/ext_src/json/json-builder.o] Error 1
emcc: error: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] [-Werror]
scons: *** [build/ext_src/json/json.o] Error 1
scons: building terminated because of errors.
make: *** [Makefile:6: js] Error 2
@liudonghua123 ➜ /workspaces/stellarium-web-engine (master) $

liudonghua123 avatar Dec 26 '23 06:12 liudonghua123

same issue,

pip install scons

got me past the first error

now i'm getting the 'MODULARIZE` flag error

sebbean avatar May 15 '24 17:05 sebbean