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

darwin.darling: fix build on case-insensitive filesystems #110685

Closed
wants to merge 1 commit into from

Conversation

holymonson
Copy link
Contributor

Motivation for this change

Use upstream darlinghq/darling@ea5f07d to fix build on case-insensitive filesystems.
Also update headers in Libsystem due to path modified.

Tested darling but not Libsystem.

cc @veprbl @thefloweringash
fix #91480 #107431

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@holymonson
Copy link
Contributor Author

@GrahamcOfBorg build darwin.Libsystem

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

pkgs/os-specific/darwin/darling/default.nix Outdated Show resolved Hide resolved
@veprbl veprbl added this to WIP in Staging via automation Jan 27, 2021
@holymonson
Copy link
Contributor Author

This breaks stdenv https://gist.github.com/veprbl/f94b093aeaaaf879506432add0422f62

It's because the new os/availability.h updated here conflicted with the old Availability.h in xnu. Now we have 3 options:

  1. You directly review darwin.xnu: update and restructure #110840, which contains both new daring and new xnu, it could build Libsystem from bootstrap. This PR wouldn't be needed anymore.
  2. I cp the new Availability.h from daring temporarily (it contains anyway), get this PR merged, and replace it when darwin.xnu: update and restructure #110840 merged.
  3. I drop the new os/availability.h here, get this PR merged, and update it on darwin.xnu: update and restructure #110840 's commit.

@veprbl which one do you prefer?

@veprbl
Copy link
Member

veprbl commented Jan 27, 2021

I would try to stick to first updating darling if that is possible without breaking anything.

Use upstream darlinghq/darling@ea5f07d to fix build on case-sensitive filesystems.
Also update headers in Libsystem due to path modified.

fix NixOS#91480
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

I think, commit title should state something like "darwin.darling: unstable-2018-02-10 -> unstable-2020-04-26"

os/activity.h
os/log.h
os/trace.h
")
Copy link
Member

Choose a reason for hiding this comment

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

/nix/store/pawa4j5ywf0s0mm1khk8f45qx8qrj49v-Libsystem-1238.60.2-osx-10.12.6/include/os/trace.h:32:10: fatal error: 'os/trace_base.h' file not found
#include <os/trace_base.h>
^~~~~~~~~~~~~~~~~

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is a little complicated, os/trace_base.h required os/availability.h (not the one below, a new one), while the new os/availability.h required new Availability.h in xnu according to #110685 (review) . We have to do it step by step to keep minimal change in each PR.

@veprbl would you review #109368 first? Then I will try making a pure xnu update, then darling.

@stale
Copy link

stale bot commented Jul 30, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 30, 2021
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 30, 2021
@stale
Copy link

stale bot commented Apr 19, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 19, 2022
@wegank wegank closed this Apr 25, 2023
Staging automation moved this from WIP to Done Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants