You are not logged in.

#1 2017-06-25 21:56:59

calummurray
Member
Registered: 2017-06-25
Posts: 2

[Solved] GHC linker error

Hi All,

I recently installed GHC and all other Haskell-related packages (as suggested on the wiki here ) via pacman.

Apparently I should immediately be able to write a "hello world" program and compile it with ghc Main.hs, but it produces the following linker error:

Linking Main ...
/usr/bin/ld: cannot find -lHSbase-4.9.1.0
/usr/bin/ld: cannot find -lHSinteger-gmp-1.0.0.1
/usr/bin/ld: cannot find -lHSghc-prim-0.5.0.0
/usr/bin/ld: cannot find -lHSrts
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)

I noticed that these libraries are all found in /usr/lib/ghc-8.0.2/... but they all have "-ghc-8.0.2" appended to their names (e.g. libHSbase-4.9.1.0.so is actually named libHSbase-4.9.0.1-ghc8.0.2.so).  When I removed the "-ghc8.0.2" suffix the library linked correctly. 

Has anyone seen this before? Did I miss some installation/configuration step? There were no installation errors in the pacman logs.

Last edited by calummurray (2017-06-26 17:48:14)

Offline

#2 2017-06-25 22:45:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] GHC linker error


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-06-25 23:03:32

calummurray
Member
Registered: 2017-06-25
Posts: 2

Re: [Solved] GHC linker error

Good find, thank you.

Thought this might be a bug but didn't come across that while searching.

Offline

#4 2017-06-25 23:27:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] GHC linker error

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB