[Haskell-cafe] Problems with building GCJNI 1.2

Antony Courtney antony.courtney at gmail.com
Fri Feb 18 19:19:30 EST 2005


Sorry for not jumping in on this discussion sooner.

I am the author of GCJNI.  GCJNI was developed back when Hugs was the
dominant Haskell implementation and GreenCard was the easiest/best way
to do foreign language bindings for Haskell because the FFI proposal
was still in the formative stages.

These days, the Haskell FFI addendum is stable and widely implemented,
ghc has become much more widely available and easy to install and use,
and (without wishing to sound harsh), GreenCard's FFI code generator
was broken and useless the last time I tried to use it (a few years

I actually ported GCJNI to the Haskell FFI a few years ago, getting
rid of ALL use of GreenCard.  I used ghc's 'hsc2hs' tool to help with
the marshalling, and made no attempt to port to hugs.  I called this
newer system 'hsjni', but never released it due simply to lack of time
while finishing my thesis.

I invested a little effort in trying to test hsjni with the latest JDK
and get a release together in December, but it got snagged on a silly
little bug in hsc2hs's handling of paths which have embedded spaces. 
Simon Marlow has since fixed this bug in CVS head;  I'm just waiting
for the next release of ghc with this fix available before I try

If you think you'd be interested in having a shot at building 'hsjni'
(or you are interested in maintaining it), let me know, and I'll make
the sources available for you.  Caveat is that I haven't tested it
since JDK 1.3, because of this hsc2hs issue.  One can easily work
around the hsc2hs path handling issue by installing the latest JDK in
a location without a space in the filename; but since the default
install location under Windows is under "C:\Program Files", I wasn't
interested in shipping a release that wouldn't work with the most
common default case.

Please accept my sincere appology for not mentioning any of the above
on the GCJNI web page.  Hopefully it will just all be replaced with
hsjni in the near future.

Kind Regards,


On Fri, 18 Feb 2005 20:45:14 +0100, Lemmih <lemmih at gmail.com> wrote:
> On Fri, 18 Feb 2005 20:37:35 +0100, Dmitri Pissarenko
> <mailing-lists at dapissarenko.com> wrote:
> > >>>Did you import Foreign.GreenCard?
> >
> > Now, I replaced "import StdDIS" by "import Foreign.GreenCard".
> The library apparently wasn't designed for newer versions of GreenCard
> and it may be too old to fix easily.
> --
> Friendly,
>  Lemmih
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list