Building GHC 5.02 on Solaris x86

Sigbjorn Finne sof at galconn.com
Fri Nov 2 15:49:02 EST 2001


Yuck. If this isn't enough to convince people that hsc2hs is not
an appropriate tool (at least in the context of the Prelude
and hslibs/), than I don't know what is.

It commits to a particular platform at too early a stage -- details
of C header files are often best left to....C source files for C compilers
to process and deal with, not Haskell. If possible, keeping your
Haskell sources plat-indep. is a good goal to have, and I don't see
any fundamental reasons why that can't be done here (indeed, the
previous Prelude cbits/ setup was fairly close to achieving this).

So, bringing back the solution of having manually written C wrapper
functions which platform-independent Haskell source files will
call out to, would be preferable (in short, avoid the use of hsc2hs
*or any other extra tool* alltogether). I'm willing to make the
necessary changes.

--sigbjorn

As another data point, this is also an issue when booting under
OpenBSD x86. I suspect anyone with a version of the glibc headers
on a Linux box different to those used to bake the supplied .hc / .hs
files are also at risk of running into problems.

----- Original Message ----- 
From: "Simon Marlow" <simonmar at microsoft.com>
To: "Ian Lynagh" <igloo at earth.li>
Cc: <glasgow-haskell-bugs at haskell.org>
Sent: Monday, October 29, 2001 03:08
Subject: RE: Building GHC 5.02 on Solaris x86


> 
> > Doh, I have several times got further than I thought but 
> > didn't realise
> > it as I didn't notice it had made a ghc-5.02 binary!
> > 
> > Here's my latest problem, anyway - I don't suppose it could 
> > be caused by
> > the hc files being generated under a different OS with different magic
> > numbers could it?
> 
> Ah yes, I forgot about that.  Ken Shan came across the same problem when
> porting to Alpha.
> 
> To generate a Solaris-friendly set of hc files for the libraries you
> need to do this:  for each .hsc file, take the C output from hsc2hs on a
> Linux box (use --no-compile to get the _hsc_make.c file), and
> compile/run it on your Solaris box to get the .hs file.  Take the .hs
> file back to Linux to generate the .hc file.
> 
> You will probably have to generate a full set of .hc files, including
> the compiler.  That means doing a 2-stage build on Linux using the .hs
> files generated on Solaris as above.
> 
> Cheers,
> Simon
> 
> _______________________________________________
> Glasgow-haskell-bugs mailing list
> Glasgow-haskell-bugs at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs





More information about the Glasgow-haskell-bugs mailing list