Skip to content

IDBFS no longer working between version 6.0.12 and 6.0.13 #28072

Open

Description

@daid

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)

var Module = {
        preRun: [function() {
            addRunDependency('syncfs')
            FS.mkdir('/preferences')
            FS.mount(IDBFS, {}, '/preferences');
            FS.syncfs(true, function (err) { removeRunDependency('syncfs'); })
        }],

I've tried various things with flags and html templates, but only downgrading to 6.0.12 seems to instantly fix this issue.

Activity

  1. sbc100 commented on Oct 26, 2026

    @sbc100
    Collaborator

    Ah, I think this is due to #27940.

    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?

    CC @kripken

  2. daid commented on Oct 26, 2026

    @daid
    Author

    Adding -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=IDBFS causes:

    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)

  3. added 2 commits that reference this issue on Nov 18, 2026
    487fbe7
    b80d487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions