Skip to content

Wasm compilation error "Fatal: GOT.func entry with no import/export" when running wasm-emscripten-finalize #8995

Closed
@rahulchaphalkar

Description

@rahulchaphalkar

I'm trying to compile the skia's Canvaskit to wasm using emscripten 1.38.38 and LLVM upstream backend. Initially, i faced several linker errors from wasm-ld, but which could be resolved for now by manually using llvm-ranlib to index the different .a archives. (Errors looked like wasm-ld: error: out/canvaskit_wasm_debug/libskottie.a: archive has no index; run ranlib to add one)
However, now I'm facing an error

wasm-ld: warning: function signature mismatch: _ZN9SkFontMgr10RefDefaultEv
>>> defined as (i32) -> void in out/canvaskit_wasm_debug/libskottie.a(libskottie.TextLayer.o)
>>> defined as (i32) -> void in out/canvaskit_wasm_debug/libskia.a(libskia.SkFontMgr.o)
 "/home/rahulchaphalkar/wasm/emsdk/emsdk/upstream/bin/wasm-emscripten-finalize" /tmp/emscripten_temp_HKAsH4/canvaskit.wasm -o /tmp/emscripten_temp_HKAsH4/canvaskit.wasm.o.wasm --detect-features -g --input-source-map=/tmp/emscripten_temp_HKAsH4/canvaskit.wasm.map --output-source-map=/tmp/emscripten_temp_HKAsH4/canvaskit.wasm.o.wasm.map --output-source-map-url=/node_modules/canvaskit/bin/canvaskit.wasm.map --global-base=1024 --initial-stack-pointer=5243904
Fatal: GOT.func entry with no import/export: $emscripten_longjmp_jmpbuf
shared:ERROR: '/home/rahulchaphalkar/wasm/emsdk/emsdk/upstream/bin/wasm-emscripten-finalize /tmp/emscripten_temp_HKAsH4/canvaskit.wasm -o /tmp/emscripten_temp_HKAsH4/canvaskit.wasm.o.wasm --detect-features -g --input-source-map=/tmp/emscripten_temp_HKAsH4/canvaskit.wasm.map --output-source-map=/tmp/emscripten_temp_HKAsH4/canvaskit.wasm.o.wasm.map --output-source-map-url=/node_modules/canvaskit/bin/canvaskit.wasm.map --global-base=1024 --initial-stack-pointer=5243904' failed (1)

With the fatal error coming from wasm-emscripten-finalize. I wondered if this is because of #8905 , as this hasn't been updated in latest-upstream, only in incoming branch.
Any help would be appreciated.

Metadata

Metadata

Assignees

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