[Haskell-cafe] cabal under windows (was Re: Haskell-CafeDigest, Vol 51, Issue 180)

Tim Docker timd at macquarie.com.au
Thu Nov 29 19:40:36 EST 2007

Duncan Coutts wrote:

> Tim Docker wrote:
> > Is it actually reasonable to expect any cabal packages that depend
> > external c libraries and headers to build out of the box on windows?

> > How can cabal find out where those files are, without requiring a 
> > config file to be edited?
> It's usually worse than that. The most likely situation is that the C
> library and header files are not even installed. This is a big problem
> for all packages that wrap C libs.

I wonder if this could be addressed by discarding the desire to
run magically "out of the box", but make the requirements

Currently the choices seem to be:

	* Require the user to install these libs+headers 
        "just right" (on the PATH or in certain MSYS
        directories) so that they are found.

      * Edit the cabal package file to point to the

Perhaps a worthwhile addition to cabal would be for it to be able to
read a local config file, in which a user would specify where each
package should get the necessary headers and libs? You'd manually create
this file, maybe like:

package: SDL
    include-dirs: c:\libs\SDL\include
    lib-dirs: c:\libs\SDL\lib

package: curl
    include-dirs: c:\dev\mycurl\include
    lib-dirs: c:\dev\mycurl\lib

When building a package X, cabal would consult this file to work out
localised options for that package.


More information about the Haskell-Cafe mailing list