[C2hs] Re: [Haskell] building c2hs on winows
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Thu Jul 6 11:35:05 EDT 2006
> On Thu, 2006-07-06 at 10:30 +0100, Duncan Coutts wrote:
> > On Wed, 2006-07-05 at 20:58 -0700, Anatoly Yakovenko wrote:
> > > On 7/4/06, Arjan Oosting <arjanoosting at home.nl> wrote:
> > > > Op di, 04-07-2006 te 09:09 -0700, schreef Anatoly Yakovenko:
> > > > > I can't get c2hs to build on windows with ghc-6.4.2
> > > > >
> > > I get a little farther, but it still doesn't work:
> > Actually, c2hs's setup is doing something that only works on unix. In
> > fact it doesn't even always work on unix. For the Gentoo ebuild we
> > changed it because it doesn't work in the context of installing into a
> > temp dir.
> > A temporary hack is to change the Setup.hs to be just:
> > import Distribution.Simple
> > main = defaultMain
> > it means that c2hs's --copy-library feature will not work but everything
> > else should. We'll have to look into doing that in a more portable way.
With the latest Cabal (as included in recent GHC), the postInst.sh
(which is the problem) can be rewritten in Haskell and added to Setup.hs
directly. That should remove this particular problem (but will of
course mean that c2hs doesn't work anymore with earlier versions of
Cabal, but that is probably secondary).
> Actually it turns out the c2hs is doing a lot of things that are not
> portable to windows. It'll need some effort to fix. Any helpers?
What else apart from pathname separators? It'd be great if somebody
could look into that.
More information about the C2hs