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

cargo-watch, stdenv: resolve aarch64-darwin objc redefinition errors #191235

Closed
wants to merge 4 commits into from
Closed

cargo-watch, stdenv: resolve aarch64-darwin objc redefinition errors #191235

wants to merge 4 commits into from

Conversation

tjni
Copy link
Contributor

@tjni tjni commented Sep 14, 2022

Description of changes

Resolve compilation failures related to redefining symbols on aarch64-darwin that have broken builds of cargo-watch, starship, and others.

This includes a revised version of #161561 which no longer breaks xcbuild and will resolve #163052.

As a whole, these two commits are extracted from a part of the excellent work done in #189977 and resolves #189687 (at least, the errors that result from it) and #146349.

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.

@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Sep 14, 2022
@tjni tjni changed the title Aarch64 redefinition errors cargo-watch, stdenv: resolve aarch64-darwin objc redefinition errors Sep 14, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 501+ 10.rebuild-darwin: 1001-2500 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 14, 2022
@tjni tjni requested a review from toonn September 15, 2022 01:02
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.

This looks pretty good to me but I want to make sure I understand what's going on.

@tjni, since this work really comes from @stephank, can you set him as author on the commits?

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Sep 16, 2022
@tjni tjni requested a review from Ericson2314 as a code owner September 19, 2022 18:10
stephank and others added 4 commits September 19, 2022 16:59
Stdenv on aarch64-darwin pulls in (bootstrap-stage4) objc4, unlike
x86_64. However derivations that otherwise depend on objc4 would use a
a different objc4 derivation on top of the final stdenv.

Because this library defines an LLVM module, having multiple instances
of it in the import path will interfere with builds.
There is context here that I needed when resolving an issue in which
libc was added to NIX_CFLAGS_COMPILE before the C++ stdlib that took
me awhile to understand.

It was suggested to me that this context be included as a comment,
since it is not obvious and could help others in the future.
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux-stdenv This PR causes stdenv to rebuild 10.rebuild-darwin: 5001+ 10.rebuild-linux: 501+ 10.rebuild-linux: 5001+ and removed 10.rebuild-darwin: 1001-2500 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 20, 2022
@toonn
Copy link
Contributor

toonn commented Sep 20, 2022

Staging moved under me while merging so I did a pull --rebase neglecting the fact that rewrites commits : s

So this is merged here, c319d8a and lesson learned to be more careful next time.

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

Successfully merging this pull request may close these issues.

3 participants