#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: closed Priority: low | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: minor | Resolution: fixed Keywords: | Difficulty: easy (<4 hours) Ghcversion: | Platform: Mac OS ----------------------------+----------------------------------------------- Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Yes, your analysis is correct (I just discovered the same thing). So the bug in cabal is that it merges the buildinfo with the packagedescription incorrectly and that it does not do any sanity check of that buildinfo. As you discovered, the solution for you is to generate buildinfo for the executable rather than the library. The structure of the buildinfo file is documented in the user guide: http://haskell.org/cabal/users-guide/authors.html#system-dependent Bug fixed with this patch: {{{ Wed May 18 13:33:31 BST 2011 Duncan Coutts <duncan@community.haskell.org> * Do a sanity check on the HookedBuildInfo Fixes ticket #844. Previously the function that merged the HookedBuildInfo into the PackageDescription would add a library section even if none previously existed. Now we generate an error message if the HookedBuildInfo contains info for non-existant components (libs/exes), e.g: Setup: The buildinfo contains info for a library, but the package does not have a library. }}} -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/844#comment:3> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects