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

hashbrown tests fail on many platforms #115239

Closed
JustForFun88 opened this issue Aug 26, 2023 · 11 comments
Closed

hashbrown tests fail on many platforms #115239

JustForFun88 opened this issue Aug 26, 2023 · 11 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@JustForFun88
Copy link

Hashbrown crate starts fail when running: test (ubuntu-latest, armv7-unknown-linux-gnueabihf, nightly), test (ubuntu-latest, i686-unknown-linux-gnu, nightly), test (ubuntu-latest, thumbv6m-none-eabi, nightly) with:

error: linking with `cc` failed: exit status: 1
Backtrace

For test (ubuntu-latest, i686-unknown-linux-gnu, nightly):

Run sh ci/run.sh
+ : i686-unknown-linux-gnu
+ [ 0 = 1 ]
+ FEATURES=rustc-internal-api,serde,rayon,raw
+ OP=test
+ [ nightly = nightly ]
+ FEATURES=rustc-internal-api,serde,rayon,raw,nightly
+ export RUSTFLAGS= -D warnings
+ CARGO=cargo
+ [ 1 = 1 ]
+ export CARGO_NET_RETRY=5
+ export CARGO_NET_TIMEOUT=10
+ cargo install --locked cross
    Updating crates.io index
 Downloading crates ...
  Downloaded cross v0.2.5
  Installing cross v0.2.5
    Updating crates.io index
    Updating crates.io index
 Downloading crates ...
  Downloaded bitflags v1.3.2
  Downloaded atty v0.2.14
  Downloaded adler v1.0.2
  Downloaded eyre v0.6.8
  Downloaded thiserror v1.0.31
  Downloaded shell-escape v0.1.5
  Downloaded which v4.2.5
  Downloaded proc-macro2 v1.0.40
  Downloaded gimli v0.26.1
  Downloaded color-eyre v0.6.1
  Downloaded unicode-ident v1.0.1
  Downloaded thiserror-impl v1.0.31
  Downloaded textwrap v0.15.0
  Downloaded supports-color v1.3.0
  Downloaded serde_json v1.0.82
  Downloaded serde_ignored v0.1.3
  Downloaded semver v1.0.12
  Downloaded quote v1.0.20
  Downloaded miniz_oxide v0.5.3
  Downloaded libc v0.2.126
  Downloaded fastrand v1.7.0
  Downloaded serde v1.0.138
  Downloaded nix v0.24.1
  Downloaded hashbrown v0.12.2
  Downloaded syn v1.0.98
  Downloaded shell-words v1.1.0
  Downloaded owo-colors v3.4.0
  Downloaded object v0.29.0
  Downloaded indexmap v1.9.1
  Downloaded ctrlc v3.2.2
  Downloaded const-sha1 v0.2.0
  Downloaded clap_derive v3.2.7
  Downloaded version_check v0.9.4
  Downloaded toml v0.5.9
  Downloaded termcolor v1.1.3
  Downloaded tempfile v3.3.0
  Downloaded strsim v0.10.0
  Downloaded serde_derive v1.0.138
  Downloaded ryu v1.0.10
  Downloaded rustc_version v0.4.0
  Downloaded rustc-demangle v0.1.21
  Downloaded remove_dir_all v0.5.3
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded proc-macro-error v1.0.4
  Downloaded os_str_bytes v6.1.0
  Downloaded once_cell v1.13.0
  Downloaded memchr v2.5.0
  Downloaded itoa v1.0.2
  Downloaded home v0.5.3
  Downloaded heck v0.4.0
  Downloaded either v1.7.0
  Downloaded dirs-sys v0.3.7
  Downloaded directories v4.0.1
  Downloaded clap_lex v0.2.4
  Downloaded clap v3.2.8
  Downloaded cfg-if v1.0.0
  Downloaded cc v1.0.73
  Downloaded backtrace v0.3.66
  Downloaded autocfg v1.1.0
  Downloaded addr2line v0.17.0
  Downloaded is_ci v1.1.1
  Downloaded indenter v0.3.3
   Compiling proc-macro2 v1.0.40
   Compiling libc v0.2.126
   Compiling unicode-ident v1.0.1
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling version_check v0.9.4
   Compiling serde_derive v1.0.138
   Compiling proc-macro-error-attr v1.0.4
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.138
   Compiling memchr v2.5.0
   Compiling proc-macro-error v1.0.4
   Compiling atty v0.2.14
   Compiling cc v1.0.73
   Compiling autocfg v1.1.0
   Compiling indexmap v1.9.1
   Compiling backtrace v0.3.66
   Compiling gimli v0.26.1
   Compiling once_cell v1.13.0
   Compiling semver v1.0.12
   Compiling is_ci v1.1.1
   Compiling adler v1.0.2
   Compiling eyre v0.6.8
   Compiling bitflags v1.3.2
   Compiling miniz_oxide v0.5.3
   Compiling supports-color v1.3.0
   Compiling addr2line v0.17.0
   Compiling object v0.29.0
   Compiling serde_json v1.0.82
   Compiling indenter v0.3.3
   Compiling hashbrown v0.12.2
   Compiling os_str_bytes v6.1.0
   Compiling heck v0.4.0
   Compiling rustc-demangle v0.1.21
   Compiling clap_derive v3.2.7
   Compiling clap_lex v0.2.4
   Compiling owo-colors v3.4.0
   Compiling nix v0.24.1
   Compiling thiserror-impl v1.0.31
   Compiling dirs-sys v0.3.7
   Compiling cross v0.2.5
   Compiling fastrand v1.7.0
   Compiling strsim v0.10.0
   Compiling textwrap v0.15.0
   Compiling termcolor v1.1.3
   Compiling itoa v1.0.2
   Compiling either v1.7.0
   Compiling ryu v1.0.10
   Compiling remove_dir_all v0.5.3
   Compiling tempfile v3.3.0
   Compiling which v4.2.5
   Compiling clap v3.2.8
   Compiling thiserror v1.0.31
   Compiling directories v4.0.1
   Compiling ctrlc v3.2.2
   Compiling color-eyre v0.6.1
   Compiling rustc_version v0.4.0
   Compiling serde_ignored v0.1.3
   Compiling toml v0.5.9
   Compiling shell-words v1.1.0
   Compiling const-sha1 v0.2.0
   Compiling home v0.5.3
   Compiling shell-escape v0.1.5
    Finished release [optimized] target(s) in 56.41s
  Installing /home/runner/.cargo/bin/cross
  Installing /home/runner/.cargo/bin/cross-util
   Installed package `cross v0.2.5` (executables `cross`, `cross-util`)
+ CARGO=cross
+ cross -vv build --target=i686-unknown-linux-gnu --no-default-features
+ cargo metadata --format-version 1 --filter-platform i686-unknown-linux-gnu
+ rustc --print sysroot
+ rustup toolchain list
+ rustup target list --toolchain nightly-x86_64-unknown-linux-gnu
+ rustup --verbose target add i686-unknown-linux-gnu --toolchain nightly-x86_64-unknown-linux-gnu
verbose: read metadata version: '12'
info: downloading component 'rust-std' for 'i686-unknown-linux-gnu'
verbose: downloading file from: 'https://static.rust-lang.org/dist/2023-08-26/rust-std-nightly-i686-unknown-linux-gnu.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: installing component 'rust-std' for 'i686-unknown-linux-gnu'
verbose: creating temp directory: /home/runner/.rustup/tmp/gbajisry9xir43es_dir
verbose: creating temp file: /home/runner/.rustup/tmp/kaojpcf33mc1jhq5_file
verbose: creating temp file: /home/runner/.rustup/tmp/qpmhbhlrecd9uq_7_file
verbose: deleted temp directory: /home/runner/.rustup/tmp/gbajisry9xir43es_dir
verbose: creating temp file: /home/runner/.rustup/tmp/oy44r2r0a74rj1zg_file
verbose: creating temp file: /home/runner/.rustup/tmp/9t3_3b1vgnf1jg29_file
verbose: deleted temp file: /home/runner/.rustup/tmp/kaojpcf33mc1jhq5_file
verbose: deleted temp file: /home/runner/.rustup/tmp/qpmhbhlrecd9uq_7_file
verbose: deleted temp file: /home/runner/.rustup/tmp/oy44r2r0a74rj1zg_file
verbose: deleted temp file: /home/runner/.rustup/tmp/9t3_3b1vgnf1jg29_file
+ /usr/bin/docker
+ /usr/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e CARGO_NET_RETRY -e RUSTFLAGS -e CARGO_NET_TIMEOUT -e 'USER=runner' --rm --user 1001:999 -v /home/runner/.xargo:/xargo:z -v /home/runner/.cargo:/cargo:z -v /cargo/bin -v /home/runner/work/hashbrown/hashbrown:/project:z -v /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/rust:z,ro -v /home/runner/work/hashbrown/hashbrown/target:/target:z -w /project ghcr.io/cross-rs/i686-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo -vv build --target=i686-unknown-linux-gnu --no-default-features'
Unable to find image 'ghcr.io/cross-rs/i686-unknown-linux-gnu:0.2.5' locally
0.2.5: Pulling from cross-rs/i686-unknown-linux-gnu
58690f9b18fc: Pulling fs layer
b51569e7c507: Pulling fs layer
da8ef40b9eca: Pulling fs layer
fb15d46c38dc: Pulling fs layer
46d2a70b51ed: Pulling fs layer
7812f9249327: Pulling fs layer
d53f7e279586: Pulling fs layer
f193ec48d2fd: Pulling fs layer
fe5526b6ebaa: Pulling fs layer
769f1f794aea: Pulling fs layer
a0bd99ae6296: Pulling fs layer
e0e7ed8e6d4d: Pulling fs layer
3737a30db1dd: Pulling fs layer
5401647a58d6: Pulling fs layer
783b83cb5580: Pulling fs layer
cf88728a2784: Pulling fs layer
acb669b56422: Pulling fs layer
bc14e3cfc292: Pulling fs layer
fb15d46c38dc: Waiting
46d2a70b51ed: Waiting
7812f9249327: Waiting
d53f7e279586: Waiting
f193ec48d2fd: Waiting
fe5526b6ebaa: Waiting
769f1f794aea: Waiting
a0bd99ae6296: Waiting
e0e7ed8e6d4d: Waiting
3737a30db1dd: Waiting
5401647a58d6: Waiting
783b83cb5580: Waiting
cf88728a2784: Waiting
acb669b56422: Waiting
bc14e3cfc292: Waiting
b51569e7c507: Download complete
da8ef40b9eca: Verifying Checksum
da8ef40b9eca: Download complete
46d2a70b51ed: Verifying Checksum
46d2a70b51ed: Download complete
fb15d46c38dc: Verifying Checksum
fb15d46c38dc: Download complete
d53f7e279586: Verifying Checksum
d53f7e279586: Download complete
58690f9b18fc: Verifying Checksum
58690f9b18fc: Download complete
fe5526b6ebaa: Verifying Checksum
fe5526b6ebaa: Download complete
f193ec48d2fd: Verifying Checksum
f193ec48d2fd: Download complete
a0bd99ae6296: Verifying Checksum
a0bd99ae6296: Download complete
e0e7ed8e6d4d: Verifying Checksum
e0e7ed8e6d4d: Download complete
769f1f794aea: Verifying Checksum
769f1f794aea: Download complete
7812f9249327: Verifying Checksum
7812f9249327: Download complete
5401647a58d6: Verifying Checksum
5401647a58d6: Download complete
cf88728a2784: Verifying Checksum
cf88728a2784: Download complete
783b83cb5580: Verifying Checksum
783b83cb5580: Download complete
3737a30db1dd: Verifying Checksum
3737a30db1dd: Download complete
bc14e3cfc292: Verifying Checksum
bc14e3cfc292: Download complete
acb669b56422: Verifying Checksum
acb669b56422: Download complete
58690f9b18fc: Pull complete
b51569e7c507: Pull complete
da8ef40b9eca: Pull complete
fb15d46c38dc: Pull complete
46d2a70b51ed: Pull complete
7812f9249327: Pull complete
d53f7e279586: Pull complete
f193ec48d2fd: Pull complete
fe5526b6ebaa: Pull complete
769f1f794aea: Pull complete
a0bd99ae6296: Pull complete
e0e7ed8e6d4d: Pull complete
3737a30db1dd: Pull complete
5401647a58d6: Pull complete
783b83cb5580: Pull complete
cf88728a2784: Pull complete
acb669b56422: Pull complete
bc14e3cfc292: Pull complete
Digest: sha256:2647400f884dd399a3ce6f6d918fec0776d43e73f471f52e310cbe664ac1671f
Status: Downloaded newer image for ghcr.io/cross-rs/i686-unknown-linux-gnu:0.2.5
   Compiling hashbrown v0.14.0 (/project)
     Running `CARGO=/rust/bin/cargo CARGO_CRATE_NAME=hashbrown CARGO_MANIFEST_DIR=/project CARGO_PKG_AUTHORS='Amanieu d'\''Antras <amanieu@gmail.com>' CARGO_PKG_DESCRIPTION='A Rust port of Google'\''s SwissTable hash map' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=hashbrown CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/hashbrown' CARGO_PKG_RUST_VERSION=1.64.0 CARGO_PKG_VERSION=0.14.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=14 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/target/debug/deps:/rust/lib' rustc --crate-name hashbrown --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=2dcd85585ff73324 -C extra-filename=-2dcd85585ff73324 --out-dir /target/i686-unknown-linux-gnu/debug/deps --target i686-unknown-linux-gnu -C incremental=/target/i686-unknown-linux-gnu/debug/incremental -L dependency=/target/i686-unknown-linux-gnu/debug/deps -L dependency=/target/debug/deps -D warnings`
    Finished dev [unoptimized + debuginfo] target(s) in 0.59s
+ cross -vv build --target=i686-unknown-linux-gnu --release --no-default-features
+ cargo metadata --format-version 1 --filter-platform i686-unknown-linux-gnu
+ rustc --print sysroot
+ rustup toolchain list
+ rustup target list --toolchain nightly-x86_64-unknown-linux-gnu
+ rustup component list --toolchain nightly-x86_64-unknown-linux-gnu
+ rustup --verbose component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
verbose: read metadata version: '12'
info: downloading component 'rust-src'
verbose: downloading file from: 'https://static.rust-lang.org/dist/2023-08-26/rust-src-nightly.tar.xz'
verbose: downloading with reqwest
verbose: checksum passed
info: installing component 'rust-src'
verbose: creating temp directory: /home/runner/.rustup/tmp/8y0t6lvmorcp23g4_dir
verbose: creating temp file: /home/runner/.rustup/tmp/otbeg8vlp0lzgbl7_file
verbose: creating temp file: /home/runner/.rustup/tmp/cvb8zn6gk3w3r0gw_file
verbose: deleted temp directory: /home/runner/.rustup/tmp/8y0t6lvmorcp23g4_dir
verbose: creating temp file: /home/runner/.rustup/tmp/6hm4600rj18vror4_file
verbose: creating temp file: /home/runner/.rustup/tmp/d0a0rvlyo0xkkb2u_file
verbose: deleted temp file: /home/runner/.rustup/tmp/otbeg8vlp0lzgbl7_file
verbose: deleted temp file: /home/runner/.rustup/tmp/cvb8zn6gk3w3r0gw_file
verbose: deleted temp file: /home/runner/.rustup/tmp/6hm4600rj18vror4_file
verbose: deleted temp file: /home/runner/.rustup/tmp/d0a0rvlyo0xkkb2u_file
+ /usr/bin/docker
+ /usr/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e CARGO_NET_RETRY -e RUSTFLAGS -e CARGO_NET_TIMEOUT -e 'USER=runner' --rm --user 1001:999 -v /home/runner/.xargo:/xargo:z -v /home/runner/.cargo:/cargo:z -v /cargo/bin -v /home/runner/work/hashbrown/hashbrown:/project:z -v /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/rust:z,ro -v /home/runner/work/hashbrown/hashbrown/target:/target:z -w /project ghcr.io/cross-rs/i686-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo -vv build --target=i686-unknown-linux-gnu --release --no-default-features'
   Compiling hashbrown v0.14.0 (/project)
     Running `CARGO=/rust/bin/cargo CARGO_CRATE_NAME=hashbrown CARGO_MANIFEST_DIR=/project CARGO_PKG_AUTHORS='Amanieu d'\''Antras <amanieu@gmail.com>' CARGO_PKG_DESCRIPTION='A Rust port of Google'\''s SwissTable hash map' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=hashbrown CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/hashbrown' CARGO_PKG_RUST_VERSION=1.64.0 CARGO_PKG_VERSION=0.14.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=14 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/target/release/deps:/rust/lib' rustc --crate-name hashbrown --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=7d30fcadfce0cbf1 -C extra-filename=-7d30fcadfce0cbf1 --out-dir /target/i686-unknown-linux-gnu/release/deps --target i686-unknown-linux-gnu -L dependency=/target/i686-unknown-linux-gnu/release/deps -L dependency=/target/release/deps -D warnings`
    Finished release [optimized] target(s) in 0.54s
+ cross -vv test --target=i686-unknown-linux-gnu
+ cargo metadata --format-version 1 --filter-platform i686-unknown-linux-gnu
+ rustc --print sysroot
+ rustup toolchain list
+ rustup target list --toolchain nightly-x86_64-unknown-linux-gnu
+ rustup component list --toolchain nightly-x86_64-unknown-linux-gnu
+ /usr/bin/docker
+ /usr/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e CARGO_NET_RETRY -e RUSTFLAGS -e CARGO_NET_TIMEOUT -e 'USER=runner' --rm --user 1001:999 -v /home/runner/.xargo:/xargo:z -v /home/runner/.cargo:/cargo:z -v /cargo/bin -v /home/runner/work/hashbrown/hashbrown:/project:z -v /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/rust:z,ro -v /home/runner/work/hashbrown/hashbrown/target:/target:z -w /project ghcr.io/cross-rs/i686-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo -vv test --target=i686-unknown-linux-gnu'
   Compiling cfg-if v1.0.0
     Running `CARGO=/rust/bin/cargo CARGO_CRATE_NAME=cfg_if CARGO_MANIFEST_DIR=/cargo/registry/src/index.crates.io-6f17d22bba15001f/cfg-if-1.0.0 CARGO_PKG_AUTHORS='Alex Crichton <alex@alexcrichton.com>' CARGO_PKG_DESCRIPTION='A macro to ergonomically define an item depending on a large number of #[cfg]
parameters. Structured like an if-else chain, the first matching branch is the
item that gets emitted.
' CARGO_PKG_HOMEPAGE='https://github.com/alexcrichton/cfg-if' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cfg-if CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/alexcrichton/cfg-if' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.0.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/target/debug/deps:/rust/lib' rustc --crate-name cfg_if --edition=2018 /cargo/registry/src/index.crates.io-6f17d22bba15001f/cfg-if-1.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=1e35ffbfc0de729a -C extra-filename=-1e35ffbfc0de729a --out-dir /target/i686-unknown-linux-gnu/debug/deps --target i686-unknown-linux-gnu -L dependency=/target/i686-unknown-linux-gnu/debug/deps -L dependency=/target/debug/deps --cap-lints warn -D warnings`
   Compiling libc v0.2.147
     Running `CARGO=/rust/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147 CARGO_PKG_AUTHORS='The Rust Project Developers' CARGO_PKG_DESCRIPTION='Raw FFI bindings to platform libraries like libc.
' CARGO_PKG_HOMEPAGE='https://github.com/rust-lang/libc' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=libc CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/libc' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.147 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=147 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/target/debug/deps:/rust/lib' rustc --crate-name build_script_build /cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=f32428b039fdb8c6 -C extra-filename=-f32428b039fdb8c6 --out-dir /target/debug/build/libc-f32428b039fdb8c6 -L dependency=/target/debug/deps --cap-lints warn`
   Compiling proc-macro2 v1.0.66
     Running `CARGO=/rust/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.66 CARGO_PKG_AUTHORS='David Tolnay <dtolnay@gmail.com>:Alex Crichton <alex@alexcrichton.com>' CARGO_PKG_DESCRIPTION='A substitute implementation of the compiler'\''s `proc_macro` API to decouple token-based libraries from the procedural macro use case.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=proc-macro2 CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/dtolnay/proc-macro2' CARGO_PKG_RUST_VERSION=1.56 CARGO_PKG_VERSION=1.0.66 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=66 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/target/debug/deps:/rust/lib' rustc --crate-name build_script_build --edition=2021 /cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.66/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=b2727fdd1575d18f -C extra-filename=-b2727fdd1575d18f --out-dir /target/debug/build/proc-macro2-b2727fdd1575d18f -L dependency=/target/debug/deps --cap-lints warn`
error: linking with `cc` failed: exit status: 1
  |
  = 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
          

error: linking with `cc` failed: exit status: 1
  |
  = 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/rustcfBCx2S/symbols.o" "/target/debug/build/proc-macro2-b2727fdd1575d18f/build_script_build-b2727fdd1575d18f.build_script_build.386d1baa5f9fd6fb-cgu.0.rcgu.o" "/target/debug/build/proc-macro2-b2727fdd1575d18f/build_script_build-b2727fdd1575d18f.build_script_build.386d1baa5f9fd6fb-cgu.1.rcgu.o" "/target/debug/build/proc-macro2-b2727fdd1575d18f/build_script_build-b2727fdd1575d18f.build_script_build.386d1baa5f9fd6fb-cgu.2.rcgu.o" "/target/debug/build/proc-macro2-b2727fdd1575d18f/build_script_build-b2727fdd1575d18f.406sga223vt30z7c.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/proc-macro2-b2727fdd1575d18f/build_script_build-b2727fdd1575d18f" "-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
          

error: could not compile `proc-macro2` (build script) due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/rust/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.66 CARGO_PKG_AUTHORS='David Tolnay <dtolnay@gmail.com>:Alex Crichton <alex@alexcrichton.com>' CARGO_PKG_DESCRIPTION='A substitute implementation of the compiler'\''s `proc_macro` API to decouple token-based libraries from the procedural macro use case.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=proc-macro2 CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/dtolnay/proc-macro2' CARGO_PKG_RUST_VERSION=1.56 CARGO_PKG_VERSION=1.0.66 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=66 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/target/debug/deps:/rust/lib' rustc --crate-name build_script_build --edition=2021 /cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.66/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=b2727fdd1575d18f -C extra-filename=-b2727fdd1575d18f --out-dir /target/debug/build/proc-macro2-b2727fdd1575d18f -L dependency=/target/debug/deps --cap-lints warn` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
error: could not compile `libc` (build script) due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/rust/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147 CARGO_PKG_AUTHORS='The Rust Project Developers' CARGO_PKG_DESCRIPTION='Raw FFI bindings to platform libraries like libc.
  ' CARGO_PKG_HOMEPAGE='https://github.com/rust-lang/libc' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=libc CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/libc' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.147 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=147 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/target/debug/deps:/rust/lib' rustc --crate-name build_script_build /cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=f32428b039fdb8c6 -C extra-filename=-f32428b039fdb8c6 --out-dir /target/debug/build/libc-f32428b039fdb8c6 -L dependency=/target/debug/deps --cap-lints warn` (exit status: 1)
+ rustup component list --toolchain nightly-x86_64-unknown-linux-gnu
Error: Process completed with exit code 101.

@JustForFun88 JustForFun88 added the C-bug Category: This is a bug. label Aug 26, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 26, 2023
@nikic
Copy link
Contributor

nikic commented Aug 26, 2023

  = 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

Could this be related to #106511? cc @MaskRay

@CryZe
Copy link
Contributor

CryZe commented Aug 26, 2023

I'm also seeing this on x86_64 with the recent nightlies: https://github.com/LiveSplit/livesplit-core/actions/runs/5980989859/job/16228118339#step:7:110

Update 1: It seems like in both cases it's related to cross. The original PR mentions problems with old ld versions. Could it be that cross needs to update their docker images? (Though they seem to be based on Ubuntu 20, which doesn't seem THAT old)

Update 2: cross runs GNU ld (GNU Binutils for Ubuntu) 2.26.1

@mati865
Copy link
Contributor

mati865 commented Aug 26, 2023

Centos 7 used by i686-dist builder seems to use Binutils 2.27, dist-armv7 uses Binutils 2.32 and dist-various1 (so thumbv6m-none-eabi) uses Binutils 2.38.
They all are indeed newer than:

Update 2: cross runs GNU ld (GNU Binutils for Ubuntu) 2.26.1

@Emilgardis
Copy link
Contributor

Emilgardis commented Aug 26, 2023

hashbrown ci uses cross 0.2.5, which is the latest stable release for cross.

To fix this issue with cross specifically, one can set the image used by cross to be a newer version, cross 0.2.5 images use ubuntu 16.04, we can change that with the env vars or config (see comment)

CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE="ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main" (make sure to set the correct env-var and image for the specific target)

@MaskRay
Copy link
Contributor

MaskRay commented Aug 26, 2023

The diagnostic looks similar to a binutils 2.41 change I made to fix https://sourceware.org/bugzilla/show_bug.cgi?id=24784

ld: Allow R_X86_64_GOTPCREL for call *__tls_get_addr@GOTPCREL(%rip)

_Thread_local int a;
int main() { return a; }

% gcc -fno-plt -fpic a.c -fuse-ld=bfd -Wa,-mrelax-relocations=no
/usr/bin/ld.bfd: /tmp/ccSSBgrg.o: TLS transition from R_X86_64_TLSGD to R_X86_64_GOTTPOFF against `a' at 0xd in section `.text' failed
/usr/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

There is incompatibility between -Z plt=no and -Z relax-elf-relocations=no with GNU ld<2.41. You may need to figure out where -Wa,-mrelax-relocations=no similar semantics are used.

nikic added a commit to nikic/rust that referenced this issue Aug 27, 2023
This reverts commit 4410868, reversing
changes made to 249595b.

This causes linker failures with the binutils version used by
cross (rust-lang#115239), as well as miscompilations when using the mold
linker.
@VorpalBlade
Copy link

VorpalBlade commented Aug 27, 2023

Ran into this in github CI today as well (e.g. https://github.com/VorpalBlade/ini-merge/actions/runs/5990039532/job/16246920034). Works fine locally on Arch though when I try to recreate it.

EDIT: Managed to reproduce it locally. I was mixing up -gnu and -musl targets, my bad.

@nikic
Copy link
Contributor

nikic commented Aug 27, 2023

Posted a revert at #115267.

@VorpalBlade
Copy link

To fix this issue with cross specifically, one can set the image used by cross to be a newer version, cross 0.2.5 images use ubuntu 16.04, we can change that with the env vars or config (see cross-rs/cross#1319 (comment))

This is really not a great solution for projects that build binaries for releases though (like I do). To target an old enough glibc to work on all systems (e.g. CentOS/RHEL, stable Debian, etc) you need to build on a fairly old distro. And then you also get older ld etc as well.

It would be great if you could tell rust & gcc (for native dependencies) to target an older glibc than the system one, that would solve a lot of issues.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 27, 2023
…piler-errors

Revert relax_elf_relocations default change

This reverts commit 4410868 (rust-lang#106511).

The change caused linker failures with the binutils version used by cross (rust-lang#115239), as well as miscompilations when using the mold linker (https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/SIGILL.20in.20build-script-build.20with.20nightly-2023-08-25/near/387506479).
@MaskRay
Copy link
Contributor

MaskRay commented Aug 27, 2023

In GCC/Clang, TLS transition from R_X86_64_TLSLD to R_X86_64_TPOFF32 can happen with -fno-plt -fpic a.c -fuse-ld=bfd -Wa,-mrelax-relocations=no.

#106511 is to use modern GCC/Clang style -Wa,-mrelax-relocations=yes. I am not sure why -Wa,-mrelax-relocations=yes is related to the problem.

I think I should keep arguing for #106380 -Z plt=yes for all targets, not just non-x86. -Z plt=no is prone to cause such problems for GNU ld and possibly mold.

bors added a commit to rust-lang-ci/rust that referenced this issue Aug 28, 2023
…ler-errors

Revert relax_elf_relocations default change

This reverts commit 4410868 (rust-lang#106511).

The change caused linker failures with the binutils version used by cross (rust-lang#115239), as well as miscompilations when using the mold linker (https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/SIGILL.20in.20build-script-build.20with.20nightly-2023-08-25/near/387506479).
@GuillaumeGomez
Copy link
Member

cc @Amanieu

@Noratrieb Noratrieb added A-linkage Area: linking into static, shared libraries and binaries T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 4, 2023
@JustForFun88
Copy link
Author

I apologize to everyone, forgot about this issue. I can state that this issue is closed and no longer relevant. @Emilgardis' suggestion (as a workaround) and @nikic's pull request fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. 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

10 participants