Skip to content

binutils too old to be compatible with recent nightlies #1319

Open
@CryZe

Description

@CryZe

Checklist

Describe your issue

Recent Rust nightlies require a newer linker version:

  = note: LC_ALL="C" PATH="/rust/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/rust/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcaQRPRI/symbols.o" "/target/debug/build/libc-f32428b039fdb8c6/build_script_build-f32428b039fdb8c6.build_script_build.234a671006178bd0-cgu.0.rcgu.o" "/target/debug/build/libc-f32428b039fdb8c6/build_script_build-f32428b039fdb8c6.build_script_build.234a671006178bd0-cgu.1.rcgu.o" "/target/debug/build/libc-f32428b039fdb8c6/build_script_build-f32428b039fdb8c6.build_script_build.234a671006178bd0-cgu.2.rcgu.o" "/target/debug/build/libc-f32428b039fdb8c6/build_script_build-f32428b039fdb8c6.2l6typj27svajb46.rcgu.o" "-Wl,--as-needed" "-L" "/target/debug/deps" "-L" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-19964a87984cce8a.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-0ad64a60ea2c4aaa.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-37a5cbc9c5c20c04.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-e8cedd2960ff146a.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-5deb081ad96d9130.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-22c964fd8f2dfaf9.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-6971442fd1c2cfbb.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-ec7906ee77b1d540.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-4307a3ebc7f0bfcf.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-c2ab156d57b93da1.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-763bbb8717f828b7.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-eb9ba65f17380c5d.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-4286d0bf3addfc05.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-fa17a4d002f91ad9.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-ff4ae84067796be3.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-6f47c72c85a10103.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-cd2f2bc505f56f50.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-ec02dd343723da85.rlib" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-4df0073ab5846ddb.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/target/debug/build/libc-f32428b039fdb8c6/build_script_build-f32428b039fdb8c6" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: /rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-19964a87984cce8a.rlib(std-19964a87984cce8a.std.f6dab3b182b9be26-cgu.0.rcgu.o): TLS transition from R_X86_64_TLSLD to R_X86_64_TPOFF32 against `_ZN3std9panicking11panic_count17LOCAL_PANIC_COUNT7__getit3VAL17h178ac08236b8843dE.0' at 0x5af in section `.text._ZN3std2rt19lang_start_internal17h1dd1442605b126fbE' failed
          /rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-19964a87984cce8a.rlib: error adding symbols: Bad value
          collect2: error: ld returned 1 exit status

cross seems to use GNU ld (GNU Binutils for Ubuntu) 2.26.1 on the problematic targets. I don't know which version resolves the problem, but I do know that the problem goes away with the latest version.

What target(s) are you cross-compiling for?

x86_64-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.5, cargo 1.74.0-nightly (2cc50bc0b 2023-08-22)

Example

cross +nightly build --target x86_64-unknown-linux-gnu

Additional information / notes

Rust issue rust-lang/rust#115239

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-glibcArea: glibc targetsA-linuxArea: linux targetsA-x86Area: x86 targets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions