Closed korayal closed 7 years ago
adding cc-options: -fPIC
to the cabal file seems to fix the issue on my end. But I'm not sure if it'll cause any problems on older versions of GCC.
I cannot reproduce the problem in Debian Stable (jessie) - with stack 1.2.0 or from master - but I have exactly the same problem in Debian Unstable (sid) running stack from master (cannot test with stack 1.2.0).
Setting cc-options: -fPIC
also worked for me.
The problem seems restricted to stack snapshots using GHC 8.0.1 (>= lts-7.0 || >= nightly-2016-05-26).
Possibly related to commercialhaskell/stack#2712.
Package digest
seems to suffer from the exactly same problem. I bet there are other packages...
Not sure where this should be fixed.
So should I just add that cc-options: -fPIC
to clock.cabal
now?
Considering that there are other packages displaying the same problem, I would wait until the cause is clearer before changing anything, @cetinsert. Maybe this has to be fixed elsewhere.
This issue seems to be fixed when this specific version is used instead of previous GHC 8.0.1 versions:
http://downloads.haskell.org/~ghc/8.0.2-rc1/ghc-8.0.1.20161117-x86_64-deb8-linux.tar.xz
Hi, we have hit this recently when building the clock package for hledger on Arch Linux. Does anyone know the cause/proper fix for it ?
PS, using ghc 8.0.2. Issue: https://github.com/simonmichael/hledger/issues/668
@simonmichael so is this fixed with -no-pie
?
Yes, apparently.
It seems I can't build this project using Stackage LTS 7.4, which causes me to fail building other projects that use this specific library (Tasty). Here is what I did:
stack init
stack build