Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbols: _emscripten_memset_bulkmem, _emscripten_memcpy_bulkmem from libc-debug.a #23005

Open
nbriggs opened this issue Nov 25, 2024 · 5 comments

Comments

@nbriggs
Copy link

nbriggs commented Nov 25, 2024

Please include the following in your bug report:

Version of emscripten/emsdk:

% emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.69-git
clang version 20.0.0git
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /usr/local/llvm-devel/bin
Build config: +assertions

 % pkg info emscripten
emscripten-3.1.69
Name           : emscripten
Version        : 3.1.69
Installed on   : Tue Oct 15 17:05:46 2024 PDT
Origin         : devel/emscripten
Architecture   : FreeBSD:14:*
Prefix         : /usr/local
Categories     : www devel
Licenses       : NCSA or MIT
Maintainer     : [email protected]
WWW            : https://emscripten.org/
Comment        : LLVM-to-Web Compiler
Annotations    :
	build_timestamp: 2024-10-13T01:07:52+0000
	built_by       : poudriere-git-3.4.2
	port_checkout_unclean: no
	port_git_hash  : 26c7a5679e
	ports_top_checkout_unclean: no
	ports_top_git_hash: f06faad6cb
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 34.8MiB

Failing command line in full:

emcc -std=gnu99 -fno-strict-aliasing ../emscripten.wasm-wasm/arithops.o  ../emscripten.wasm-wasm/arrayops.o  ../emscripten.wasm-wasm/bin.o  ../emscripten.wasm-wasm/binds.o  ../emscripten.wasm-wasm/bitblt.o  ../emscripten.wasm-wasm/bbtsub.o  ../emscripten.wasm-wasm/blt.o  ../emscripten.wasm-wasm/car-cdr.o  ../emscripten.wasm-wasm/chardev.o  ../emscripten.wasm-wasm/common.o  ../emscripten.wasm-wasm/conspage.o  ../emscripten.wasm-wasm/mkcell.o  ../emscripten.wasm-wasm/draw.o  ../emscripten.wasm-wasm/findkey.o  ../emscripten.wasm-wasm/fvar.o  ../emscripten.wasm-wasm/xc.o  ../emscripten.wasm-wasm/gc.o  ../emscripten.wasm-wasm/gc2.o  ../emscripten.wasm-wasm/gvar2.o  ../emscripten.wasm-wasm/hardrtn.o  ../emscripten.wasm-wasm/inet.o  ../emscripten.wasm-wasm/intcall.o  ../emscripten.wasm-wasm/lineblt8.o  ../emscripten.wasm-wasm/lsthandl.o  ../emscripten.wasm-wasm/llcolor.o  ../emscripten.wasm-wasm/llstk.o  ../emscripten.wasm-wasm/loopsops.o  ../emscripten.wasm-wasm/lowlev1.o  ../emscripten.wasm-wasm/lowlev2.o  ../emscripten.wasm-wasm/misc7.o  ../emscripten.wasm-wasm/mvs.o  ../emscripten.wasm-wasm/return.o  ../emscripten.wasm-wasm/rplcons.o  ../emscripten.wasm-wasm/shift.o  ../emscripten.wasm-wasm/subr.o  ../emscripten.wasm-wasm/sxhash.o  ../emscripten.wasm-wasm/miscn.o  ../emscripten.wasm-wasm/subr0374.o  ../emscripten.wasm-wasm/timer.o  ../emscripten.wasm-wasm/typeof.o  ../emscripten.wasm-wasm/unwind.o  ../emscripten.wasm-wasm/vars3.o  ../emscripten.wasm-wasm/unixcomm.o  ../emscripten.wasm-wasm/uraid.o  ../emscripten.wasm-wasm/rpc.o  ../emscripten.wasm-wasm/ufn.o  ../emscripten.wasm-wasm/z2.o  ../emscripten.wasm-wasm/eqf.o  ../emscripten.wasm-wasm/fp.o  ../emscripten.wasm-wasm/ubf1.o  ../emscripten.wasm-wasm/ubf2.o  ../emscripten.wasm-wasm/ubf3.o  ../emscripten.wasm-wasm/uutils.o  ../emscripten.wasm-wasm/perrno.o  ../emscripten.wasm-wasm/foreign.o  ../emscripten.wasm-wasm/lisp2c.o  ../emscripten.wasm-wasm/osmsg.o ../emscripten.wasm-wasm/dbgtool.o  ../emscripten.wasm-wasm/testtool.o  ../emscripten.wasm-wasm/kprint.o ../emscripten.wasm-wasm/byteswap.o ../emscripten.wasm-wasm/main.o  ../emscripten.wasm-wasm/initsout.o  ../emscripten.wasm-wasm/storage.o  ../emscripten.wasm-wasm/allocmds.o  ../emscripten.wasm-wasm/vmemsave.o  ../emscripten.wasm-wasm/mkatom.o  ../emscripten.wasm-wasm/ldsout.o  ../emscripten.wasm-wasm/dspsubrs.o  ../emscripten.wasm-wasm/initdsp.o  ../emscripten.wasm-wasm/dsk.o  ../emscripten.wasm-wasm/ufs.o  ../emscripten.wasm-wasm/dir.o  ../emscripten.wasm-wasm/keyevent.o  ../emscripten.wasm-wasm/kbdsubrs.o  ../emscripten.wasm-wasm/ether_common.o  ../emscripten.wasm-wasm/ether_sunos.o  ../emscripten.wasm-wasm/ether_nethub.o  ../emscripten.wasm-wasm/tty.o  ../emscripten.wasm-wasm/initkbd.o ../emscripten.wasm-wasm/gcscan.o  ../emscripten.wasm-wasm/gcarray.o  ../emscripten.wasm-wasm/gccode.o  ../emscripten.wasm-wasm/gcfinal.o  ../emscripten.wasm-wasm/gcrcell.o  ../emscripten.wasm-wasm/gchtfind.o  ../emscripten.wasm-wasm/gcmain3.o  ../emscripten.wasm-wasm/gcr.o  ../emscripten.wasm-wasm/gcoflow.o ../emscripten.wasm-wasm/sdl.o     ../emscripten.wasm-wasm/usrsubr.o ../emscripten.wasm-wasm/vdate.o -sUSE_SDL=2 -sASYNCIFY -sALLOW_MEMORY_GROWTH -sEXIT_RUNTIME=1  --preload-file ../../medley/loadups/full.sysout@medley/loadups/full.sysout  --preload-file ../../medley/loadups/whereis.hash@medley/loadups/whereis.hash  --preload-file ../../medley/greetfiles/MEDLEYDIR-INIT.LCOM@usr/local/lde/site-init.lisp  --preload-file ../../medley/docs/@medley/docs  --preload-file ../../medley/doctools/@medley/doctools  --preload-file ../../medley/greetfiles/@medley/greetfiles  --preload-file ../../medley/internal/@medley/internal  --preload-file ../../medley/sources/@medley/sources  --preload-file ../../medley/library/@medley/library  --preload-file ../../medley/lispusers/@medley/lispusers  --preload-file ../../medley/fonts/@medley/fonts -o ../emscripten.wasm/ldesdl.js
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libGL-getprocaddr.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libGL-getprocaddr.a" for subsequent builds)
system_libs:INFO: compiled 4 inputs in 22.76s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libal.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libal.a" for subsequent builds)
system_libs:INFO: compiled 1 inputs in 1.39s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libhtml5.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libhtml5.a" for subsequent builds)
system_libs:INFO: compiled 5 inputs in 4.91s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libstubs-debug.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libstubs-debug.a" for subsequent builds)
system_libs:INFO: compiled 2 inputs in 2.89s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libc-debug.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libc-debug.a" for subsequent builds)
system_libs:INFO: compiled 1037 inputs in 314.27s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libdlmalloc.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libdlmalloc.a" for subsequent builds)
system_libs:INFO: compiled 1 inputs in 3.71s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libcompiler_rt.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libcompiler_rt.a" for subsequent builds)
system_libs:INFO: compiled 162 inputs in 50.74s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libc++-noexcept.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libc++-noexcept.a" for subsequent builds)
system_libs:INFO: compiled 55 inputs in 455.95s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libc++abi-debug-noexcept.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libc++abi-debug-noexcept.a" for subsequent builds)
system_libs:INFO: compiled 16 inputs in 47.51s
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libsockets.a... (this will be cached in "/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libsockets.a" for subsequent builds)
system_libs:INFO: compiled 27 inputs in 10.23s
cache:INFO:  - ok
cache:INFO: generating system asset: symbol_lists/1cd7908af5b9a67566962efd850d7825fbcd1dec.json... (this will be cached in "/home/briggs/.emscripten_cache/symbol_lists/1cd7908af5b9a67566962efd850d7825fbcd1dec.json" for subsequent builds)
cache:INFO:  - ok
wasm-ld: error: /home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libc-debug.a(emscripten_memset.o): undefined symbol: _emscripten_memset_bulkmem
wasm-ld: error: /home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libc-debug.a(emscripten_memcpy.o): undefined symbol: _emscripten_memcpy_bulkmem
emcc: error: '/usr/local/bin/wasm-ld-devel -o ../emscripten.wasm/ldesdl.wasm -L/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten ../emscripten.wasm-wasm/arithops.o ../emscripten.wasm-wasm/arrayops.o ../emscripten.wasm-wasm/bin.o ../emscripten.wasm-wasm/binds.o ../emscripten.wasm-wasm/bitblt.o ../emscripten.wasm-wasm/bbtsub.o ../emscripten.wasm-wasm/blt.o ../emscripten.wasm-wasm/car-cdr.o ../emscripten.wasm-wasm/chardev.o ../emscripten.wasm-wasm/common.o ../emscripten.wasm-wasm/conspage.o ../emscripten.wasm-wasm/mkcell.o ../emscripten.wasm-wasm/draw.o ../emscripten.wasm-wasm/findkey.o ../emscripten.wasm-wasm/fvar.o ../emscripten.wasm-wasm/xc.o ../emscripten.wasm-wasm/gc.o ../emscripten.wasm-wasm/gc2.o ../emscripten.wasm-wasm/gvar2.o ../emscripten.wasm-wasm/hardrtn.o ../emscripten.wasm-wasm/inet.o ../emscripten.wasm-wasm/intcall.o ../emscripten.wasm-wasm/lineblt8.o ../emscripten.wasm-wasm/lsthandl.o ../emscripten.wasm-wasm/llcolor.o ../emscripten.wasm-wasm/llstk.o ../emscripten.wasm-wasm/loopsops.o ../emscripten.wasm-wasm/lowlev1.o ../emscripten.wasm-wasm/lowlev2.o ../emscripten.wasm-wasm/misc7.o ../emscripten.wasm-wasm/mvs.o ../emscripten.wasm-wasm/return.o ../emscripten.wasm-wasm/rplcons.o ../emscripten.wasm-wasm/shift.o ../emscripten.wasm-wasm/subr.o ../emscripten.wasm-wasm/sxhash.o ../emscripten.wasm-wasm/miscn.o ../emscripten.wasm-wasm/subr0374.o ../emscripten.wasm-wasm/timer.o ../emscripten.wasm-wasm/typeof.o ../emscripten.wasm-wasm/unwind.o ../emscripten.wasm-wasm/vars3.o ../emscripten.wasm-wasm/unixcomm.o ../emscripten.wasm-wasm/uraid.o ../emscripten.wasm-wasm/rpc.o ../emscripten.wasm-wasm/ufn.o ../emscripten.wasm-wasm/z2.o ../emscripten.wasm-wasm/eqf.o ../emscripten.wasm-wasm/fp.o ../emscripten.wasm-wasm/ubf1.o ../emscripten.wasm-wasm/ubf2.o ../emscripten.wasm-wasm/ubf3.o ../emscripten.wasm-wasm/uutils.o ../emscripten.wasm-wasm/perrno.o ../emscripten.wasm-wasm/foreign.o ../emscripten.wasm-wasm/lisp2c.o ../emscripten.wasm-wasm/osmsg.o ../emscripten.wasm-wasm/dbgtool.o ../emscripten.wasm-wasm/testtool.o ../emscripten.wasm-wasm/kprint.o ../emscripten.wasm-wasm/byteswap.o ../emscripten.wasm-wasm/main.o ../emscripten.wasm-wasm/initsout.o ../emscripten.wasm-wasm/storage.o ../emscripten.wasm-wasm/allocmds.o ../emscripten.wasm-wasm/vmemsave.o ../emscripten.wasm-wasm/mkatom.o ../emscripten.wasm-wasm/ldsout.o ../emscripten.wasm-wasm/dspsubrs.o ../emscripten.wasm-wasm/initdsp.o ../emscripten.wasm-wasm/dsk.o ../emscripten.wasm-wasm/ufs.o ../emscripten.wasm-wasm/dir.o ../emscripten.wasm-wasm/keyevent.o ../emscripten.wasm-wasm/kbdsubrs.o ../emscripten.wasm-wasm/ether_common.o ../emscripten.wasm-wasm/ether_sunos.o ../emscripten.wasm-wasm/ether_nethub.o ../emscripten.wasm-wasm/tty.o ../emscripten.wasm-wasm/initkbd.o ../emscripten.wasm-wasm/gcscan.o ../emscripten.wasm-wasm/gcarray.o ../emscripten.wasm-wasm/gccode.o ../emscripten.wasm-wasm/gcfinal.o ../emscripten.wasm-wasm/gcrcell.o ../emscripten.wasm-wasm/gchtfind.o ../emscripten.wasm-wasm/gcmain3.o ../emscripten.wasm-wasm/gcr.o ../emscripten.wasm-wasm/gcoflow.o ../emscripten.wasm-wasm/sdl.o ../emscripten.wasm-wasm/usrsubr.o ../emscripten.wasm-wasm/vdate.o /home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libSDL2.a -lGL-getprocaddr -lal -lhtml5 -lstubs-debug -lc-debug -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-debug-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpx6s6ds1tlibemscripten_js_symbols.so --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_get_base --export=emscripten_stack_get_current --export=emscripten_stack_init --export=_emscripten_stack_alloc --export=__get_temp_ret --export=__set_temp_ret --export=__funcs_on_exit --export=__wasm_call_ctors --export=_emscripten_stack_restore --export=strerror --export=malloc --export=free --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=main --export-if-defined=__main_argc_argv --export-if-defined=fflush --export-table -z stack-size=65536 --max-memory=2147483648 --initial-heap=16777216 --no-entry --stack-first --table-base=1' failed (returned 1)
*** Error code 1

Stop.

Full link command and output with -v appended:

briggs@flap maiko/bin % emcc -std=gnu99 -fno-strict-aliasing ../emscripten.wasm-wasm/arithops.o  ../emscripten.wasm-wasm/arrayops.o  ../emscripten.wasm-wasm/bin.o  ../emscripten.wasm-wasm/binds.o  ../emscripten.wasm-wasm/bitblt.o  ../emscripten.wasm-wasm/bbtsub.o  ../emscripten.wasm-wasm/blt.o  ../emscripten.wasm-wasm/car-cdr.o  ../emscripten.wasm-wasm/chardev.o  ../emscripten.wasm-wasm/common.o  ../emscripten.wasm-wasm/conspage.o  ../emscripten.wasm-wasm/mkcell.o  ../emscripten.wasm-wasm/draw.o  ../emscripten.wasm-wasm/findkey.o  ../emscripten.wasm-wasm/fvar.o  ../emscripten.wasm-wasm/xc.o  ../emscripten.wasm-wasm/gc.o  ../emscripten.wasm-wasm/gc2.o  ../emscripten.wasm-wasm/gvar2.o  ../emscripten.wasm-wasm/hardrtn.o  ../emscripten.wasm-wasm/inet.o  ../emscripten.wasm-wasm/intcall.o  ../emscripten.wasm-wasm/lineblt8.o  ../emscripten.wasm-wasm/lsthandl.o  ../emscripten.wasm-wasm/llcolor.o  ../emscripten.wasm-wasm/llstk.o  ../emscripten.wasm-wasm/loopsops.o  ../emscripten.wasm-wasm/lowlev1.o  ../emscripten.wasm-wasm/lowlev2.o  ../emscripten.wasm-wasm/misc7.o  ../emscripten.wasm-wasm/mvs.o  ../emscripten.wasm-wasm/return.o  ../emscripten.wasm-wasm/rplcons.o  ../emscripten.wasm-wasm/shift.o  ../emscripten.wasm-wasm/subr.o  ../emscripten.wasm-wasm/sxhash.o  ../emscripten.wasm-wasm/miscn.o  ../emscripten.wasm-wasm/subr0374.o  ../emscripten.wasm-wasm/timer.o  ../emscripten.wasm-wasm/typeof.o  ../emscripten.wasm-wasm/unwind.o  ../emscripten.wasm-wasm/vars3.o  ../emscripten.wasm-wasm/unixcomm.o  ../emscripten.wasm-wasm/uraid.o  ../emscripten.wasm-wasm/rpc.o  ../emscripten.wasm-wasm/ufn.o  ../emscripten.wasm-wasm/z2.o  ../emscripten.wasm-wasm/eqf.o  ../emscripten.wasm-wasm/fp.o  ../emscripten.wasm-wasm/ubf1.o  ../emscripten.wasm-wasm/ubf2.o  ../emscripten.wasm-wasm/ubf3.o  ../emscripten.wasm-wasm/uutils.o  ../emscripten.wasm-wasm/perrno.o  ../emscripten.wasm-wasm/foreign.o  ../emscripten.wasm-wasm/lisp2c.o  ../emscripten.wasm-wasm/osmsg.o ../emscripten.wasm-wasm/dbgtool.o  ../emscripten.wasm-wasm/testtool.o  ../emscripten.wasm-wasm/kprint.o ../emscripten.wasm-wasm/byteswap.o ../emscripten.wasm-wasm/main.o  ../emscripten.wasm-wasm/initsout.o  ../emscripten.wasm-wasm/storage.o  ../emscripten.wasm-wasm/allocmds.o  ../emscripten.wasm-wasm/vmemsave.o  ../emscripten.wasm-wasm/mkatom.o  ../emscripten.wasm-wasm/ldsout.o  ../emscripten.wasm-wasm/dspsubrs.o  ../emscripten.wasm-wasm/initdsp.o  ../emscripten.wasm-wasm/dsk.o  ../emscripten.wasm-wasm/ufs.o  ../emscripten.wasm-wasm/dir.o  ../emscripten.wasm-wasm/keyevent.o  ../emscripten.wasm-wasm/kbdsubrs.o  ../emscripten.wasm-wasm/ether_common.o  ../emscripten.wasm-wasm/ether_sunos.o  ../emscripten.wasm-wasm/ether_nethub.o  ../emscripten.wasm-wasm/tty.o  ../emscripten.wasm-wasm/initkbd.o ../emscripten.wasm-wasm/gcscan.o  ../emscripten.wasm-wasm/gcarray.o  ../emscripten.wasm-wasm/gccode.o  ../emscripten.wasm-wasm/gcfinal.o  ../emscripten.wasm-wasm/gcrcell.o  ../emscripten.wasm-wasm/gchtfind.o  ../emscripten.wasm-wasm/gcmain3.o  ../emscripten.wasm-wasm/gcr.o  ../emscripten.wasm-wasm/gcoflow.o ../emscripten.wasm-wasm/sdl.o     ../emscripten.wasm-wasm/usrsubr.o ../emscripten.wasm-wasm/vdate.o -sUSE_SDL=2 -sASYNCIFY -sALLOW_MEMORY_GROWTH -sEXIT_RUNTIME=1  --preload-file ../../medley/loadups/full.sysout@medley/loadups/full.sysout  --preload-file ../../medley/loadups/whereis.hash@medley/loadups/whereis.hash  --preload-file ../../medley/greetfiles/MEDLEYDIR-INIT.LCOM@usr/local/lde/site-init.lisp  --preload-file ../../medley/docs/@medley/docs  --preload-file ../../medley/doctools/@medley/doctools  --preload-file ../../medley/greetfiles/@medley/greetfiles  --preload-file ../../medley/internal/@medley/internal  --preload-file ../../medley/sources/@medley/sources  --preload-file ../../medley/library/@medley/library  --preload-file ../../medley/lispusers/@medley/lispusers  --preload-file ../../medley/fonts/@medley/fonts -o ../emscripten.wasm/ldesdl.js -v

 /usr/local/bin/clang-devel --version
 /usr/local/lib/emscripten/tools/file_packager ../emscripten.wasm/ldesdl.data --from-emcc --preload ../../medley/loadups/full.sysout@medley/loadups/full.sysout ../../medley/loadups/whereis.hash@medley/loadups/whereis.hash ../../medley/greetfiles/MEDLEYDIR-INIT.LCOM@usr/local/lde/site-init.lisp ../../medley/docs/@medley/docs ../../medley/doctools/@medley/doctools ../../medley/greetfiles/@medley/greetfiles ../../medley/internal/@medley/internal ../../medley/sources/@medley/sources ../../medley/library/@medley/library ../../medley/lispusers/@medley/lispusers ../../medley/fonts/@medley/fonts
 /usr/local/bin/wasm-ld-devel -o ../emscripten.wasm/ldesdl.wasm -L/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten ../emscripten.wasm-wasm/arithops.o ../emscripten.wasm-wasm/arrayops.o ../emscripten.wasm-wasm/bin.o ../emscripten.wasm-wasm/binds.o ../emscripten.wasm-wasm/bitblt.o ../emscripten.wasm-wasm/bbtsub.o ../emscripten.wasm-wasm/blt.o ../emscripten.wasm-wasm/car-cdr.o ../emscripten.wasm-wasm/chardev.o ../emscripten.wasm-wasm/common.o ../emscripten.wasm-wasm/conspage.o ../emscripten.wasm-wasm/mkcell.o ../emscripten.wasm-wasm/draw.o ../emscripten.wasm-wasm/findkey.o ../emscripten.wasm-wasm/fvar.o ../emscripten.wasm-wasm/xc.o ../emscripten.wasm-wasm/gc.o ../emscripten.wasm-wasm/gc2.o ../emscripten.wasm-wasm/gvar2.o ../emscripten.wasm-wasm/hardrtn.o ../emscripten.wasm-wasm/inet.o ../emscripten.wasm-wasm/intcall.o ../emscripten.wasm-wasm/lineblt8.o ../emscripten.wasm-wasm/lsthandl.o ../emscripten.wasm-wasm/llcolor.o ../emscripten.wasm-wasm/llstk.o ../emscripten.wasm-wasm/loopsops.o ../emscripten.wasm-wasm/lowlev1.o ../emscripten.wasm-wasm/lowlev2.o ../emscripten.wasm-wasm/misc7.o ../emscripten.wasm-wasm/mvs.o ../emscripten.wasm-wasm/return.o ../emscripten.wasm-wasm/rplcons.o ../emscripten.wasm-wasm/shift.o ../emscripten.wasm-wasm/subr.o ../emscripten.wasm-wasm/sxhash.o ../emscripten.wasm-wasm/miscn.o ../emscripten.wasm-wasm/subr0374.o ../emscripten.wasm-wasm/timer.o ../emscripten.wasm-wasm/typeof.o ../emscripten.wasm-wasm/unwind.o ../emscripten.wasm-wasm/vars3.o ../emscripten.wasm-wasm/unixcomm.o ../emscripten.wasm-wasm/uraid.o ../emscripten.wasm-wasm/rpc.o ../emscripten.wasm-wasm/ufn.o ../emscripten.wasm-wasm/z2.o ../emscripten.wasm-wasm/eqf.o ../emscripten.wasm-wasm/fp.o ../emscripten.wasm-wasm/ubf1.o ../emscripten.wasm-wasm/ubf2.o ../emscripten.wasm-wasm/ubf3.o ../emscripten.wasm-wasm/uutils.o ../emscripten.wasm-wasm/perrno.o ../emscripten.wasm-wasm/foreign.o ../emscripten.wasm-wasm/lisp2c.o ../emscripten.wasm-wasm/osmsg.o ../emscripten.wasm-wasm/dbgtool.o ../emscripten.wasm-wasm/testtool.o ../emscripten.wasm-wasm/kprint.o ../emscripten.wasm-wasm/byteswap.o ../emscripten.wasm-wasm/main.o ../emscripten.wasm-wasm/initsout.o ../emscripten.wasm-wasm/storage.o ../emscripten.wasm-wasm/allocmds.o ../emscripten.wasm-wasm/vmemsave.o ../emscripten.wasm-wasm/mkatom.o ../emscripten.wasm-wasm/ldsout.o ../emscripten.wasm-wasm/dspsubrs.o ../emscripten.wasm-wasm/initdsp.o ../emscripten.wasm-wasm/dsk.o ../emscripten.wasm-wasm/ufs.o ../emscripten.wasm-wasm/dir.o ../emscripten.wasm-wasm/keyevent.o ../emscripten.wasm-wasm/kbdsubrs.o ../emscripten.wasm-wasm/ether_common.o ../emscripten.wasm-wasm/ether_sunos.o ../emscripten.wasm-wasm/ether_nethub.o ../emscripten.wasm-wasm/tty.o ../emscripten.wasm-wasm/initkbd.o ../emscripten.wasm-wasm/gcscan.o ../emscripten.wasm-wasm/gcarray.o ../emscripten.wasm-wasm/gccode.o ../emscripten.wasm-wasm/gcfinal.o ../emscripten.wasm-wasm/gcrcell.o ../emscripten.wasm-wasm/gchtfind.o ../emscripten.wasm-wasm/gcmain3.o ../emscripten.wasm-wasm/gcr.o ../emscripten.wasm-wasm/gcoflow.o ../emscripten.wasm-wasm/sdl.o ../emscripten.wasm-wasm/usrsubr.o ../emscripten.wasm-wasm/vdate.o /home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libSDL2.a -lGL-getprocaddr -lal -lhtml5 -lstubs-debug -lc-debug -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-debug-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpij15my2jlibemscripten_js_symbols.so --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_get_base --export=emscripten_stack_get_current --export=emscripten_stack_init --export=_emscripten_stack_alloc --export=__get_temp_ret --export=__set_temp_ret --export=__funcs_on_exit --export=__wasm_call_ctors --export=_emscripten_stack_restore --export=strerror --export=malloc --export=free --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=main --export-if-defined=__main_argc_argv --export-if-defined=fflush --export-table -z stack-size=65536 --max-memory=2147483648 --initial-heap=16777216 --no-entry --stack-first --table-base=1
wasm-ld: error: /home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libc-debug.a(emscripten_memset.o): undefined symbol: _emscripten_memset_bulkmem
wasm-ld: error: /home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libc-debug.a(emscripten_memcpy.o): undefined symbol: _emscripten_memcpy_bulkmem
emcc: error: '/usr/local/bin/wasm-ld-devel -o ../emscripten.wasm/ldesdl.wasm -L/home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten ../emscripten.wasm-wasm/arithops.o ../emscripten.wasm-wasm/arrayops.o ../emscripten.wasm-wasm/bin.o ../emscripten.wasm-wasm/binds.o ../emscripten.wasm-wasm/bitblt.o ../emscripten.wasm-wasm/bbtsub.o ../emscripten.wasm-wasm/blt.o ../emscripten.wasm-wasm/car-cdr.o ../emscripten.wasm-wasm/chardev.o ../emscripten.wasm-wasm/common.o ../emscripten.wasm-wasm/conspage.o ../emscripten.wasm-wasm/mkcell.o ../emscripten.wasm-wasm/draw.o ../emscripten.wasm-wasm/findkey.o ../emscripten.wasm-wasm/fvar.o ../emscripten.wasm-wasm/xc.o ../emscripten.wasm-wasm/gc.o ../emscripten.wasm-wasm/gc2.o ../emscripten.wasm-wasm/gvar2.o ../emscripten.wasm-wasm/hardrtn.o ../emscripten.wasm-wasm/inet.o ../emscripten.wasm-wasm/intcall.o ../emscripten.wasm-wasm/lineblt8.o ../emscripten.wasm-wasm/lsthandl.o ../emscripten.wasm-wasm/llcolor.o ../emscripten.wasm-wasm/llstk.o ../emscripten.wasm-wasm/loopsops.o ../emscripten.wasm-wasm/lowlev1.o ../emscripten.wasm-wasm/lowlev2.o ../emscripten.wasm-wasm/misc7.o ../emscripten.wasm-wasm/mvs.o ../emscripten.wasm-wasm/return.o ../emscripten.wasm-wasm/rplcons.o ../emscripten.wasm-wasm/shift.o ../emscripten.wasm-wasm/subr.o ../emscripten.wasm-wasm/sxhash.o ../emscripten.wasm-wasm/miscn.o ../emscripten.wasm-wasm/subr0374.o ../emscripten.wasm-wasm/timer.o ../emscripten.wasm-wasm/typeof.o ../emscripten.wasm-wasm/unwind.o ../emscripten.wasm-wasm/vars3.o ../emscripten.wasm-wasm/unixcomm.o ../emscripten.wasm-wasm/uraid.o ../emscripten.wasm-wasm/rpc.o ../emscripten.wasm-wasm/ufn.o ../emscripten.wasm-wasm/z2.o ../emscripten.wasm-wasm/eqf.o ../emscripten.wasm-wasm/fp.o ../emscripten.wasm-wasm/ubf1.o ../emscripten.wasm-wasm/ubf2.o ../emscripten.wasm-wasm/ubf3.o ../emscripten.wasm-wasm/uutils.o ../emscripten.wasm-wasm/perrno.o ../emscripten.wasm-wasm/foreign.o ../emscripten.wasm-wasm/lisp2c.o ../emscripten.wasm-wasm/osmsg.o ../emscripten.wasm-wasm/dbgtool.o ../emscripten.wasm-wasm/testtool.o ../emscripten.wasm-wasm/kprint.o ../emscripten.wasm-wasm/byteswap.o ../emscripten.wasm-wasm/main.o ../emscripten.wasm-wasm/initsout.o ../emscripten.wasm-wasm/storage.o ../emscripten.wasm-wasm/allocmds.o ../emscripten.wasm-wasm/vmemsave.o ../emscripten.wasm-wasm/mkatom.o ../emscripten.wasm-wasm/ldsout.o ../emscripten.wasm-wasm/dspsubrs.o ../emscripten.wasm-wasm/initdsp.o ../emscripten.wasm-wasm/dsk.o ../emscripten.wasm-wasm/ufs.o ../emscripten.wasm-wasm/dir.o ../emscripten.wasm-wasm/keyevent.o ../emscripten.wasm-wasm/kbdsubrs.o ../emscripten.wasm-wasm/ether_common.o ../emscripten.wasm-wasm/ether_sunos.o ../emscripten.wasm-wasm/ether_nethub.o ../emscripten.wasm-wasm/tty.o ../emscripten.wasm-wasm/initkbd.o ../emscripten.wasm-wasm/gcscan.o ../emscripten.wasm-wasm/gcarray.o ../emscripten.wasm-wasm/gccode.o ../emscripten.wasm-wasm/gcfinal.o ../emscripten.wasm-wasm/gcrcell.o ../emscripten.wasm-wasm/gchtfind.o ../emscripten.wasm-wasm/gcmain3.o ../emscripten.wasm-wasm/gcr.o ../emscripten.wasm-wasm/gcoflow.o ../emscripten.wasm-wasm/sdl.o ../emscripten.wasm-wasm/usrsubr.o ../emscripten.wasm-wasm/vdate.o /home/briggs/.emscripten_cache/sysroot/lib/wasm32-emscripten/libSDL2.a -lGL-getprocaddr -lal -lhtml5 -lstubs-debug -lc-debug -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-debug-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpij15my2jlibemscripten_js_symbols.so --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_get_base --export=emscripten_stack_get_current --export=emscripten_stack_init --export=_emscripten_stack_alloc --export=__get_temp_ret --export=__set_temp_ret --export=__funcs_on_exit --export=__wasm_call_ctors --export=_emscripten_stack_restore --export=strerror --export=malloc --export=free --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=main --export-if-defined=__main_argc_argv --export-if-defined=fflush --export-table -z stack-size=65536 --max-memory=2147483648 --initial-heap=16777216 --no-entry --stack-first --table-base=1' failed (returned 1)
@kripken
Copy link
Member

kripken commented Nov 25, 2024

Does this still happen on later versions than 3.1.69? Several related changes have landed since, like #22966

@nbriggs
Copy link
Author

nbriggs commented Nov 25, 2024

@kripken 3.1.69 is the latest pre-packaged version available on FreeBSD 14.1, but I'll go and get the emsdk repo and see if I can update. This was code that used to work, but since then the LLVM and emscripten packages got updated.

@nbriggs
Copy link
Author

nbriggs commented Nov 25, 2024

@kripken It looks as though I'll be waiting until someone else builds a more recent version of Emscripten in the FreeBSD ports repository - building the whole 32-bit system is not practical on the machine I have available.

@sbc100
Copy link
Collaborator

sbc100 commented Nov 25, 2024

I think the problem here is that you are trying to use emscripten 3.1.69 with a version of llvm more recent that the one its was configured for.

A recent change to llvm enabled bulk memory by default but emscripten didn't have code to support that change until #22751 which didn't land until 3.1.71.

So you can fix by either downgrading to a slightly older version of llvm or upgrading emscripten to 3.1.71 or above.

@nbriggs
Copy link
Author

nbriggs commented Nov 25, 2024

The prepackaged FreeBSD llvm-devel (the only llvm/clang package with clang-devel rather than plain clang) is only available at 20.0 (llvm-devel-20.0.d20241114), and I can't build an older llvm from source with the resources available to me.

I've asked the FreeBSD emscripten package maintainer if they can update to emscripten 3.1.73 (current?) which should solve the problem, I hope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants