About building wx and Cabal

Duncan Coutts duncan.coutts at googlemail.com
Thu Nov 4 05:41:54 EDT 2010


I've briefly been following your posts about building wx using Cabal

(for the benefit of other cabal-devel readers the latest is:)

I want to make sure we don't lose what the core problem is and I'd like
to work out what the "right" solution would be in terms of extra Cabal
features. Perhaps you can translate into a feature request ticket that
says what the core problem is (e.g. is it simply that static linking
does not work for this C lib etc).

Without yet understanding all the details, my first impression is that
this problem would fit well with a feature I've been imagining for
defining "foreign library" sections in a .cabal file, as opposed to
Haskell libraries. These could contain C,C++ code as normal, but would
be built using the platform rules, rather than the Haskell compiler

I don't yet understand why you've got a constraint on using a shared
library, but perhaps the thing to do is simply to allow foreign lib
sections to state such a constraint, e.g. the point might be to make a
shared lib for a plugin, so a static lib is not the goal. Otoh, if it's
possible to both build a static and shared lib from the same
description, that's probably a useful thing in many circumstances.


More information about the cabal-devel mailing list