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

ld error: failed to set dynamic section sizes: bad value on Fedora 40 #127

Open
olvrlrnz opened this issue Sep 10, 2024 · 0 comments
Open

Comments

@olvrlrnz
Copy link

Hi,

I'm trying to build a binary which depends on botan-rs with enabled features vendored and botan3. However, the build fails during linking:

error: could not compile `test-binary` (bin "test-binary") due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name test_binary --edition=2021 test-binary/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=230 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=cf6512bf1b622699 -C extra-filename=-cf6512bf1b622699 --out-dir /home/username/src/test-binary/target/release/deps -C strip=debuginfo -L dependency=/home/username/src/test-binary/target/release/deps --extern botan=/home/username/src/test-binary/target/release/deps/libbotan-bee482ea942e9aea.rlib --extern clap=/home/username/src/test-binary/target/release/deps/libclap-6caa6c30b50040bc.rlib --extern rand=/home/username/src/test-binary/target/release/deps/librand-8a85f4fa52091718.rlib --extern rpassword=/home/username/src/test-binary/target/release/deps/librpassword-bd84b52254a2aed3.rlib -L native=/home/username/src/test-binary/target/release/build/botan-sys-04735490ed1e1cfa/out/botan -L native=/home/username/src/test-binary/target/release/build/bzip2-sys-9f46a79df32b6d9f/out/lib -L native=/home/username/src/test-binary/target/release/build/zstd-sys-cb54d1f4741e1600/out` (exit status: 1)

build command was simply cargo build --release

using the following build command works: BOTAN_CONFIGURE_EXTRA_CXXFLAGS="-fPIE" cargo build --release

I've also attached 2 logs created during the c lib build. -fPIE doesn't even make it into the generated Makefile in target/release/build/botan-sys-<id>/out/botan unless EXTRA_CXXFLAGS is passed to cargo.

Host:

  • Linux host 6.10.7-200.fc40.x86_64 1 SMP PREEMPT_DYNAMIC Fri Aug 30 00:08:59 UTC 2024 x86_64 GNU/Linux
  • Fedora release 40 (Forty)
  • rustc 1.80.1 (3f5fd8dd4 2024-08-06) (Fedora 1.80.1-1.fc40)
  • cargo 1.80.1 (376290515 2024-07-16)
  • gcc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-1)
  • GNU ld version 2.41-37.fc40

I noticed there are similar issues here and here without a proper solution.

botan-rs-output-broken.txt
botan-rs-output-working.txt

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

1 participant