skorpi-and-friends opened issue #3006:
It's known dynamically linking dependencies in large Rust projects can improve compile times to a considerable degree. Facing the following problem when attempting to setup such a workspace:
wasmtime_dylink_issue on ๎ main [?] is ๐ฆ v0.1.0 via ๐ฆ v1.54.0-nightly took 7s โฏ cargo r .... <loads of compiled crates>... Compiling deps v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue/crates/deps) Compiling dylink v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue/crates/dylink) Compiling wasmtime_dylink_issue v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue) 17:40:12 Compiling wasmtime_dylink_issue v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue) error: linking with `cc` failed: exit status: 1 | = note: "cc" "-m64" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-Wl,--as-needed" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea.176re6pgxyy8ex5.rcgu.o" ......<loads of object files>...... "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea.yqhnz0r7qoxxab5.rcgu.o" "-o" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/psm-04165501c77b945c/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/zstd-sys-0f0a0a67e9ce9bc7/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/wasmtime-fiber-8ff9cbc1eca6d35f/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/wasmtime-runtime-2bce6ad7a15d697a/out" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps" "-ldylink" "-Wl,--start-group" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-c6dddd3d354e6bea" "-Wl,--end-group" "-Wl,-Bstatic" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8b33f9cbbc9652fe.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" = note: /bin/ld: /home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue223c9046feaa7cea.3nou4ari0sahe2y2.rcgu.o: in function `wasmtime_runtime::traphandlers::catch_traps::{{closure}}': /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.28.0/src/traphandlers.rs:180: undefined reference to `RegisterSetjmp' collect2: error: ld returned 1 exit status error: aborting due to previous error; 1 warning emitted error: could not compile `wasmtime_dylink_issue` To learn more, run the command again with --verbose.
Similar issue when using the llvm linker.
Not exactly a traditional bug, I know, but would really appreciate any recs for getting past this.
skorpi-and-friends edited issue #3006:
It's known dynamically linking dependencies in large Rust projects can improve compile times to a considerable degree. Facing the following problem when attempting to setup such a workspace:
wasmtime_dylink_issue on ๎ main [?] is ๐ฆ v0.1.0 via ๐ฆ v1.54.0-nightly took 7s โฏ cargo r .... <loads of compiled crates>... Compiling deps v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue/crates/deps) Compiling dylink v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue/crates/dylink) Compiling wasmtime_dylink_issue v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue) error: linking with `cc` failed: exit status: 1 | = note: "cc" "-m64" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-Wl,--as-needed" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea.176re6pgxyy8ex5.rcgu.o" ......<loads of object files>...... "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea.yqhnz0r7qoxxab5.rcgu.o" "-o" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/psm-04165501c77b945c/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/zstd-sys-0f0a0a67e9ce9bc7/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/wasmtime-fiber-8ff9cbc1eca6d35f/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/wasmtime-runtime-2bce6ad7a15d697a/out" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps" "-ldylink" "-Wl,--start-group" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-c6dddd3d354e6bea" "-Wl,--end-group" "-Wl,-Bstatic" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8b33f9cbbc9652fe.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" = note: /bin/ld: /home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue223c9046feaa7cea.3nou4ari0sahe2y2.rcgu.o: in function `wasmtime_runtime::traphandlers::catch_traps::{{closure}}': /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.28.0/src/traphandlers.rs:180: undefined reference to `RegisterSetjmp' collect2: error: ld returned 1 exit status error: aborting due to previous error; 1 warning emitted error: could not compile `wasmtime_dylink_issue` To learn more, run the command again with --verbose.
Similar issue when using the llvm linker.
Not exactly a traditional bug, I know, but would really appreciate any recs for getting past this.
bjorn3 commented on issue #3006:
RegisterSetJmp
is written in C: https://github.com/bytecodealliance/wasmtime/blob/7a1b7cdf92a644a256a9f4c5c002682e1900d817/crates/runtime/src/helpers.c#L17 Maybe the visibility is set to hidden (-fvisibility=hidden
), causing it to not be exported from dynamic libraries?
alexcrichton commented on issue #3006:
Thanks for the report! This should be fixed in https://github.com/bytecodealliance/wasmtime/pull/3010.
cfallin closed issue #3006:
It's known dynamically linking dependencies in large Rust projects can improve compile times to a considerable degree. Facing the following problem when attempting to setup such a workspace:
wasmtime_dylink_issue on ๎ main [?] is ๐ฆ v0.1.0 via ๐ฆ v1.54.0-nightly took 7s โฏ cargo r .... <loads of compiled crates>... Compiling deps v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue/crates/deps) Compiling dylink v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue/crates/dylink) Compiling wasmtime_dylink_issue v0.1.0 (/home/user/Source/rust/wasmtime_dylink_issue) error: linking with `cc` failed: exit status: 1 | = note: "cc" "-m64" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-Wl,--as-needed" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea.176re6pgxyy8ex5.rcgu.o" ......<loads of object files>...... "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea.yqhnz0r7qoxxab5.rcgu.o" "-o" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue-223c9046feaa7cea" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/psm-04165501c77b945c/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/zstd-sys-0f0a0a67e9ce9bc7/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/wasmtime-fiber-8ff9cbc1eca6d35f/out" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/build/wasmtime-runtime-2bce6ad7a15d697a/out" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps" "-ldylink" "-Wl,--start-group" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-c6dddd3d354e6bea" "-Wl,--end-group" "-Wl,-Bstatic" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8b33f9cbbc9652fe.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" = note: /bin/ld: /home/user/Source/rust/wasmtime_dylink_issue/target/debug/deps/wasmtime_dylink_issue223c9046feaa7cea.3nou4ari0sahe2y2.rcgu.o: in function `wasmtime_runtime::traphandlers::catch_traps::{{closure}}': /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.28.0/src/traphandlers.rs:180: undefined reference to `RegisterSetjmp' collect2: error: ld returned 1 exit status error: aborting due to previous error; 1 warning emitted error: could not compile `wasmtime_dylink_issue` To learn more, run the command again with --verbose.
Similar issue when using the llvm linker.
Not exactly a traditional bug, I know, but would really appreciate any recs for getting past this.
Last updated: Dec 23 2024 at 12:05 UTC