Skip to content

treewide: remove references to deprecated darwin.Libsystem stub#400424

Merged
emilazy merged 5 commits intoNixOS:stagingfrom
emilazy:push-qzkzvwtzzott
Apr 22, 2025
Merged

treewide: remove references to deprecated darwin.Libsystem stub#400424
emilazy merged 5 commits intoNixOS:stagingfrom
emilazy:push-qzkzvwtzzott

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Apr 21, 2025

25.05 Darwin clean‐up, part n of ∞.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Apr 21, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 21, 2025
emilazy added 5 commits April 21, 2025 01:50
There is still a remaining warning:

    ld: warning: object file (/nix/store/mn46c4sb8qcjmw6iy1dh9rivk8i8kg5d-ponyc-0.58.6/lib/pony/0.58.6/lib/native/libponyrt.a(except_try_catch.o)) was built for newer macOS version (15.0) than being linked (13.0)

but I suspect that might have to do with our toolchain’s target
triple or something and anyway I’ve spent more time on this than
I wanted to already. The package was broken beforehand so this is
an improvement.
That code path is only used for 32‐bit Darwin.
@emilazy emilazy force-pushed the push-qzkzvwtzzott branch from 03cac87 to 606076e Compare April 21, 2025 00:50
@numinit
Copy link
Contributor

numinit commented Apr 21, 2025

The changes to ponyc and ovftool look fine to me. I don't think the latest PRs to those packages change things with those.

# Locate standard headers like <unistd.h>
substituteInPlace base/runtime/config/gen-posix-names.sh \
--replace "\$SDK_PATH/usr" "${Libsystem}"
'';
Copy link
Contributor

Choose a reason for hiding this comment

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

This substitution is definitely necessary on MacOS, are you able to replace Libsystem with darwin.Libsystem or whatever the non-deprecated value is?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don’t think it is necessary. If you look at the source, it only applies to what they call x86-darwin, which to my understanding is the 32‐bit i686-darwin platform that we no longer support in Nixpkgs at all. The amd64-darwin path does XCODE_SDK_PATH=`xcrun --show-sdk-path`, which is exactly the correct thing to do, both with the native Apple toolchain and with the new Nixpkgs Darwin SDK pattern. I checked other parts of the build system too, and it seemed like they should all do the right thing on x86_64-darwin.

Note that darwin.Libsystem has been an empty stub package since 24.11, so insofar as this was necessary it would have been broken for an entire release cycle already.

Copy link
Contributor

Choose a reason for hiding this comment

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

You’re right — it does work without the patch.

Copy link
Contributor

@Skyb0rg007 Skyb0rg007 left a comment

Choose a reason for hiding this comment

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

Works on a friend’s Mac machine — all good from me

@emilazy
Copy link
Member Author

emilazy commented Apr 22, 2025

Thanks!

@emilazy emilazy merged commit 13bfe7d into NixOS:staging Apr 22, 2025
27 checks passed
@emilazy emilazy deleted the push-qzkzvwtzzott branch April 22, 2025 18:49
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: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 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