Compile problems with ghc-5.0
Manuel M. T. Chakravarty
chak@cse.unsw.edu.au
Sun, 13 May 2001 18:20:53 +1000
michael.weber@post.rwth-aachen.de (Michael Weber) wrote,
> * G=E9rard Milmeister <gemi@bluewin.ch> [2001-05-12T13:28+0200]:
> > I use Redhat 6.2.
> > The binary install is ok, but when I compile ghc-5.0 from source
> > using ghc-5.0, I get the following error after 'make all':
> > =
> > ../../../ghc/utils/hsc2hs/hsc2hs-inplace Directory.hsc
> > ../../../ghc/utils/hsc2hs/hsc2hs-inplace:
> > /test/v-julsew/Nightly-HEAD/i386-unknown-linux/stage1/ghc/utils/hsc2=
hs/hsc2hs-bin:
> > No such file or directory
> > =
> > Furthermore, most available libraries seem to be uncompilable
> > with ghc-5.0, e.g. c2hs and gtk2hs.
> =
> For c2hs I provided a patch for configure, which made it think it's
> dealing with ghc-4.11.
> =
> I don't have it at hand, but you can ask Manuel
> Chakravarty. =
I append the patch.
> AFAIK,
> he already updated the c2hs CVS repo and provided a Real Solution(tm).=
That's right. The CVS version works with 5.00 and has some
more new goodies. I will put out a release (with binaries)
as soon as the new features are sufficiently bug free.
As for Gtk+HS, which was also mentioned, I will take care of
that after c2hs is done. Are you (that is G=E9rard) on the
Gtk+HS mailing list?
http://www.cse.unsw.edu.au/~chak/haskell/gtk/#ml
The list doesn't have much traffic, but carries news
regarding new versions of the library etc.
Cheers,
Manuel
-=3D-
--- c2hs-0.8.2.orig/configure.in
+++ c2hs-0.8.2/configure.in
@@ -113,6 +113,11 @@
dnl set GHC, as this is what the following command inspects
GHC=3D$HC
CTK_GHC_VERSION(hc_maj_vers,hc_min_vers)
+ if test $hc_maj_vers -eq 5; then
+ # HACK HACK HACK
+ hc_maj_vers=3D4
+ hc_min_vers=3D11
+ fi
if test $hc_maj_vers -lt 3 -o $hc_min_vers -lt 2; then
AC_MSG_ERROR([You need version 3.02 or 4.02 upwards of ghc!
** Check \"http://haskell.org/ghc/\". **])
--- c2hs-0.8.2.orig/c2hs/lib/Makefile
+++ c2hs-0.8.2/c2hs/lib/Makefile
@@ -95,7 +95,7 @@
# * The following enables the use of the FFI and sucks in the prototype=
s needed
# by external calls =
#
-EXTRAHCFLAGS =3D -fglasgow-exts $(LIB_HCFLAGS)
+EXTRAHCFLAGS =3D -fglasgow-exts -package lang $(LIB_HCFLAGS)
=
# make all object files
#