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

darwin.libtapi: update for cross-compilation #190254

Closed
wants to merge 1 commit into from

Conversation

impl
Copy link
Member

@impl impl commented Sep 8, 2022

Description of changes

In #181485, all packages started to be linked with -lc++abi. When cross compiling, the libcxxabi path seemingly needs to be passed to the the libtapi derivation; it won't pick it up on its own (perhaps because of the bootstrapping?).

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.11 Release Notes (or backporting 22.05 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.

In b060076 ("cc-wrapper: broaden explicit libc++abi linking for
LLVM stdenv"), all packages started to be linked with -lc++abi. When
cross compiling, the libcxxabi path seemingly needs to be passed to the
the libtapi derivation; it won't pick it up on its own (perhaps because
of the bootstrapping?).
@impl impl changed the title libtapi: update for cross-compilation darwin.libtapi: update for cross-compilation Sep 8, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 8, 2022
@impl impl requested a review from thefloweringash September 8, 2022 05:37
@impl impl added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Sep 8, 2022
@impl impl requested a review from matthewbauer September 8, 2022 05:54
@bobby285271 bobby285271 added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 19, 2022
@toonn
Copy link
Contributor

toonn commented Sep 20, 2022

Is there an easy test case for verifying this from x86_64-darwin?

@impl
Copy link
Member Author

impl commented Sep 20, 2022

Is there an easy test case for verifying this from x86_64-darwin?

I think the most immediate dependency is cctools, so you can try building pkgsCross.aarch64-darwin.darwin.cctools to verify. It will fail pretty early in the build of libtapi without the patch in this PR.

Copy link
Contributor

@toonn toonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the build and looks pretty similar to the other native attributes.
LGTM

@toonn
Copy link
Contributor

toonn commented Sep 25, 2022

I accidentally merged this to staging here, 3b8aa21. This means it's gonna be unnecessarily delayed but it'll get to master eventually.

Apologies! Still need to figure out a workflow that'll prevent me making mistakes like this.

@toonn toonn closed this Sep 25, 2022
@impl impl deleted the fix-libtapi-cross branch January 27, 2023 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants