#5093: ghc source build cannot find -lgmp even with the build.mk changes and
configure options
-------------------------------+--------------------------------------------
    Reporter:  guest           |        Owner:                     
        Type:  bug             |       Status:  new                
    Priority:  normal          |    Milestone:                     
   Component:  Build System    |      Version:  7.0.3              
    Keywords:  gmp             |     Testcase:                     
   Blockedby:                  |   Difficulty:                     
          Os:  Linux           |     Blocking:                     
Architecture:  x86_64 (amd64)  |      Failure:  Building GHC failed
-------------------------------+--------------------------------------------
Description changed by igloo:

Old description:

> Hi, I have been trying to build ghc 7.0.3 from source, but the configure
> script itself always fails when it tries to build ghc-pwd with the error
> "cannot find -lgmp". I have gmp installed in a non-standard directory,
> but I have copied mk/build.mk.sample to mk/build.mk and added
>
> EXTRA_CABAL_CONFIGURE_FLAGS = --extra-include-dirs=MY_INCLUDE_DIR \
>                               --extra-lib-dirs=MY_LIB_DIR
>
> to the end. Moreover, I have used
>
> --with-gmp-includes=MY_INCLUDE_DIR --with-gmp-libraries=MY_LIB_DIR
>
> as the configure option. Yet, the configure script fails every time at
> the attempt to build ghc-pwd with the error message "cannot find -lgmp".
> If I manually modify "configure" to add -LMY_LIB_DIR to the command to
> build ghc-pwd, then the configure can succeed, but the make will fail
> when it tries to link ghc-cabal, with the same error.
>
> Is there any way at all I can let the build take in MY_LIB_DIR? Thanks!

New description:

 Hi, I have been trying to build ghc 7.0.3 from source, but the configure
 script itself always fails when it tries to build ghc-pwd with the error
 "cannot find -lgmp". I have gmp installed in a non-standard directory, but
 I have copied mk/build.mk.sample to mk/build.mk and added
 {{{
 EXTRA_CABAL_CONFIGURE_FLAGS = --extra-include-dirs=MY_INCLUDE_DIR \
                               --extra-lib-dirs=MY_LIB_DIR
 }}}
 to the end. Moreover, I have used
 {{{
 --with-gmp-includes=MY_INCLUDE_DIR --with-gmp-libraries=MY_LIB_DIR
 }}}
 as the configure option. Yet, the configure script fails every time at the
 attempt to build ghc-pwd with the error message "cannot find -lgmp". If I
 manually modify "configure" to add -LMY_LIB_DIR to the command to build
 ghc-pwd, then the configure can succeed, but the make will fail when it
 tries to link ghc-cabal, with the same error.

 Is there any way at all I can let the build take in MY_LIB_DIR? Thanks!

--

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to