hi,

ghc is working for me ; only stack is causing troubles.

i tried the latest upstream stack version with the same problem.

luckily someone pointed me to this thread : https://github.com/commercialhaskell/stack/issues/2712

using this hint made everything work :

"""

It builds in my case
Just adapt the ghc version which has the error (ghc-8.0.01 above or ghc-7.10 in my case:
~/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/settings )

cp settings settings.bak

And change the options as @senorhesles <https://github.com/senorhesles> mentionned previously:
("C compiler flags", "-fno-PIE -fno-stack-protector"),
("C compiler link flags", "-no-pie"),
("ld flags", "-no-pie"),

It builds, yes, but I wonder the effects of adding such options (-no-pie) in long term use. Ok for the hack but how long should we maintain it (mv settings.bak settings) ?

"""

i'm not too sure about upgrading to unstable.

thanks for the suggestion though

Fred

Le 17/11/2016 à 16:36, Ilias Tsitsimpis a écrit :
Hi Frederic,

On Thu, Nov 17, 2016 at 01:35PM, frederic wagner wrote:
I cannot build anything using stack.

to reproduce :

  stack new test simple
  cd test
  stack build

-> gives following output :
[1 of 1] Compiling Main             ( /tmp/stack28309/Setup.hs,
/tmp/stack28309/Setup.o )
Linking 
/home/wagnerf/.stack/setup-exe-cache/x86_64-linux/tmp-setup-Simple-Cabal-1.24.0.0-ghc-8.0.1
...
/usr/bin/ld: /tmp/stack28309/Setup.o: relocation R_X86_64_32S against symbol
`stg_bh_upd_frame_info' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: 
/home/wagnerf/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/Cabal-1.24.0.0/libHSCabal-1.24.0.0.a(Simple__87.o):
relocation R_X86_64_32S against `.text' can not be used when making a shared
object; recompile with -fPIC
Thanks for reporting this.

The above works for me with haskell-stack and ghc both from unstable.
The current version of ghc in testing is known to be broken (see #712228):

   https://bugs.debian.org/712228

Could you give it a try?

Best,


Reply via email to