Skip to content

Link error regression on nightly #36155

Closed
@alexcrichton

Description

@alexcrichton

When running cargo test inside the futures-cpupool folder of rust-lang/futures-rs@093a638, I get an error looking like:

$ cargo +nightly test
   Compiling crossbeam v0.2.10
   Compiling libc v0.2.15
   Compiling log v0.3.6
   Compiling futures v0.1.0 (file:///home/alex/code/futures)
   Compiling num_cpus v1.0.0
   Compiling futures-cpupool v0.1.0 (file:///home/alex/code/futures/futures-cpupool)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/alex/code/futures/futures-cpupool/target/debug/smoke-d9fe7840395d70dc.0.o" "-o" "/home/alex/code/futures/futures-cpupool/target/debug/smoke-d9fe7840395d70dc" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/alex/code/futures/futures-cpupool/target/debug/deps" "-L" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-411f48d3.rlib" "/home/alex/code/futures/futures-cpupool/target/debug/deps/libfutures_cpupool.rlib" "/home/alex/code/futures/futures-cpupool/target/debug/deps/libnum_cpus-f32c6a9cbd8fad0a.rlib" "/home/alex/code/futures/futures-cpupool/target/debug/deps/libcrossbeam-2f53cae32cd2c9f1.rlib" "/home/alex/code/futures/futures-cpupool/target/debug/deps/libfutures.rlib" "/home/alex/code/futures/futures-cpupool/target/debug/deps/liblog-bf16bb9a4912b11d.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-411f48d3.rlib" "/home/alex/code/futures/futures-cpupool/target/debug/deps/liblibc-1bd8847afb79f283.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-411f48d3.rlib" "/home/alex/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-411f48d3.rlib" "-l" "util" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util" "-l" "compiler-rt"
  = note: /home/alex/code/futures/futures-cpupool/target/debug/smoke-d9fe7840395d70dc.0.o: In function `futures_cpupool::{{impl}}::spawn<futures::lazy::Lazy<closure, core::result::Result<(), ()>>>':
/home/alex/code/futures/futures-cpupool/src/lib.rs:165: undefined reference to `_$LT$futures..task..Spawn$LT$Box$LT$futures..Future$LT$Error$u3d$$LP$$RP$$C$$u20$Item$u3d$$LP$$RP$$GT$$u20$$u2b$$u20$Send$u20$$u2b$$u20$$u27$static$GT$$GT$$GT$::execute::he6071928c27d1a12'
/home/alex/code/futures/futures-cpupool/target/debug/smoke-d9fe7840395d70dc.0.o: In function `futures_cpupool::{{impl}}::spawn<Box<Future>>':
/home/alex/code/futures/futures-cpupool/src/lib.rs:165: undefined reference to `_$LT$futures..task..Spawn$LT$Box$LT$futures..Future$LT$Error$u3d$$LP$$RP$$C$$u20$Item$u3d$$LP$$RP$$GT$$u20$$u2b$$u20$Send$u20$$u2b$$u20$$u27$static$GT$$GT$$GT$::execute::he6071928c27d1a12'
collect2: error: ld returned 1 exit status
$ rustc +nightly -vV
rustc 1.13.0-nightly (77d2cd28f 2016-08-29)
binary: rustc
commit-hash: 77d2cd28fd715d2b9751de82b14d28ce6e376728
commit-date: 2016-08-29
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly

I haven't had a chance to minimize this yet unfortunately, but I figure that a bug report is better than no bug report.

Metadata

Metadata

Labels

A-linkageArea: linking into static, shared libraries and binariesP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions