tweag / HaskellR

The full power of R in Haskell.

Home Page:https://tweag.github.io/HaskellR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem during install

mguzmann opened this issue · comments

I'm in Ubuntu 17.04 and I'm haing

git clone http://github.com/tweag/HaskellR
cd HaskellR
stack build

But I'm getting an error:

-- While building package ihaskell-inline-r-0.1.1.0 using:
/home/matias/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.24.2.0-ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.2.0 build lib:ihaskell-inline-r --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /home/matias/Programas/HaskellR/.stack-work/logs/ihaskell-inline-r-0.1.1.0.log

Configuring ihaskell-inline-r-0.1.1.0...
Preprocessing library ihaskell-inline-r-0.1.1.0...
[1 of 1] Compiling IHaskell.Display.InlineR ( src/IHaskell/Display/InlineR.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/IHaskell/Display/InlineR.o )
/usr/bin/ld: .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/IHaskell/Display/InlineR.dyn_o: relocation R_X86_64_PC32 against symbol `ihaskellzminlinezmrzm0zi1zi1zi0zm6tgfRZZtdHjtK9VgiAqe2rY_IHaskellziDisplayziInlineR_rprint6_closure' can not be used when making a shared object; recompile con -fPIC
/usr/bin/ld: falló el enlace final: Valor erróneo
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)

I tired installing different branches but it didn't seem to help.

Thanks for the report! If you don't need IHaskell then you may chose to disable it. Also I remember problems linking on ubuntu and the simplest solution was to move to gold linker.

https://stackoverflow.com/questions/43243322/how-to-link-with-the-gnu-gold-linker-instead-of-ld-in-haskell#43243323

Meanwhile I will try to get ubuntu image and test HaskellR agains that.

I had a few issues with install, but ultimately I solved it like @qnikst suggested, explicitly:
#305
stack build --ghc-options -optl-fuse-ld=gold

Workarounds for linker issues on some platforms is explained in the FAQ: http://tweag.github.io/HaskellR/docs/faq.html.