Opened 14 months ago

Last modified 11 months ago

#15494 upstream bug

Cannot install GHC through stack on NixOS

Reported by: Stefanov Owned by:
Priority: normal Milestone: 8.6.1
Component: Compiler Version: 8.4.3
Keywords: install fail, NixOS, Linux Cc:
Operating System: Linux Architecture: arm
Type of failure: Installing GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by osa1)

stack setup gives me this error:

# The .dll case calls STRIP_CMD explicitly, instead of `install -s`, because
# on Win64, "install -s" calls a strip that doesn't understand 64bit binaries.
# For some reason, this means the DLLs end up non-executable, which means
# executables that use them just segfault.


Error: Error encountered while installing GHC with
         make install
         run in /home/stefanov/.stack/programs/x86_64-linux/ghc-8.4.3.temp/ghc-8.4.3/

Possibly a domain-specific problem,caused by NixOS's file management.

Change History (6)

comment:1 Changed 14 months ago by Stefanov

Description: modified (diff)

comment:2 Changed 14 months ago by Stefanov

Description: modified (diff)

comment:3 Changed 14 months ago by Stefanov

Description: modified (diff)

comment:4 Changed 14 months ago by osa1

Description: modified (diff)

comment:5 Changed 14 months ago by bgamari

Status: newupstream

Indeed I strongly suspect that this is due to NixOS's odd filesystem structure. Afterall, GHC has a few dependencies (libc, gmp, and perhaps the iconv executable) which NixOS places in rather odd places. You will likely need to bring this up with either the Stack or NixOS upstreams.

comment:6 Changed 11 months ago by fendor

The problem should be fixable by using stack in nix mode, e.g. stack setup --nix or adding the nix flag in the global project.

E.g.

packages: []

resolver: lts-12.14

nix:

enable: true

Note: See TracTickets for help on using tickets.