[Hackage] #262: Check for required C libraries during configure

Hackage trac at galois.com
Sat Jan 31 14:08:46 EST 2009


#262: Check for required C libraries during configure
----------------------------+-----------------------------------------------
  Reporter:  guest          |        Owner:                     
      Type:  enhancement    |       Status:  closed             
  Priority:  high           |    Milestone:  Cabal-1.6          
 Component:  Cabal library  |      Version:  1.2.3.0            
  Severity:  normal         |   Resolution:  fixed              
  Keywords:                 |   Difficulty:  very easy (<1 hour)
Ghcversion:  6.8.2          |     Platform:                     
----------------------------+-----------------------------------------------
Changes (by duncan):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 The check is now done after running `./configure` so we can pick up any
 settings it provides. Those settings (`cpp-options`, `cc-options` and `ld-
 options`) are also now taken into account. This means the check should now
 be accurate so we can make it fatal rather than a warning. This is
 important to help people identify the cause of the problem.

 {{{
 Sat Jan 31 18:22:13 GMT 2009  Duncan Coutts <duncan at haskell.org>
   * Do the check for foreign libs after running configure
   This lets us pick up build info discovered by the ./configure script

 Sat Jan 31 18:40:16 GMT 2009  Duncan Coutts <duncan at haskell.org>
   * Use the cc, cpp and ld options when checking foreign headers and libs
   In partiular this is needed for packages that use ./configure
   scripts to write .buildinfo files since they typically do not
   split the cpp/cc/ldoptions into the more specific fields.

 Sat Jan 31 18:48:13 GMT 2009  Duncan Coutts <duncan at haskell.org>
   * Improve the error message for missing foreign libs and make it fatal
   The check should now be accurate enough that we can make it an
   error rather than just a warning.
 }}}

 The error message now includes a bit more advice:

 {{{
 Configuring foo-1.0...
 setup: Missing dependencies on foreign libraries:
 * Missing header file: foo.h
 * Missing C libraries: foo, bar, baz
 This problem can usually be solved by installing the system packages that
 provide these libraries (you may need the "-dev" versions). If the
 libraries
 are already installed but in a non-standard location then you can use the
 flags --extra-include-dirs= and --extra-lib-dirs= to specify where they
 are.
 }}}

 Or a real example:

 {{{
 Configuring curl-1.3.4...
 setup: Missing dependency on a foreign library:
 * Missing header file: curl.h
 * Missing C library: curl
 This problem can usually be solved by installing the system package that
 provides this library (you may need the "-dev" version). If the library is
 already installed but in a non-standard location then you can use the
 flags
 --extra-include-dirs= and --extra-lib-dirs= to specify where it is.
 }}}

 Thanks to Gleb Alexeyev for implementing most of this. It should result in
 many fewer confused users.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/262#comment:14>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list