Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link error building Rust on Linux #10778

Closed
kmcallister opened this issue Dec 2, 2013 · 6 comments
Closed

Link error building Rust on Linux #10778

kmcallister opened this issue Dec 2, 2013 · 6 comments

Comments

@kmcallister
Copy link
Contributor

I get this error building Rust 61443dc (master as of Dec 1) on Debian:

$ rm -fr x86_64-unknown-linux-gnu/
$ ./configure
…
$ make -j10
…
cp: x86_64-unknown-linux-gnu/stage2/lib/librustc.so
compile_and_link: x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustpkg.so
compile_and_link: x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustdoc.so
error: linking with `cc` failed: exit code: 1
note: cc arguments: '-m64' '-L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib' '-o' 'x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc' 'x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc.o' '-Wl,--as-needed' '-Wl,-O1' '-L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib' '-lstd-6425b930ca146ae9-0.9-pre' '-L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib' '-lrustuv-a13edc95d75df17-0.9-pre' '-L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib' '-lextra-aaa96aab146eb38e-0.9-pre' '-L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib' '-lsyntax-2bb2d559d93ae8f0-0.9-pre' '-L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib' '-lrustc-8581899a03b03e-0.9-pre' '-Lx86_64-unknown-linux-gnu/rt/libuv' '-Lx86_64-unknown-linux-gnu/rt/uv_support' '-L/home/keegan/proj/rust/rust/.rust' '-L/home/keegan/proj/rust/rust' '-lmorestack' '-Wl,-rpath,$ORIGIN/../lib' '-Wl,-rpath,/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib' '-Wl,-rpath,/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib'
note: /home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'ceil'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'log10'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'pow'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'floor'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'fmod'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'trunc'
collect2: error: ld returned 1 exit status

error: aborting due to previous error
task 'rustc' failed at 'explicit failure', /home/keegan/proj/rust/rust/src/libsyntax/diagnostic.rs:102
task '<main>' failed at 'explicit failure', /home/keegan/proj/rust/rust/src/librustc/lib.rs:396
make: *** [x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc] Error 101
make: *** Waiting for unfinished jobs....

I get the same message if I run make again. But the error might be nondeterministic; on the previous clean build the missing symbol was dlerror.

I see that neither -lm nor -ldl is present in the command line above.

@alexcrichton
Copy link
Member

Closing as a dupe of #10743 which will be fixed by #10777

I think that all this breakage is just linker differences among systems and I just got lucky in that the linkers on the bots accepted this and other systems apparently aren't.

@kmcallister
Copy link
Contributor Author

I still get this with a clean build on ad58e2c, which includes #10777

@alexcrichton
Copy link
Member

Can you re-paste the error message? (reopening in the meantime)

@alexcrichton alexcrichton reopened this Dec 4, 2013
@kmcallister
Copy link
Contributor Author

compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc
error: linking with `cc` failed: exit code: 1
note: cc arguments: -m64 -L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -o x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc.o -Wl,--as-needed -Wl,-O1 -L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lstd-6425b930ca146ae9-0.9-pre -L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lrustuv-a13edc95d75df17-0.9-pre -L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lextra-aaa96aab146eb38e-0.9-pre -L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lsyntax-2bb2d559d93ae8f0-0.9-pre -L/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lrustc-8581899a03b03e-0.9-pre -Lx86_64-unknown-linux-gnu/rt/uv_support -Lx86_64-unknown-linux-gnu/rt/libuv -L/home/keegan/proj/rust/rust/.rust -L/home/keegan/proj/rust/rust -lmorestack -Wl,-rpath,$ORIGIN/../lib -Wl,-rpath,/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib
note: /home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'ceil'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'log10'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'fmod'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'floor'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'trunc'
/home/keegan/proj/rust/rust/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libextra-aaa96aab146eb38e-0.9-pre.so: error: undefined reference to 'pow'
collect2: error: ld returned 1 exit status

error: aborting due to previous error
task 'rustc' failed at 'explicit failure', /home/rustbuild/src/rust-buildbot/slave/snap3-linux/build/src/libsyntax/diagnostic.rs:102
task '<main>' failed at 'explicit failure', /home/rustbuild/src/rust-buildbot/slave/snap3-linux/build/src/librustc/lib.rs:396
make: *** [x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc] Error 101

@alexcrichton
Copy link
Member

Ah, this is just a bootstrapping process. We just need a snapshot to land (the error is at stage0 where the old behavior is still in effect).

I'm in the process of making a new snapshot and will hopefully have that up shortly.

@kmcallister
Copy link
Contributor Author

Okay, thanks!

flip1995 pushed a commit to flip1995/rust that referenced this issue May 20, 2023
Don't emit clippy::useless_conversion on type aliases

Fixes rust-lang#10773

changelog: Enhancement: [`useless_conversion`]: Don't lint on type aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants