Nixpkgs: macOS 10.14 Mojave

Created on 28 Jun 2018  Â·  24Comments  Â·  Source: NixOS/nixpkgs

Ok, here comes:

› nix
dyld: Library not loaded: /usr/lib/system/libsystem_network.dylib
  Referenced from: /nix/store/12yshvbpz9hjn7khzzf0ar67kaw6g7f7-Libsystem-osx-10.11.6/lib/libSystem.B.dylib
  Reason: image not found
zsh: abort      nix

As far as I can tell, this happens to any nix-built binary.

I’ll try to look into it later today and will keep you updated.

@LnL7 @copumpkin @matthewbauer @dhess

darwin

Most helpful comment

Ok, I have rebuilt my entire system from this commit and everything seems to work. Would be nice if we could get this thing moving and have a cache. @LnL7

All 24 comments

Oh ok, I found NixOS/nix#2244 (I think that here is a more appropriate place for this issue).
Cool thing that the other one already has the tarball I was about to build :).

The tarball works.

Ok, I have rebuilt my entire system from this commit and everything seems to work. Would be nice if we could get this thing moving and have a cache. @LnL7

The only issue I have encountered so far is this during the linking of Setup.hs when building stack:

/nix/store/rx9pn9766x6w2xqm1gnwm0sfddflmdk1-clang-wrapper-5.0.2/bin/cc: line 183: /nix/store/d6jmw4m66b23ka02ir5y0f5p33adg27i-clang-5.0.2/bin/clang: Argument list too long

but I am not sure if this is specifically related to Mojave or comes from some other changes in master.

@kirelagin You probably where not planning to rebuild the world, thank you very much for testing the change! I will look at the bootstrap tarball and build one this weekend. With that we should have compatibility in nixpkgs pretty soon.

Stack is unrelated https://hydra.nixos.org/build/76556895, see https://github.com/NixOS/nixpkgs/issues/42107#issuecomment-398263222

You probably where not planning to rebuild the world

Well I can’t say that I wasn’t, because as I was pressing the “Install” button I suspected that something like this could happen, so when it happened I was not too shocked 🤷‍♂️.

What’s the strategy for handling different versions of macOS without breaking compatibility? I think this deleted library is needed on Sierra, isn’t it?

This change shouldn't impact compatibility, this only changes the Libsystem shim we use to hide new symbols that might not be available on older versions (Libsystem is impure). Removing symbols or system libraries in that list generally works fine everywhere and if there is a problem it's usually only in a few packages.

Thanks @LnL7

Do we have a work around landed somewhere? I'm happy to install latest Mojave public beta and give things a test if there are instructions somewhere.

FTR I have just upgraded to public beta 2 and things are still working.

dyld: Symbol not found: ___CFObjCIsCollectable
  Referenced from: /nix/store/755gx21fb43rrvgmb88smbgagmdnlmmw-libsecurity_utilities-osx-10.7.5/lib/libsecurity_utilities.0.dylib
  Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 in /nix/store/755gx21fb43rrvgmb88smbgagmdnlmmw-libsecurity_utilities-osx-10.7.5/lib/libsecurity_utilities.0.dylib

🤔

What's the status of this? Does @LnL7's fix work, and if so, could be it be pulled in here?

(For reference, I am hitting this in the context of trying to execute curl https://nixos.org/nix/install | sh to install Nix on my Mojave system. If there is a workaround in the mean time, that would also be welcome!)

The status is that the fix has just been merged to staging from #43140, which wasn’t referenced here for some reason.

Oooh, @kirelagin, progress!

Am I right in thinking though, that this will need to be merged to master, and then wait further to be merged to something like unstable, before the https://nixos.org/nix/install will actually pick it up?

This is a 2 step process:

  1. Once the changes from staging end up in master you can use nixpkgs without building everything on your own, since compatible binary caches will be available (I will consider this issue closed at that point)
  2. A new stable nix version will need to be released, built using these changes only then will the official installer work (see https://github.com/NixOS/nix/issues/2244)

Until then you'll need to build your own installer tarball or bootstrap nix in some other way.

Ah, ok, thanks. I don't know how to spin my own tarball, so I think I'll need to wait until things calm down. Hopefully won't be too too long!

Oh! Awesome.

So, sorry for being obtuse: is the correct thing to do to take a copy of https://nixos.org/nix/install, and then modify its line url="https://nixos.org/releases/nix/nix-2.0.4/nix-2.0.4-$system.tar.bz2" into url="https://files.daiderd.com/tmp/nix-2.0.4pre6073_9dc0af1-x86_64-darwin.tar.bz2" and then execute as normal?

If you look at the installer script you'll see that it doesn't really do anything except unpack the tarball and execute the actual installer that's in there.

Oh, perfect. Thanks!! I'll poke around from there.

@vcunat, this fixes building from master for existing installations, but doesn't fix the Nix installer itself, is that right? Should there be a separate issue for that?

There is, in the nix repo.

Oof. I am firing on all cylinders here.

_I just merged staging-next to master or something like that; I don't really know anything about this issue._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

domenkozar picture domenkozar  Â·  3Comments

tomberek picture tomberek  Â·  3Comments

lverns picture lverns  Â·  3Comments

ob7 picture ob7  Â·  3Comments

ayyess picture ayyess  Â·  3Comments