
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? Thanks.

On Mar 5, 2007, at 1:22 , Dave Feustel wrote:
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?
You failed to mention the platform you're on, but at a guess you are missing the libgmp and/or libgmp-dev(el) package(s) for your platform. -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

dfeustel:
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. Edit: ~/lib/ghc-6.6/package.conf under wherever you installed ghc 6.6. and add: "-L/usr/local/lib" 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
participants (3)
-
Brandon S. Allbery KF8NH
-
Dave Feustel
-
dons@cse.unsw.edu.au