Skip to content

ld64: disable hardening again - #536365

Merged
reckenrode merged 49 commits into
NixOS:staging-nextfrom
emilazy:push-woovtrnymyyu
Jul 15, 2026
Merged

reckenrode merged 49 commits into
NixOS:staging-nextfrom
emilazy:push-woovtrnymyyu

Conversation

@emilazy

@emilazy emilazy commented Jun 28, 2026

Copy link
Copy Markdown
Member

Following up on #536363.

Things done

nixpkgs-branch-check[bot]

This comment was marked as outdated.

@emilazy
emilazy force-pushed the push-woovtrnymyyu branch from a14b650 to cd8d047 Compare June 28, 2026 16:55
@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: python Python is a high-level, general-purpose programming language. labels Jun 28, 2026
Comment on lines +141 to +143
# ld built with this fails to link glib's gio
hardeningDisable = [ "libcxxhardeningfast" ];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can confirm this allows ld to link Glib and my Swift work again.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Once this is ready, LGTM.

@emilazy

emilazy commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

(Reopening just to make the commits view less confusing, will do all the new reverts once things settle down.)

@emilazy emilazy closed this Jul 3, 2026
@emilazy emilazy reopened this Jul 3, 2026
@nixpkgs-branch-check
nixpkgs-branch-check Bot dismissed their stale review July 3, 2026 16:53

Review dismissed automatically

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: python Python is a high-level, general-purpose programming language. labels Jul 3, 2026
@sempiternal-aurora

sempiternal-aurora commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Things to revert:

@al3xtjames al3xtjames mentioned this pull request Jul 11, 2026
5 of 13 tasks
mnixry added a commit to mnixry/nixpkgs that referenced this pull request Jul 11, 2026
Work around the Darwin ld64 libc++ hardening issue by linking starship with LLVM lld on Darwin. This follows the temporary mitigation pattern used by other affected Darwin packages while NixOS#536365 is pending.

This keeps the default notify feature enabled; only the Darwin linker is changed.

Assisted-by: OpenAI Codex (GPT-5.5)
eclairevoyant pushed a commit to feel-co/fp that referenced this pull request Jul 11, 2026
Work around the Darwin ld64 libc++ hardening issue by linking starship with LLVM lld on Darwin. This follows the temporary mitigation pattern used by other affected Darwin packages while NixOS#536365 is pending.

This keeps the default notify feature enabled; only the Darwin linker is changed.

Assisted-by: OpenAI Codex (GPT-5.5)
@n8henrie n8henrie mentioned this pull request Jul 11, 2026
4 tasks done
@eclairevoyant

This comment was marked as resolved.

kriswill added a commit to kriswill/dotfiles that referenced this pull request Jul 11, 2026
The pinned nixpkgs' cctools ld64 1010.6 crashes (Trace/BPT trap: 5)
linking kitty 0.47.4, vfkit 0.6.3, and starship 1.26.0 on
aarch64-darwin; hydra has no cache entries for them, so every darwin
rebuild fails. The root fix is on staging (NixOS/nixpkgs#536365); this
replicates master's per-package -fuse-ld=lld workarounds (83cc719d53,
559ebc0633, 883e799eb2) byte-identically, so kitty and vfkit hash-match
hydra's builds and come from cache instead of compiling. Inert on Linux
(empty overlay set); nebula cross-eval verified.

DELETE the overlay and its modules/overlays.nix line at the first
flake.lock bump that builds all three without it.

@reckenrode reckenrode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let’s merge this thing.

@reckenrode
reckenrode added this pull request to the merge queue Jul 15, 2026
Merged via the queue into NixOS:staging-next with commit 24de2af Jul 15, 2026
40 of 41 checks passed
@emilazy
emilazy deleted the push-woovtrnymyyu branch July 15, 2026 03:35
zhaofengli pushed a commit to zhaofengli/nixpkgs that referenced this pull request Jul 16, 2026
Work around the Darwin ld64 libc++ hardening issue by linking starship with LLVM lld on Darwin. This follows the temporary mitigation pattern used by other affected Darwin packages while NixOS#536365 is pending.

This keeps the default notify feature enabled; only the Darwin linker is changed.

Assisted-by: OpenAI Codex (GPT-5.5)
@agarmu agarmu mentioned this pull request Jul 17, 2026
5 of 13 tasks
@cpick cpick mentioned this pull request Jul 17, 2026
4 tasks done
MacroPower added a commit to MacroPower/dotfiles that referenced this pull request Jul 20, 2026
nixpkgs' classic open-source ld64 (cctools 1010.6) crashes with
Trace/BPT trap: 5 in its stubs pass when linking the
mac-notification-sys Objective-C object that notify-rust pulls in.
Both workmux and czkawka's GUI binaries link that crate. Use LLVM
ld64.lld on darwin instead, mirroring nixpkgs' starship workaround
(NixOS/nixpkgs#540463). Drop once the cctools fix
(NixOS/nixpkgs#536365) reaches our pin.
@zowoq

zowoq commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Some more reverts in #544048 and #544049.

@zowoq zowoq mentioned this pull request Jul 21, 2026
2 of 13 tasks
@KristijanZic KristijanZic mentioned this pull request Jul 21, 2026
4 tasks done
eveeifyeve added a commit to eveeifyeve/nix-config that referenced this pull request Jul 22, 2026
This is probably related to
NixOS/nixpkgs#536365.

Error:
/nix/store/pnd38c1w69ajjfmpsajbz7i72jd2i62v-cctools-binutils-darwin-wrapper-1010.6/bin/ld:
line 292: 84648 Trace/BPT trap: 5
/nix/store/zhb8xrwn0mp0xk3argfbh8w73c4cipqs-cctools-
binutils-darwin-1010.6/bin/ld "@$responseFile"
clang++: error: linker command failed with exit code 133 (use -v to see
invocation)
Mic92 added a commit to numtide/llm-agents.nix that referenced this pull request Jul 26, 2026
nixpkgs-unstable now ships a gtk4 4.22.4 that builds on darwin and an
ld64 with hardening disabled again (NixOS/nixpkgs#536365), so the
gitbutler broken marker and the lld linker workaround for
mac-notification-sys (NixOS/nixpkgs#540450) are no longer needed.
Verified aarch64-darwin builds of all three packages.

Fixes #6713
Partially addresses #6712 (bernstein otel test workaround still needed
with opentelemetry-exporter-otlp-proto-grpc 1.43.0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: R R is a programming language for statistical computing and data visualization. 6.topic: vim Advanced text editor 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.