You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDBFS no longer working between version 6.0.12 and 6.0.13 #28072
When upgraded from emscripten 6.0.12 to 6.0.13, I can no longer use IDBFS in my javascript preRun function.
My cmake scripts adds -lidbfs.js to the linker flags, and I can see it being passed to em++ in a verbose build. /home/daid/personal/SeriousProton2/cmake/toolchains/emsdk/upstream/emscripten/em++ -s USE_SDL=2 -fno-exceptions -Wno-c++17-extensions -O3 -DNDEBUG -O3 -ffast-math -fno-exceptions -s ALLOW_MEMORY_GROWTH=1 -lidbfs.js --preload-file /home/daid/personal/TheTributeOfLegends/resources@resources [[huge list of object files]] -o output.js extlibs/libbox2d.a extlibs/libbullet.a extlibs/liblua.a extlibs/libminiz.a extlibs/libsp2freetype.a
But my javascript code no longer can find IDBFS (IDBFS is not defined)
After this change IDBFS need to be explicitly included somehow. You can do -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=IDBFS .. or you can do -sEXPORTED_RUNTIME_METHODS=IDBFS (if you also want it avialable externally).
I would expect the above code to show a more useful error message in debug builds. Can you confirm if you see something like 'IDBFS' is a library symbol and not included by default ... in debug builds?
error: undefined symbol: IDBFS (referenced by root reference (e.g. compiled C/C++ code))
warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
warning: _IDBFS may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
But -ssEXPORTED_RUNTIME_METHODS=IDBFS does seem to work.
No warning in debug builds however (without these extra settings)
Activity
sbc100 commentedon Oct 26, 2026
Ah, I think this is due to #27940.
After this change
IDBFSneed to be explicitly included somehow. You can do-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=IDBFS.. or you can do-sEXPORTED_RUNTIME_METHODS=IDBFS(if you also want it avialable externally).I would expect the above code to show a more useful error message in debug builds. Can you confirm if you see something like
'IDBFS' is a library symbol and not included by default ...in debug builds?CC @kripken
daid commentedon Oct 26, 2026
Adding
-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=IDBFScauses:But
-ssEXPORTED_RUNTIME_METHODS=IDBFSdoes seem to work.No warning in debug builds however (without these extra settings)
[FS] Export optional JS filesystem backends when linked in
[FS] Export optional JS filesystem backends when linked in