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

Potential dependency regression in 3.1.38 when using emscripten_set_main_loop() #19363

Closed
floooh opened this issue May 15, 2023 · 5 comments
Closed

Comments

@floooh
Copy link
Collaborator

floooh commented May 15, 2023

I just stumbled over this error when trying to build some of my older samples which use emscripten_set_main_loop() with emsdk 3.1.38 (AFAIK this is a regression from 3.1.37 to 3.1.38):

error: undefined symbol: $preloadPlugins (referenced by $Browser__deps: ['$setMainLoop','$callUserCallback','$safeSetTimeout','$warnOnce','emscripten_set_main_loop_timing','$preloadPlugins','$Browser'], referenced by emscripten_set_main_loop_timing__deps: ['$Browser'], referenced by $setMainLoop__deps: ['emscripten_set_main_loop_timing','emscripten_get_now','$Browser'], referenced by emscripten_set_main_loop__deps: ['$setMainLoop','$Browser','$getWasmTableEntry'], referenced by top-level compiled C/C++ code)

Looks like $preloadPlugin needs to be added somewhere in the dependencies for emscripten_set_main_loop?

My newer samples use emscripten_request_animation_frame() which doesn't have this problem.

Meanwhile I rewrote those older samples to use emscripten_request_animation_frame() so it's not a blocker for me, but I thought I should still at least write a ticket :)

(cc @sbc100)

@sbc100
Copy link
Collaborator

sbc100 commented May 15, 2023

See #19361 and #19362

@sbc100
Copy link
Collaborator

sbc100 commented May 15, 2023

Wait, I guess this isn't quite the same issue.. but similar.

@sbc100
Copy link
Collaborator

sbc100 commented May 15, 2023

Do you have the link flags used in the failing example? it seems that the filesystem must not be included. I'm curious if you are explictly opting out using -sFILESYSTEM=0?

@floooh
Copy link
Collaborator Author

floooh commented May 16, 2023

I'm curious if you are explictly opting out using -sFILESYSTEM=0?

Ah yes, that's correct (rather: -sNO_FILESYSTEM=1. Here's an example command line:

emcc -s DISABLE_EXCEPTION_CATCHING=1 -fstrict-aliasing -Wall -Wextra -Wno-multichar -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-warn-absolute-paths -Wno-expansion-to-defined -Wno-missing-field-initializers -Wsign-conversion -O0 -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1 -s DISABLE_EXCEPTION_CATCHING=1  -s STACK_SIZE=512KB -s INITIAL_MEMORY=33554432 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -s USE_WEBGL2=1 -s "MALLOC='emmalloc'" -s NO_FILESYSTEM=1 -s WASM=1  --shell-file /Users/floh/projects/sokol-samples/webpage/shell.html -O0 -g html5/CMakeFiles/offscreen-emsc.dir/offscreen-emsc.c.obj -o /Users/floh/projects/fips-deploy/sokol-samples/webgl2-wasm-ninja-debug/offscreen-emsc.html

@sbc100
Copy link
Collaborator

sbc100 commented May 16, 2023

Fixed in #19362

@sbc100 sbc100 closed this as completed May 16, 2023
ocornut added a commit to ocornut/imgui that referenced this issue Jul 13, 2023
Change for #6602 broke, supposedly because using old version of emsdk.
Initial reason for locking 3.1.37 was 3.1.38 had a bug, now fixed emscripten-core/emscripten#19363
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

2 participants