You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to the new nightly compiler, my builds are all failing with the following error:
[root@athens ~]# rustup run nightly rustc test.rs
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "test.0.o" "-o" "test" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-1357b93f.rlib" "/root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-1357b93f.rlib" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util"
= note: /usr/bin/ld: /root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1357b93f.rlib(fileline.o)(.debug_frame+0x6c): reloc against `.debug_frame': error 2
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
error: aborting due to previous error
Inspecting the rlib with objdump reports the following errors:
[root@athens ~]# objdump -r /root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1357b93f.rlib > /dev/null
BFD: /root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1357b93f.rlib(print.o): invalid relocation type 42
BFD: BFD version 2.23.52.0.1-55.el7 20130226 assertion fail elf64-x86-64.c:334
BFD: /root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1357b93f.rlib(print.o): invalid relocation type 42
BFD: BFD version 2.23.52.0.1-55.el7 20130226 assertion fail elf64-x86-64.c:334
BFD: /root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1357b93f.rlib(print.o): invalid relocation type 42
BFD: BFD version 2.23.52.0.1-55.el7 20130226 assertion fail elf64-x86-64.c:334
BFD: /root/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1357b93f.rlib(print.o): invalid relocation type 42
BFD: BFD version 2.23.52.0.1-55.el7 20130226 assertion fail elf64-x86-64.c:334
Support for "Relocation type 42" was added to newer versions of ld (from the binutils package). On a box with binutils version 2.26.1 (Ubuntu Xenial) these errors disappear and the original link is successful.
Centos 7 currently ships with binutils version 2.23.52.0.1 which can't handle the new relocation types so can't compile any rust code.
The text was updated successfully, but these errors were encountered:
After updating to the new nightly compiler, my builds are all failing with the following error:
Inspecting the
rlib
withobjdump
reports the following errors:Support for "Relocation type 42" was added to newer versions of
ld
(from the binutils package). On a box with binutils version 2.26.1 (Ubuntu Xenial) these errors disappear and the original link is successful.Centos 7 currently ships with binutils version 2.23.52.0.1 which can't handle the new relocation types so can't compile any rust code.
The text was updated successfully, but these errors were encountered: