Skip to content

GHC 8.0-rc1's linker does not work in OSX

Hello! When I try to run cabal install data-default (it is just a very small library) I get the following output using GHC 8.0-rc1:

cabal install data-default
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/<user>/dev/hs/env/default8/.cabal-sandbox
Configuring data-default-class-0.0.1...
Configuring dlist-0.7.1.2...
Configuring old-locale-1.0.0.7...
Failed to install data-default-class-0.0.1
Build log ( /Users/<user>/dev/hs/env/default8/.cabal-sandbox/logs/data-default-class-0.0.1.log ):
Failed to install dlist-0.7.1.2
Build log ( /Users/<user>/dev/hs/env/default8/.cabal-sandbox/logs/dlist-0.7.1.2.log ):
Failed to install old-locale-1.0.0.7
Build log ( /Users/<user>/dev/hs/env/default8/.cabal-sandbox/logs/old-locale-1.0.0.7.log ):
cabal: Error: some packages failed to install:
data-default-0.5.3 depends on old-locale-1.0.0.7 which failed to install.
data-default-class-0.0.1 failed during the configure step. The exception was:
user error ('/opt/ghc/8.0-rc1/bin/ghc' exited with an error:
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
)
data-default-instances-base-0.0.1 depends on data-default-class-0.0.1 which
failed to install.
data-default-instances-containers-0.0.1 depends on data-default-class-0.0.1
which failed to install.
data-default-instances-dlist-0.0.1 depends on dlist-0.7.1.2 which failed to
install.
data-default-instances-old-locale-0.0.1 depends on old-locale-1.0.0.7 which
failed to install.
dlist-0.7.1.2 failed during the configure step. The exception was:
user error ('/opt/ghc/8.0-rc1/bin/ghc' exited with an error:
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
)
old-locale-1.0.0.7 failed during the configure step. The exception was:
user error ('/opt/ghc/8.0-rc1/bin/ghc' exited with an error:
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
)
Trac metadata
Trac field Value
Version 8.0.1-rc1
Type Bug
TypeOfFailure OtherFailure
Priority highest
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information