This repository was archived by the owner on Jan 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
This repository was archived by the owner on Jan 2, 2025. It is now read-only.
cargo test gives linker errors #80
Copy link
Copy link
Closed
Description
For example:
---- engine::actor::Actor_0 stdout ----
error: linking with `cc` failed: exit code: 1
note: cc '-Wl,--as-needed' '-m64' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-o' '/tmp/rustdoctest.r1BGY18VAAb0/rust-out' '/tmp/rustdoctest.r1BGY18VAAb0/rust_out.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-Wl,--gc-sections' '-pie' '-nodefaultlibs' '/home/jonny/code/rslike/target/librslike-33665a348a9c0d5a.rlib' '/home/jonny/code/rslike/target/deps/libtcod-835af025147faddf.rlib' '/home/jonny/code/rslike/target/deps/libtcod-sys-8caba187ba4adc8b.rlib' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lstd-4e7c5e5c' '-L' '/home/jonny/code/rslike/target' '-L' '/home/jonny/code/rslike/target/deps' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-L' '/home/jonny/code/rslike/.rust/lib/x86_64-unknown-linux-gnu' '-L' '/home/jonny/code/rslike/lib/x86_64-unknown-linux-gnu' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-ltcod' '-ltcod' '-ltcod' '-ldl' '-lpthread' '-lrt' '-lgcc_s' '-lpthread' '-lc' '-lm' '-lcompiler-rt'
note: /usr/bin/ld: cannot find -ltcod
/usr/bin/ld: cannot find -ltcod
/usr/bin/ld: cannot find -ltcod
collect2: error: ld returned 1 exit status
error: aborting due to previous error
thread 'engine::actor::Actor_0' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:144
For some reason, it's passing the flag -ltcod
to the linker three times. This doesn't happen when building, only when testing.
Metadata
Metadata
Assignees
Labels
No labels