[GHC] #957: Build failure in Cabal/cabal-setup: -lgmp doesn't honor LDFLAGS

GHC trac at galois.com
Mon Oct 23 04:19:15 EDT 2006


#957: Build failure in Cabal/cabal-setup: -lgmp doesn't honor LDFLAGS
-------------------------------------+--------------------------------------
    Reporter:  trangayesi at gmail.com  |       Owner:         
        Type:  bug                   |      Status:  new    
    Priority:  normal                |   Milestone:         
   Component:  Build System          |     Version:  6.6    
    Severity:  normal                |    Keywords:         
  Difficulty:  Unknown               |    Testcase:         
Architecture:  x86                   |          Os:  FreeBSD
-------------------------------------+--------------------------------------
When building ghc-6.6 from source on FreeBSD 6, I get this error:

 {{{
 == gmake all - --no-print-directory -r;
  in /usr/home/tim/local/src/ghc-6.6/libraries/Cabal/cabal-setup
 ------------------------------------------------------------------------
 ../../../compiler/ghc-inplace -o cabal-setup -H16m -O -package Cabal
 CabalSetup.o
 /usr/bin/ld: cannot find -lgmp
 gmake[3]: *** [cabal-setup] Error 1
 gmake[2]: *** [all] Error 1
 gmake[1]: *** [all] Error 1
 gmake[1]: Leaving directory `/usr/home/tim/local/src/ghc-6.6/libraries'
 gmake: *** [stage1] Error 2
 1:12 ~/local/src/ghc-6.6$ cd libraries/Cabal/cabal-setup
 2:01 ~/local/src/ghc-6.6/libraries/Cabal/cabal-setup$ ../../../compiler
 /ghc-inplace -o cabal-setup -H16m -O -package Cabal CabalSetup.o
 -L/usr/local/lib
 2:02 ~/local/src/ghc-6.6/libraries/Cabal/cabal-setup$ cd -
 ~/local/src/ghc-6.6
 2:02 ~/local/src/ghc-6.6$ gmake
 gmake -C utils/mkdependC boot
 gmake[1]: Entering directory
 `/usr/home/tim/local/src/ghc-6.6/utils/mkdependC'
 gmake[1]: Leaving directory
 `/usr/home/tim/local/src/ghc-6.6/utils/mkdependC'
 }}}

 I configured with:

 {{{
 export CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
 ./configure --prefix=$HOME/local
 }}}

 My system has /usr/local/lib/libgmp.so; /usr/local/lib is, on FreeBSD,
 traditionally not in the default search path.  It must be specified
 explicitly to the linker.


 Once I compiled cabal-setup by hand, adding -L/usr/local/lib (as shown
 above), the rest of the build completed normally.

 I'm reporting this against ghc 6.6, but I noticed it on 6.4.2 as well.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/957>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list