Skip to content

how to resolve this issue: std::rt::lang_start undefined reference #45517

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

Closed
xianghx opened this issue Oct 25, 2017 · 7 comments
Closed

how to resolve this issue: std::rt::lang_start undefined reference #45517

xianghx opened this issue Oct 25, 2017 · 7 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@xianghx
Copy link

xianghx commented Oct 25, 2017

uname --a
Linux sky 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:06:36 UTC 2017 i686 i686 i686 GNU/Linux

cc --version
cc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rustc --version
rustc 1.22.0-nightly (4c053db 2017-10-22)

rustc hello.rs
error: linking with cc failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m32" "-L" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib" "hello.hello0.rust-cgu.o" "-o" "hello" "hello.crate.allocator.rust-cgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-f64e65221ded4189.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/liballoc_jemalloc-15603b85f9b07db5.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/liballoc_system-7f202905b2f90235.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/libpanic_unwind-fd7102ed26e1ee75.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/librand-b2608977e05bf703.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/libunwind-3d18fc673b5da13d.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/liblibc-390d7866de44001e.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/liballoc-28619888b40bbbe2.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/libstd_unicode-6e3e1588214a0702.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-a30e14812908fc60.rlib" "/home/xianghx/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib/libcompiler_builtins-20161fbf48c6c15f.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"
= note: hello.hello0.rust-cgu.o:在函数‘main’中:(note: in the function main)
hello0-e36fee694dd79ad6eb28a0e541972798-exe.rs:(.text.main+0x2d):对‘std::rt::lang_start::hb4e4c925bf3928b1’未定义的引用 (note: undefined reference)
collect2: error: ld returned 1 exit status

error: aborting due to previous error

@oli-obk
Copy link
Contributor

oli-obk commented Oct 25, 2017

What's the content of hello.rs?

Is this only happening on a recent nightly? Or did it happen before?

Does stable produce the same error?

@xianghx
Copy link
Author

xianghx commented Oct 25, 2017

stable ok.
maybe 2007-10-14 nightly ok.

then, rustup update nightly , doesn't work.

hello.rs
fn main() {}

@xianghx
Copy link
Author

xianghx commented Oct 25, 2017

raphlinus commented 2 days ago

This looks like something wrong in your build environment, not with pulldown-cmark itself. #42239 is a similar error. Are you able to compile other programs?

see pulldown-cmark/pulldown-cmark#101

@oli-obk
Copy link
Contributor

oli-obk commented Oct 25, 2017

Have you tried updating nightly again?

@xianghx
Copy link
Author

xianghx commented Oct 25, 2017

rustup update nightly
info: syncing channel updates for 'nightly-i686-unknown-linux-gnu'

nightly-i686-unknown-linux-gnu unchanged - rustc 1.22.0-nightly (4c053db 2017-10-22)

@Mark-Simulacrum Mark-Simulacrum added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 25, 2017
@Mark-Simulacrum
Copy link
Member

@alexcrichton Possibly related to the recent breakage of 32-bit cross compiles on nightlies?

@alexcrichton
Copy link
Member

Seems quite likely, yes, that this is #45500

@xianghx xianghx closed this as completed Oct 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants