Skip to content

darwin.adv_cmds: fix build with clang 16#243540

Merged
Artturin merged 1 commit intoNixOS:stagingfrom
reckenrode:adv_cmds-clang2
Aug 1, 2023
Merged

darwin.adv_cmds: fix build with clang 16#243540
Artturin merged 1 commit intoNixOS:stagingfrom
reckenrode:adv_cmds-clang2

Conversation

@reckenrode
Copy link
Copy Markdown
Contributor

Description of changes

darwin.Libc conflicts with libc++ 16. adv_cmds only needs msgcat.h, so symlink it into the build from Libc instead of adding the whole thing to buildInputs.

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/)
  • 23.11 Release Notes (or backporting 23.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
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jul 14, 2023
@tjni
Copy link
Copy Markdown
Contributor

tjni commented Jul 14, 2023

Is it possible to create a derivation that picks out msgcat.h and use it in buildInputs? It's more machinery but I like it as it's more explicit (although I am not sure how the file gets into the gencat directory).

@ofborg ofborg bot requested a review from matthewbauer July 14, 2023 21:48
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 14, 2023
@reckenrode
Copy link
Copy Markdown
Contributor Author

Is it possible to create a derivation that picks out msgcat.h and use it in buildInputs? It's more machinery but I like it as it's more explicit.

A derivation local to darwin.adv_cmds?

although I am not sure how the file gets into the gencat directory

The file doesn’t need to be there. It’s just that it can be found when putting it there, so that was an easy solution.

@tjni
Copy link
Copy Markdown
Contributor

tjni commented Jul 14, 2023

A derivation local to darwin.adv_cmds?

Yeah, a tiny one hidden away that plucks out (by linking or copying) just the file that we want.

darwin.Libc conflicts with libc++ 16. adv_cmds only needs `msgcat.h`, so
provide only that in `buildInputs` instead of all of Libc.
@reckenrode
Copy link
Copy Markdown
Contributor Author

Yeah, a tiny one hidden away that plucks out (by linking or copying) just the file that we want.

I pushed an updated commit taking that approach.

@Artturin Artturin merged commit f42617f into NixOS:staging Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants