Skip to content

binutils-unwrapped-all-targets: fix libctf breakage#169907

Merged
trofi merged 1 commit intoNixOS:masterfrom
trofi:fix-binutils-unwrapped-all-targets
Apr 30, 2022
Merged

binutils-unwrapped-all-targets: fix libctf breakage#169907
trofi merged 1 commit intoNixOS:masterfrom
trofi:fix-binutils-unwrapped-all-targets

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Apr 23, 2022

Before the change 'postFixup' was breaking binaries as it deleted libctf.so's
dependency without fixing the links (https://hydra.nixos.org/build/173957444):

objdump:
symbol lookup error: ...-binutils-2.38/lib/libctf.so.0: undefined symbol: htab_eq_string

Instead of tying binutils and libbfd together let's stop replacing the
libraries and use local copies. They are not mechanically interchangeable.

Ideally binutils' upstream build system should allow linking external
libbfd/libopcodes/libctf but we are not there yet.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Before the change 'postFixup' was breaking binaries as it deleted `libctf.so`'s
dependency without fixing the links (https://hydra.nixos.org/build/173957444):

  objdump:
    symbol lookup error: ...-binutils-2.38/lib/libctf.so.0: undefined symbol: htab_eq_string

Instead of tying binutils and libbfd together let's stop replacing the
libraries and use local copies. They are not mechanically interchangeable.

Ideally binutils' upstream build system should allow linking external
`libbfd`/`libopcodes`/`libctf` but we are not there yet.
@trofi trofi mentioned this pull request Apr 23, 2022
12 tasks
@ofborg ofborg bot requested review from Ericson2314 and lovesegfault April 23, 2022 07:34
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Apr 23, 2022
@trofi trofi merged commit c807c8c into NixOS:master Apr 30, 2022
@trofi trofi deleted the fix-binutils-unwrapped-all-targets branch April 30, 2022 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant