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

Apple SDK: bump to 10.12 #37403

Closed
wants to merge 6 commits into from
Closed

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Mar 20, 2018

Motivation for this change

Lots of things are requiring 10.12 nowadays. Seems like a good idea to update now.

Related to #35322 and https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00577.html.

/cc @NixOS/darwin-maintainers

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pbzx

Partial log (click to expand)

building
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/q0mh5f5kknx83kz55k433qb4diyas2h1-pbzx-1.0.2
shrinking /nix/store/q0mh5f5kknx83kz55k433qb4diyas2h1-pbzx-1.0.2/bin/pbzx
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/q0mh5f5kknx83kz55k433qb4diyas2h1-pbzx-1.0.2/bin
patching script interpreter paths in /nix/store/q0mh5f5kknx83kz55k433qb4diyas2h1-pbzx-1.0.2
checking for references to /build in /nix/store/q0mh5f5kknx83kz55k433qb4diyas2h1-pbzx-1.0.2...
/nix/store/q0mh5f5kknx83kz55k433qb4diyas2h1-pbzx-1.0.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pbzx

Partial log (click to expand)

building
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/9jrxag340gkh1w9pnzr039f55b7y56ar-pbzx-1.0.2
shrinking /nix/store/9jrxag340gkh1w9pnzr039f55b7y56ar-pbzx-1.0.2/bin/pbzx
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/9jrxag340gkh1w9pnzr039f55b7y56ar-pbzx-1.0.2/bin
patching script interpreter paths in /nix/store/9jrxag340gkh1w9pnzr039f55b7y56ar-pbzx-1.0.2
checking for references to /build in /nix/store/9jrxag340gkh1w9pnzr039f55b7y56ar-pbzx-1.0.2...
/nix/store/9jrxag340gkh1w9pnzr039f55b7y56ar-pbzx-1.0.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: pbzx

Partial log (click to expand)

patching sources
configuring
no configure script, doing nothing
building
installing
post-installation fixup
strip is /nix/store/vb6mgjqgd9h11nbv60fvrp1ls9nxck2y-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/wy1zyd4b3bxcz8h6q07skszfidxbz7ld-pbzx-1.0.2/bin
patching script interpreter paths in /nix/store/wy1zyd4b3bxcz8h6q07skszfidxbz7ld-pbzx-1.0.2
/nix/store/wy1zyd4b3bxcz8h6q07skszfidxbz7ld-pbzx-1.0.2

@matthewbauer
Copy link
Member Author

Oops looks like we'll need to bump apple-source-releases as well.

@copumpkin
Copy link
Member

Last time I tried to even take it to 10.11 we failed because our CF was too old (and really painful to update), and lots of apple headers use CF macros that aren't in our release. Has that changed somehow?

@matthewbauer
Copy link
Member Author

We have this now:

https://github.com/apple/swift-corelibs-foundation/tree/master/CoreFoundation

But I was actually hoping we could get away with updating the SDK without actually touching the stdenv- is that possible?

@copumpkin
Copy link
Member

Not as far as I know 😦

Also, that swift-corelibs-foundation is something I put a lot of effort against but unfortunately it's also not a drop-in replacement unless something's changed in the past few months. The issue is that their default build produces a static library (I might have even put a package up for it on nixpkgs) but it delegates allocation out to the swift allocator, and doesn't seem to make it easy to plug in a different allocator. So it's the spiritual successor to the CF opensource releases (and actually includes more functionality than they did), but also assumes a bit of Swift runtime which I'm reluctant to bundle into our bootstrap.

@LnL7
Copy link
Member

LnL7 commented Mar 20, 2018

I also tried this a while back and ran into issues with CF, the impure version should only be used is a last resort.
What I did think about is the idea of providing the 10.11 or 10.12 frameworks next the the current ones.

@matthewbauer
Copy link
Member Author

What I did think about is the idea of providing the 10.11 or 10.12 frameworks next the the current ones.

Frameworks should be backwards compatible, though right? Some of the 10.11/10.12 frameworks break occasionally because of incompatibilities with libSystem headers (trying to fix with 6c12e54). Still waiting for stdenv to build but I suspect I'll run into problems soon with the out of date CoreFoundation though (but maybe there haven't been any breaking changes since 1153.18).

@matthewbauer matthewbauer removed this from the 18.09 milestone Mar 20, 2018
@LnL7
Copy link
Member

LnL7 commented Mar 20, 2018

Not necessarily, I couldn't build anything useful with CF 10.10 and 10.11 frameworks. It might be possible but I'm guessing that requires reshuffling some stuff in the stdenv to make the distinction between the pure/impure CF more clear, currently it's included implicitly IIRC.

@copumpkin
Copy link
Member

The implicit include might have been a bad call, TBC. It's just that so much stuff just assumes it exists if you're on macOS (even plain unixy tools often) that the number of conditionals got ridiculous.

@@ -225,7 +221,8 @@ in rec {

bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix {
inherit frameworks libs;
inherit (pkgs.darwin) CF cf-private libobjc;
inherit (pkgs.darwin) cf-private libobjc;
CF = CoreFoundation;
Copy link
Member Author

Choose a reason for hiding this comment

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

@copumpkin @LnL7
How do you all feel about this? It gives an "impure" CF to already impure frameworks. This should improve our support for these frameworks, at the expense of less purity in our CF.

I'll probably just leave it here for now with the hope being that Apple updates CF in the next year or so.

@matthewbauer
Copy link
Member Author

Closing for now because this definitely looks like a dead end.

@copumpkin
Copy link
Member

Sorry, hope it's not because I haven't been able to pay much attention to it. I've been quite busy! In principle I want this to happen but can't really think through the implications of doing the CF substitution you're proposing right now 😦

@matthewbauer
Copy link
Member Author

No problem. The biggest problem is that even after doing "impure" CF we still have out of date Libsystem, etc.

@periklis
Copy link
Contributor

Actually i see we are using Libsystem-1226.10.1 for the headers and apple open source releases provides 1238.60.2 on macOS 10.12 and 1252 on macOS 10.13. Maybe we can give it another try with Impure-CF?
AFAIK CF-Releases are 3 macOS-Releases delayed, i wouldn't hope here anymore.

@Kaali
Copy link

Kaali commented Aug 5, 2018

I'm playing around with updating macOS 10.12 packages on top of @matthewbauer 's branch. Fixed a couple of builds so far. Compiling has been going on for a while. Is this an approach that could even work? CF is still missing from the open source release. I pinged Apple about it.

@Kaali
Copy link

Kaali commented Aug 5, 2018

Ended up getting stuck with the new configd. It tries to include files from macOS SDK. And if I try to depend on apple-sdk.sdk.out I get an infinite recursion error. Any tips on how to debug it?

@copumpkin
Copy link
Member

Now that I have a sorta working new CF, I'm going to try to get this integrated. I'd rather the commit that enables it (and in some ways also depends on this change) be atomic though, so I'll give you credit in the commit message @matthewbauer but probably won't preserve the commit itself

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

6 participants