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

Build error in macOS 11 #639

Open
tkx68 opened this issue Dec 19, 2020 · 11 comments
Open

Build error in macOS 11 #639

tkx68 opened this issue Dec 19, 2020 · 11 comments

Comments

@tkx68
Copy link

tkx68 commented Dec 19, 2020

Describe the bug
I get the following build error after following the getting started instructions:

tkx@Torstens-MBP-3 [18:28:27] [~/devel/miso/sample-app] [master]
-> % nix-build 
these derivations will be built:
  /nix/store/h0s3aagn5ry0c8i21c82zkk07rnf0zgd-miso-1.6.0.0.drv
  /nix/store/4afismzhx4arim5mk95rm3kydbl9cps5-app-0.1.0.0.drv
building '/nix/store/h0s3aagn5ry0c8i21c82zkk07rnf0zgd-miso-1.6.0.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/938hj0i46icly476hfdg7yic1j10xk65-ghcjs-8.6.0.1.
unpacking sources
unpacking source archive /nix/store/9v9cz7r5fi291n6y3ss7mm4phjfkhnjr-6rkh6h6n36kc035fd6gs99rp51c01rww-source
source root is 6rkh6h6n36kc035fd6gs99rp51c01rww-source
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-miso-1.6.0.0.drv-0/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /private/tmp/nix-build-miso-1.6.0.0.drv-0/Main.o )
Linking Setup ...
ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
`cc' failed in phase `Linker'. (Exit code: 1)
builder for '/nix/store/h0s3aagn5ry0c8i21c82zkk07rnf0zgd-miso-1.6.0.0.drv' failed with exit code 1
cannot build derivation '/nix/store/4afismzhx4arim5mk95rm3kydbl9cps5-app-0.1.0.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/4afismzhx4arim5mk95rm3kydbl9cps5-app-0.1.0.0.drv' failed

Desktop (please complete the following information):

  • OS: macOS 11.1
  • Browser NA
  • Version: current
@dmjio
Copy link
Owner

dmjio commented Dec 24, 2020

@tkx68 I believe this to be a bug with nix and MacOS that indirectly affects miso. Will triage with the nixpkgs issue tracker to see what solutions they've come up with.

@elland
Copy link

elland commented Feb 27, 2021

Seems to be still an issue. Checking over at NixOS, it looks like they've "solved it", but I'm still not able to build either. Any news on this front?

@yobson
Copy link

yobson commented Apr 17, 2021

Also not working for me. I tried updating to the newest release in default.nix but same error.

@nicu-chiciuc
Copy link

I'm having the same error

@georgefst
Copy link
Contributor

This is fixed by NixOS/nixpkgs#98541, which is included in the latest stable release, 21.05. So Miso needs to bump its Nixpkgs version.

@dmjio
Copy link
Owner

dmjio commented Jul 16, 2021

@georgefst I would upgrade, but they've removed ghcjs from nixpkgs for some reason.

nix-repl> lib.version
"21.11pre302194.91ffffd9040"

nix-repl> haskell.compiler.      
haskell.compiler.ghc8102Binary         haskell.compiler.ghc884                haskell.compiler.native-bignum
haskell.compiler.ghc8102BinaryMinimal  haskell.compiler.ghc901
haskell.compiler.ghc8104               haskell.compiler.ghcHEAD
haskell.compiler.ghc865Binary          haskell.compiler.integer-simple

@georgefst
Copy link
Contributor

Ah, that's a pretty big issue. @cdepillabout, any idea why that is?

@cdepillabout
Copy link

they've removed ghcjs from nixpkgs for some reason

I can't find where we originally had this discussion, but if I remember correctly, ghcjs stopped building in nixpkgs at some point. None of the maintainers on the Haskell team in Nixpkgs use ghcjs or know anything about it, so we just left it broken (or possibly just completely removed it). There are also no users that actively send fixes

If you (or anyone else) is interested in ghcjs being available in Nixpkgs, we'd almost certainly accept PRs getting it working again. Especially if you're willing to become a maintainer for it and fix it whenever it breaks. We would of course be willing to help you with any Nix/Nixpkgs-related questions you had.

@dmjio
Copy link
Owner

dmjio commented Jul 17, 2021

None of the maintainers on the Haskell team in Nixpkgs use ghcjs or know anything about it

@Sonarpulse used to maintain it, I believe, and I know a lot of folks at Obsidian use GHCJS still. I have maintained GHCs on nixpkgs before, like HaLVM, but it was also removed for some reason.

It seems all development has gone towards https://github.com/input-output-hk/haskell.nix, IOHK is a huge contributor to nixpkgs and they actively maintain GHCJS, and fund its development.

cc @cdepillabout

@georgefst
Copy link
Contributor

Anyone got any progress here?

GHCJS not being in Nixpkgs is a huge issue for Miso, given that it's the recommended installation method.

@cdepillabout
Copy link

GHCJS was recently added back to Nixpkgs by Obsidian: NixOS/nixpkgs#137066

There are a few other related PRs since that one if you search for GHCJS: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+label%3A%226.topic%3A+haskell%22+ghcjs+is%3Aclosed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants