Hi! I'm trying to build componentize-js
using the latest StarlingMonkey (current main
branch in the repo / our fork containing some initial attempts to fix fetch
) and found that the following update of SpiderMonkey: https://github.com/bytecodealliance/StarlingMonkey/pull/41 introduced a linker issue that I could not figure out yet. After doing some minor changes on the componentize-js side (following the rust toolchain update and the change of run_event_loop
, and updating to the latest StarlingMonkey version) seems like the build fails to link rust_encoding
crate with the jsrust
library (although I'm not sure I understand the issue properly):
wasm-ld: error: duplicate symbol: encoding_iso_2022_jp_ascii_valid_up_to
>>> defined in librust_encoding.a(rust_encoding-0b707846ea6b3289.rust_encoding.59ddf5d00e922ee8-cgu.0.rcgu.o)
>>> defined in /.../ComponentizeJS/StarlingMonkey/deps/cpm_cache/spidermonkey-release/0724b80a62196812717c8fbd9286c717d83c4113/spidermonkey-release/lib/libjsrust.a(jsrust-53a982b7a59e3f77.jsrust.86da07e83e4d91bd-cgu.0.rcgu.o)
wasm-ld: error: duplicate symbol: decoder_free
>>> defined in librust_encoding.a(rust_encoding-0b707846ea6b3289.rust_encoding.59ddf5d00e922ee8-cgu.0.rcgu.o)
>>> defined in /.../ComponentizeJS/StarlingMonkey/deps/cpm_cache/spidermonkey-release/0724b80a62196812717c8fbd9286c717d83c4113/spidermonkey-release/lib/libjsrust.a(jsrust-53a982b7a59e3f77.jsrust.86da07e83e4d91bd-cgu.0.rcgu.o)
....
Could you help me in what to try or where to look in order to try to fix this?
@Daniel Vigovszky that's because the rust toolchain version must match the one in StarlingMonkey here - https://github.com/bytecodealliance/StarlingMonkey/blob/main/rust-toolchain.toml. I'll see if I can get an update PR going as well.
turns out this is an upstream issue - https://github.com/bytecodealliance/StarlingMonkey/issues/50
This is how I tried to match the updated toolchain: https://github.com/golemcloud/ComponentizeJS/pull/1
but it leads to that linker error.
Last updated: Nov 26 2024 at 00:12 UTC