-
Notifications
You must be signed in to change notification settings - Fork 217
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
build issues with nix on macOS Mojave #677
Comments
I just noticed that |
@tscholak: I probably won't be of much help here. The best I can do is to document the development environment I use for OS X which is working for me when doing development on Dhall projects:
|
Some other things I should probably also mention:
|
thank you @Gabriel439! |
@tscholak: Could the issue be that you installed the XCode developer tools? Has anybody tested if uninstalling them fixes the problem? Also, do you have |
both machines (darwin 17.7.0 and 18.0.0) have a global
and both machines have the xcode dev tools installed. the only difference I could find so far is the macOS version |
ok, let's try this again... I've upgraded to multiuser nix on Mojave:
stay tuned... encountered so far:
|
Yeah, I'm familiar with NixOS/nix#2244. That will be trickier to fix because I'm depending on a specific revision of It sounds like this is a Mojave-specific issue, then |
Do we know which versions of We were on 1.15.1, but we can't find the linux binaries anymore so we've gotta upgrade to something newer. 1.15.1 seems to still build on Mojave though. We tried 1.19.1, but on Mojave it gives the failures explained in this issue. |
@joneshf: My understanding is that this only affects things built by Dhall's CI since it uses a very specific version of Nixpkgs to build static executables. Building with If you want to fix Dhall's CI to build it for you then you will need to forward port the static Haskell executables work to work against newer versions of Nixpkgs/Cabal. Specifically, you would need to forward port these two forks of Nixpkgs and Cabal to rebase those sets of changes onto newer versions: Lines 379 to 384 in 0460f28
Lines 459 to 467 in 0460f28
Alternatively, you could politely nudge people to merge the necessary changes to complete the static executables work: |
Oops, sorry for being confusing. Let me provide more information. N.B. Before reading further: we're not really looking for a fix to our situation. We're fine with any version of Dhall (we've been using 1.15.1 for a while now, but that's mostly out of laziness). So don't feel like you have to go out of your way to diagnose or help or anything like that. If you have a fix, great! We'll gladly take help, but it's not expected nor being asked. We use nix on High Sierra and Mojave. When we tried to build 1.19.1 we did something like this: let
dhall = import dhallTarball;
dhallTarball = builtins.fetchTarball {
sha256 = "0fwz1kz9d0ny4209cxwj1zl7hqglxphyfvpf9mcy8c11b9zhdgdv";
url = "https://github.com/dhall-lang/dhall-haskell/archive/1.19.1.tar.gz";
};
nixpkgs = import nixpkgsTarball;
nixpkgsTarball = builtins.fetchTarball {
sha256 = "1ib96has10v5nr6bzf7v8kw7yzww8zanxgw2qi1ll1sbv6kj6zpd";
url = "https://github.com/NixOS/nixpkgs/archive/6a3f5bcb061e1822f50e299f5616a0731636e4e7.tar.gz";
};
in
nixpkgs.mkShell {
buildInputs = [ dhall.dhall ];
} That worked on High Sierra, but failed on Mojave. I have High Sierra, co-worker has Mojave, so I can't validate the failures. But, they mentioned that this issue is what they run into. We can build let
nixpkgs = import nixpkgsTarball;
nixpkgsTarball = builtins.fetchTarball {
sha256 = "1ib96has10v5nr6bzf7v8kw7yzww8zanxgw2qi1ll1sbv6kj6zpd";
url = "https://github.com/NixOS/nixpkgs/archive/6a3f5bcb061e1822f50e299f5616a0731636e4e7.tar.gz";
};
in
nixpkgs.mkShell {
buildInputs = [ nixpkgs.dhall ];
} This gives us 1.15.1. This has worked well for a long time. Recently, we wanted to use I was hoping to figure out which of these versions are affected by the issue laid out here so we could use one that will build on Mojave. If we don't know which versions are affected, that's fine. I figured it was worth asking in case the information was readily available. |
@joneshf: My guess is that this would probably affect all versions that were built using static linking. The reason why is that I believe this is likely an issue with Nixpkgs and Dhall hasn't changed the revision of Nixpkgs that it depends on since static linking was introduced. |
Ah. That makes sense! Thanks! |
You're welcome! 🙂 |
I have a teammate who got bit by this, on both
@Gabriel439 I see that in the interim, If so, would it be possible to update the |
@ari-becker: I tried to update a couple of months ago and ran into this issue: nh2/static-haskell-nix#73 ... but I can try again and see if anything changed since then |
@ari-becker: Yeah, I updated to the latest |
@Gabriel439 I see, thanks for trying again. I guess that my current workaround is to use https://github.com/justinwoo/easy-dhall-nix considering that my use-case only requires the final binaries. I'm not sure why the Darwin binaries aren't being fetched from cache (I verified with my teammate that he does have both the |
@ari-becker: Note that none of the caches contain pre-built Darwin build products. They are currently Linux only |
@Gabriel439 ah, I was under the impression that you were putting the OS X binaries in Cachix, at least? #1666 (comment) |
@ari-becker: Whoops! I forgot about that 🙂 I just uploaded the OS X binaries for 1.31.1 and I'm working on building and uploading them for 1.31.0, too |
Alright, 1.30.0 should be in the cache now Part of the reason I forgot about these is that I run the release script from a Linux machine, so I have to remember to separately build and upload OS X build products |
I just cloned the repo and tried to build it with nix on macOS but to no avail:
Is there a workaround for this other than https://hydra.nixos.org/build/83911384/download/1/nixpkgs/manual.html#builds-on-darwin-fail-with-math.h-not-found? It doesn't seem that this workaround actually works...
The text was updated successfully, but these errors were encountered: