[Hackage] #844: Cabal reports "cabal: internal error: the package contains a library but there is no corresponding configuration data" when there exists no library in the cabal file

Hackage cvs-ghc at haskell.org
Wed May 18 14:19:59 CEST 2011


#844: Cabal reports "cabal: internal error: the package contains a library but
there is no corresponding configuration data" when there exists no library
in the cabal file
------------------------------+---------------------------------------------
  Reporter:  fushunpoon       |        Owner:         
      Type:  defect           |       Status:  new    
  Priority:  low              |    Milestone:         
 Component:  Cabal library    |      Version:  1.8.0.6
  Severity:  minor            |     Keywords:         
Difficulty:  easy (<4 hours)  |   Ghcversion:         
  Platform:  Mac OS           |  
------------------------------+---------------------------------------------
Changes (by fushunpoon):

  * priority:  normal => low
  * difficulty:  normal => easy (<4 hours)
  * severity:  normal => minor


Comment:

 I have found out precisely the reason why this error is displayed:

 The `sdlexprs.buildinfo.in` file that I wrote did not declare the `cc-
 options` line under the specific executable `test`.
 This means that by default it was treated as build information for a
 library as opposed to an executable when the `sdlexprs.buildinfo` file is
 consulted when doing a `cabal build`.

 This problem deserves a better error message earlier on, perhaps as a
 warning, that even though no `Library` sections exist in the cabal file,
 the consulted `*.buildinfo` file does. This surely is an inconsistency on
 part of the user. To say that the project "contains a library" is
 misleading and is confusing, especially when the `.cabal` file is supposed
 to be the definitive package description file.

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



More information about the cabal-devel mailing list