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

error when building on Mac OS X with nix #80

Open
cdepillabout opened this issue Nov 13, 2018 · 3 comments
Open

error when building on Mac OS X with nix #80

cdepillabout opened this issue Nov 13, 2018 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed high-priority This has a high priority

Comments

@cdepillabout
Copy link
Owner

There is an error when building on Mac OS X with nix-build:

$ nix-build
these derivations will be built:
  /nix/store/i9bshwz2c399kp7l4lx250pbmfmhybwg-gi-gdk-3.0.16.drv
  /nix/store/9jbrqdyyn8pv2sqyq6nji8czrn1asgj4-gi-gtk-3.0.25.drv
  /nix/store/z6avnj4m301v98gz5qalqypbcaw41xdj-gi-vte-2.91.19.drv
  /nix/store/vnwd225s1nqci5rmllq3dfsxqz9zr8mf-termonad-0.2.1.0.drv
  /nix/store/cnjfxi5wqy6afhvqzgf83xmrr51viw4m-ghc-8.4.4-with-packages.drv
  /nix/store/n8n8wpasf3047q269simcf03zx71v7lv-termonad-with-packages-8.4.4.drv
building '/nix/store/i9bshwz2c399kp7l4lx250pbmfmhybwg-gi-gdk-3.0.16.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/dxljd69cp3m5cgfl53h0fjbq202m0fm7-ghc-8.4.4.
unpacking sources
unpacking source archive /nix/store/fab0pd9x1x2w949a33lsl3m1mkbh4890-gi-gdk-3.0.16.tar.gz
source root is gi-gdk-3.0.16
setting SOURCE_DATE_EPOCH to timestamp 1526109557 of file gi-gdk-3.0.16/stack.yaml
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/var/folders/1b/r0tb60rs58jbyrp6fcbhy62h0000gn/T/nix-build-gi-gdk-3.0.16.drv-0/setup-package.conf.d -j12 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /private/var/folders/1b/r0tb60rs58jbyrp6fcbhy62h0000gn/T/nix-build-gi-gdk-3.0.16.drv-0/Main.o )
Linking Setup ...
clang-5.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
/nix/store/l928iaj0m48lfb7dib6h7p22d50l566x-clang-wrapper-5.0.2/bin/cc: line 183: /nix/store/9sczacl37p08kdw7c4a11cm05355088w-clang-5.0.2/bin/clang: Argument list too long
`cc' failed in phase `Linker'. (Exit code: 126)
builder for '/nix/store/i9bshwz2c399kp7l4lx250pbmfmhybwg-gi-gdk-3.0.16.drv' failed with exit code 1
cannot build derivation '/nix/store/cnjfxi5wqy6afhvqzgf83xmrr51viw4m-ghc-8.4.4-with-packages.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/n8n8wpasf3047q269simcf03zx71v7lv-termonad-with-packages-8.4.4.drv': 1 dependencies couldn't be built
error: build of '/nix/store/n8n8wpasf3047q269simcf03zx71v7lv-termonad-with-packages-8.4.4.drv' failed

The line in question is the following:

/nix/store/l928iaj0m48lfb7dib6h7p22d50l566x-clang-wrapper-5.0.2/bin/cc: line 183: /nix/store/9sczacl37p08kdw7c4a11cm05355088w-clang-5.0.2/bin/clang: Argument list too long

I'm pretty sure this is NixOS/nixpkgs#41340.

I tried to work around it by setting strictDeps = true in branch strictDeps-on-haskell-gi-libs-for-mac, commit 7271445, but then Termonad itself couldn't be built.

I also tried to work around this by using the patch from NixOS/nixpkgs#49552 in branch try-using-new-stdenv-builder, commit cc62b39, but something early on in the build process failed.

@cdepillabout cdepillabout added bug Something isn't working help wanted Extra attention is needed high-priority This has a high priority labels Nov 13, 2018
@czifro
Copy link

czifro commented Dec 13, 2020

I'm also having difficulty installing on MacOS:

λ nix-build --show-trace
error: while evaluating 'ghcWithPackages' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/development/haskell-modules/make-package-set.nix:246:23, called from /Users/williamczifro/Developer/workspaces/czifro/repositories/github/software/termonad/.nix-helpers/termonad-with-packages.nix:113:5:
while evaluating 'withPackages' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/development/haskell-modules/make-package-set.nix:116:18, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/development/haskell-modules/make-package-set.nix:246:35:
while evaluating 'callPackageWith' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/customisation.nix:117:35, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/development/haskell-modules/make-package-set.nix:116:28:
while evaluating 'makeOverridable' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/customisation.nix:67:24, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/customisation.nix:121:8:
while evaluating anonymous function at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/development/haskell-modules/with-packages-wrapper.nix:1:1, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/customisation.nix:69:16:
while evaluating 'closePropagation' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:160:22, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/development/haskell-modules/with-packages-wrapper.nix:45:57:
while evaluating 'uniqList' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:91:14, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:160:29:
while evaluating 'go' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:92:18, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:98:8:
while evaluating 'innerClosePropagation' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:143:32, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:160:52:
while evaluating 'innerClosePropagation' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:143:32, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:151:21:
while evaluating 'uniqList' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:91:14, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:153:24:
while evaluating 'go' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:92:18, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/lib/deprecated.nix:98:8:
while evaluating the attribute 'buildInputs' of the derivation 'termonad-4.0.1.1' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/development/haskell-modules/generic-builder.nix:289:3:
while evaluating the attribute 'buildInputs' of the derivation 'vte-0.60.2' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the attribute 'handled' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/stdenv/generic/check-meta.nix:256:7:
while evaluating 'handleEvalIssue' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/stdenv/generic/check-meta.nix:152:38, called from /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/stdenv/generic/check-meta.nix:257:14:
Package ‘systemd-245.6’ in /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/os-specific/linux/systemd/default.nix:303 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

System Info:

λ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.2
BuildVersion:	19C57
λ uname -a
Darwin [***] 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64
λ nix --version
nix (Nix) 2.3.7

@cdepillabout
Copy link
Owner Author

cdepillabout commented Dec 13, 2020

while evaluating the attribute 'buildInputs' of the derivation 'vte-0.60.2' at /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/stdenv/generic/make-derivation.nix:192:11:
...
Package ‘systemd-245.6’ in /nix/store/npjlghv0g29rwiffxi99bqa74ylyq5k1-source/pkgs/os-specific/linux/systemd/default.nix:303 is not supported on ‘x86_64-darwin’, refusing to evaluate.

My guess here is that Termonad depends on the Haskell package gi-vte, which depends on the Gnome package vte (for the actual terminal emulator), which depends on systemd, which can only be built on Linux.

My suggestion is to inspect the derivation for vte and see if there is a way to remove the systemd dependency. vte is pretty widely used, so I wouldn't be surprised if there was a way to remove this.

@cdepillabout
Copy link
Owner Author

In three years, it seems like there has been no interest in getting Termonad working on OSX.

I don't personally use OSX, so I'm thinking about closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed high-priority This has a high priority
Projects
None yet
Development

No branches or pull requests

2 participants