[Haskell-cafe] Haskell 6.6 problem

Donald Bruce Stewart dons at cse.unsw.edu.au
Mon Mar 5 01:31:28 EST 2007

> make and make install of ghc 6.6 completed successfully,
> but exe generated by ghc fails to load.
> ===test.hs===
> main :: IO()
> main =	putStr "This is a test\n"
> =============
> ghc test.hs 
> compilation IS NOT required
> /usr/bin/ld: cannot find -lgmp
> collect2: ld returned 1 exit status
> Is there a simple way to fix this?

that's a missing argument to ld to tell it to look in /usr/local for
openbsd libs. 


under wherever you installed ghc 6.6.  and add:


to this ldOptions field. So it looks like this:

    ..., ldOptions = ["-L/usr/local/lib","-u","base_GHCziBase_Izh_static_info", ...

that should ensure libgmp if always found by the linker.

-- Don

More information about the Haskell-Cafe mailing list