Paths module in package description or not?

Henning Thielemann lemming at henning-thielemann.de
Mon May 25 04:40:34 EDT 2009


Consider
   http://code.haskell.org/mohws/mohws.cabal

When I include Paths_mohws as Other-Modules, 'cabal haddock' aborts with:

thielema at euler:~/programming/haskell/mohws> cabal haddock
Preprocessing library mohws-0.2.0.1...
Preprocessing executables for mohws-0.2.0.1...
Running Haddock for mohws-0.2.0.1...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: rts-1.0
Preprocessing library mohws-0.2.0.1...
Preprocessing executables for mohws-0.2.0.1...
cabal: can't find source for module Paths_mohws


When I remove Paths_mohws from Other-Modules then the library and 
executables in the package can be built successfully. But when I compile 
an executable outside the package, then I get a linker error:

parallelweb> cabal install
Resolving dependencies...
Configuring parallelweb-0.0.2...
Preprocessing executables for parallelweb-0.0.2...
Building parallelweb-0.0.2...
Linking dist/build/parallelweb/parallelweb ...
/home/thielema/.cabal/lib/mohws-0.2.0.1/ghc-6.10.3/libHSmohws-0.2.0.1.a(Configuration.o): 
In function `sfyj_info':
(.text+0x2d1f): undefined reference to 
`mohwszm0zi2zi0zi1_Pathszumohws_a7_closure'
/home/thielema/.cabal/lib/mohws-0.2.0.1/ghc-6.10.3/libHSmohws-0.2.0.1.a(Configuration.o): 
In function `seCS_info':
(.text+0x86bb): undefined reference to 
`__stginit_mohwszm0zi2zi0zi1_Pathszumohws_'
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:
parallelweb-0.0.2 failed during the building phase. The exception was:
exit: ExitFailure 1


I use:

$ cabal --version
cabal-install version 0.6.0
using version 1.6.0.1 of the Cabal library


Which way is the intended one? Include Paths_mohws in package description 
or not? In general, shall automatically generated files appear in Cabal 
file? I think they should not, since they are not part of the distribution 
tarball. So can I consider the linker error being a bug?



More information about the cabal-devel mailing list