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

[staging] glibc: fix cross-compile to ppc64le #104733

Merged
merged 1 commit into from Nov 24, 2020

Conversation

r-burns
Copy link
Contributor

@r-burns r-burns commented Nov 24, 2020

Fixes cross-compilation when build == host != target == ppc64le. Glibc invokes objcopy during cross-compilation to ppc64le, which fails when the nonprefixed objcopy can't understand the target format.

Needed to build cross bootstrap tools since glibc v2.32.

Error can be reproduced by attempting to build pkgsCross.powernv.stdenv.cc.libc:

objcopy: Unable to recognise the format of the input file `/build/build/no_ldbl_gnu_attribute.o'
make[2]: *** [../sysdeps/powerpc/powerpc64/le/Makefile:31: /build/build/no_ldbl_gnu_attribute.bin] Error 1

Checked for regressions locally by building:

  • stdenv
  • pkgsCross.powernv.stdenv.cc.libc
  • pkgsCross.raspberryPi.stdenv.cc.libc
  • powernv cross bootstrapTools
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Fixes cross-compilation when build == host != target == ppc64le.
Glibc invokes objcopy during cross-compilation to ppc64le, which
fails when the nonprefixed objcopy can't understand the target format.
@veprbl veprbl added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Nov 24, 2020
@veprbl
Copy link
Member

veprbl commented Nov 24, 2020

@GrahamcOfBorg eval

@veprbl veprbl added this to WIP in Staging via automation Nov 24, 2020
@veprbl veprbl moved this from WIP to Needs review in Staging Nov 24, 2020
@r-burns
Copy link
Contributor Author

r-burns commented Nov 24, 2020

I can't reproduce ofborg's failure locally - the eval-package-list-no-aliases command runs fine for me 🤷

@r-burns
Copy link
Contributor Author

r-burns commented Nov 24, 2020

@ofborg eval

@Mic92
Copy link
Member

Mic92 commented Nov 24, 2020

That eval error is likely due to something else.

@Mic92 Mic92 merged commit 9f74d3b into NixOS:staging Nov 24, 2020
Staging automation moved this from Needs review to Done Nov 24, 2020
@ofborg ofborg bot requested review from edolstra and Ma27 November 24, 2020 08:29
@r-burns r-burns deleted the ppc64le-glibc-cross branch January 5, 2021 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants