Skip to content

link error: undefined symbol of the EM_JS in EMSDK 3.1.28 #18436

@xbcnn

Description

@xbcnn

I have an EM_JS function defined in individual file and it works just fine before. But recently I upgraded EMSDK to 3.1.28, I received linking error: undefined symbol of the EM_JS function.

I have opened EMCC_DEBUG=1, and got following errors.

profiler:DEBUG: block "JS symbol generation" took 0.391 seconds

wasm-ld: error: CMakeFiles/PRJ_dir/Unity/unity_5_cxx.cxx.o: undefined symbol: THE_EM_JS

I checked the __em_js_xxx symbols existing in another unity_12_cxx.cxx.o file. Why the Binaryen failed to handle it?
How can I debug the Binaryen processing or maybe logs?

cc @sbc100 , any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions