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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

darwin.binutils: properly handle cctools-llvm #297290

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

reckenrode
Copy link
Contributor

Description of changes

  • Only link libexec when using cctools-port. cctools-llvm does not have a libexec folder;
  • Use as provided by cctools-llvm, which is already using the clang-integrated assembler on both platforms; and
  • Clean up inconsistent use of builtins.

This was reported on Matrix. libexec is a dangling symlink, which prevents binutils from being added to home.packages after upgrading to 23.11 with the following error:

darwin-rebuild --flake ~/path-to-flake/ build
building the system configuration...
error: builder for '/nix/store/77pb55j08rfh3lbxxx5v1q7nyih900d3-home-manager-path.drv' failed with exit code 2;
       last 1 log lines:
       > error: not a directory: `/nix/store/8kkn9qqg1mnny41cc8i33ws9ilmxyww1-cctools-binutils-darwin-16.0.6-973.0.1/libexec'
       For full logs, run 'nix log /nix/store/77pb55j08rfh3lbxxx5v1q7nyih900d3-home-manager-path.drv'.
error: 1 dependencies of derivation '/nix/store/cg4axwsiaygf47xa472h50nrp3nl9fm4-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pghcqfradm590s6yvri7n8p1iykal267-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9dnqxmm927zl3mzcfd2a15cmx9wxn6bz-activation-brendan.drv' failed to build
error: 1 dependencies of derivation '/nix/store/30rpflszvj9js6v6isnfxjr9asg39f5l-darwin-system-23.11.20240317.614b461+darwin4.bcc8afd.drv' failed to build

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.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
  • Fits CONTRIBUTING.md.

Add a 馃憤 reaction to pull requests you find important.

- Only link `libexec` when using cctools-port. cctools-llvm does not
  have a `libexec` folder;
- Use `as` provided by cctools-llvm, which is already using the
  clang-integrated assembler on both platforms; and
- Clean up inconsistent use of `builtins`.
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Mar 19, 2024
@reckenrode reckenrode added the backport staging-23.11 Backport PR automatically label Mar 19, 2024
@reckenrode
Copy link
Contributor Author

Adding the backport-staging-23.11 label because this was reported against 23.11.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

change seems fine. nested optionalStrings is unfortunate.

looking over the comments it seems like some of these steps are outdated. not being able to handle movq %rbp, %xmm0 is just weird.

@reckenrode reckenrode merged commit 6ed5743 into NixOS:staging Mar 27, 2024
29 checks passed
@reckenrode reckenrode deleted the binutils-fix branch March 27, 2024 21:21
Copy link
Contributor

Successfully created backport PR for staging-23.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant