
So here I am with 64 bit Athlon hardware, running amd64
NetBSD (a.k.a. x86_64), reasonably motivated to compile
Haskell. From what I make of the porting instructions,
my only hope is to install FreeBSD-amd64 on another
partition and download the 6.6.1 ghc for that platform,
use it to generate .hc files to build 6.6.1 on NetBSD,
and then use 6.6.1 to build 6.8 or whatever the current
version may be by the time I get there?
--
Donn Cave

On Fri, May 09, 2008 at 10:21:19PM -0700, Donn Cave wrote:
So here I am with 64 bit Athlon hardware, running amd64 NetBSD (a.k.a. x86_64), reasonably motivated to compile Haskell. From what I make of the porting instructions,
So, we are in the same boat then!
my only hope is to install FreeBSD-amd64 on another partition and download the 6.6.1 ghc for that platform, use it to generate .hc files to build 6.6.1 on NetBSD, and then use 6.6.1 to build 6.8 or whatever the current version may be by the time I get there?
But what I thought was rather to go with OpenBSD, since I figured that it would be closer to NetBSD (You can e.g. build ghc on OpenBSD using NetBSD-generated .hc files on i386), and generate the .hc files on OpenBSD. I have unfortunately not got any further than getting an openbsd partition though, have not had the time to get into the actual porting. Emil
-- Donn Cave
-- Emil Sköldberg

emil.skoldberg:
On Fri, May 09, 2008 at 10:21:19PM -0700, Donn Cave wrote:
So here I am with 64 bit Athlon hardware, running amd64 NetBSD (a.k.a. x86_64), reasonably motivated to compile Haskell. From what I make of the porting instructions,
So, we are in the same boat then!
my only hope is to install FreeBSD-amd64 on another partition and download the 6.6.1 ghc for that platform, use it to generate .hc files to build 6.6.1 on NetBSD, and then use 6.6.1 to build 6.8 or whatever the current version may be by the time I get there?
But what I thought was rather to go with OpenBSD, since I figured that it would be closer to NetBSD (You can e.g. build ghc on OpenBSD using NetBSD-generated .hc files on i386), and generate the .hc files on OpenBSD. I have unfortunately not got any further than getting an openbsd partition though, have not had the time to get into the actual porting.
I wonder if it is still possible to use the .hc files already generated for the OpenBSD/amd64 port, and use those to do the port to NetBSD/amd64. http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/ghc/ Actually, with headers starting to diverge, it might make more sense to just generate the amd64/netbsd .hc files from i386/netbsd -- where there's already a working ghc. -- Don

On Sat, May 10, 2008 at 12:13:16PM -0700, Don Stewart wrote:
I wonder if it is still possible to use the .hc files already generated for the OpenBSD/amd64 port, and use those to do the port to NetBSD/amd64.
If nobody tries, we'll never know. Ciao, Kili --
Do with this info and this argument what u will - as u always do. Delete it. -- Jeffrey Lim and Theo de Raadt in "The famous t-shirt thread"

On Sat, 10 May 2008 12:13:16 -0700
Don Stewart
I wonder if it is still possible to use the .hc files already generated for the OpenBSD/amd64 port, and use those to do the port to NetBSD/amd64.
That sounds fine to me, if I understand you right - I managed to install an OpenBSD partition this afternoon, but if I can skip that step, that's fine with me. I don't see any .hc files at that link, though.
Actually, with headers starting to diverge, it might make more sense to just generate the amd64/netbsd .hc files from i386/netbsd -- where there's already a working ghc.
I have ghc 6.4.1 on NetBSD 3.0 i386. That's the idea, right? as
apparently 6.8 is known to not build from .hc files. I don't
understand `with headers starting to diverge'.
Donn Cave, donn@avvanta.com
--
Donn Cave

On Sat, May 10, 2008 at 02:36:43PM -0700, Donn Cave wrote:
I wonder if it is still possible to use the .hc files already generated for the OpenBSD/amd64 port, and use those to do the port to NetBSD/amd64.
That sounds fine to me, if I understand you right - I managed to install an OpenBSD partition this afternoon, but if I can skip that step, that's fine with me. I don't see any .hc files at that link, though.
Here you go: http://openbsd.dead-parrot.de/distfiles/ghc-6.6.1-amd64-unknown-openbsd-hc.t... I've to admit that the ghc port for OpenBSD is a little bit weird ;-) (but not as weird as my current work on ghc-6.8 for OpenBSD)
Actually, with headers starting to diverge, it might make more sense to just generate the amd64/netbsd .hc files from i386/netbsd -- where there's already a working ghc.
I have ghc 6.4.1 on NetBSD 3.0 i386. That's the idea, right?
If possible, start with ghc 6.6.1, even if that means to install a newer version of NetBSD.
as apparently 6.8 is known to not build from .hc files. I don't understand `with headers starting to diverge'.
Nor do I, but I guess Don meant significant differences in system libraries (between NetBSD and OpenBSD). Ciao, Kili -- Weg mit dieser verfluchten Demokratie wo alles das Wort führen will. -- Georg Christoph Lichtenberg

kili:
http://openbsd.dead-parrot.de/distfiles/ghc-6.6.1-amd64-unknown-openbsd-hc.t...
I've to admit that the ghc port for OpenBSD is a little bit weird ;-)
(but not as weird as my current work on ghc-6.8 for OpenBSD)
What's your plan for the OpenBSD port, Kili?
as apparently 6.8 is known to not build from .hc files. I don't understand `with headers starting to diverge'.
Nor do I, but I guess Don meant significant differences in system libraries (between NetBSD and OpenBSD).
That's what I meant. When you take the .hc files from OpenBSD to NetBSD, there's going to be some breakages in the C layer. So better to do the x86 -> amd64 port, staying on NetBSD, I think. -- Don

On Sat, May 10, 2008 at 03:03:39PM -0700, Don Stewart wrote:
I've to admit that the ghc port for OpenBSD is a little bit weird ;-)
(but not as weird as my current work on ghc-6.8 for OpenBSD)
What's your plan for the OpenBSD port, Kili?
* Proper bootstrapping from .hc files. * Think about a better way to build the libraries; I understand why the GHC developers do it using the makefiles generated by Cabal, but I'd really prefer something less intrusive (i.e. let Cabal generate only some makefile snippets with dependencies, special flags etc. and include those snippets from a "classical" Makefile that fits better into the good old fptools framework). * Port it to more archs (arm, powerpc, maybe alpha and vax, and, if I'll ever be at that point, to everything else, at least unregisterised). * Omit as many core libraries as possible from the build, and make separate ports for them. * Improve ghc.port.mk to make ports of "standard" stuff on hackage more simple. Currently all GHC-depending ports are a real mess, for example xmonad: http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/xmonad/ With the new ghc.port.mk, all the do-something targets will vanish, and the xmonad Makefile will just contain a line like MODGHC_BUILD= cabal hackage haddock register which means: use Cabal (Setup.hs or Setup.lhs), fetch sources from hackage, use haddock to build the documentation, create register/unregister scripts that update package.conf on installation/deinstallation. Ciao, Kili

kili:
On Sat, May 10, 2008 at 03:03:39PM -0700, Don Stewart wrote:
I've to admit that the ghc port for OpenBSD is a little bit weird ;-)
(but not as weird as my current work on ghc-6.8 for OpenBSD)
What's your plan for the OpenBSD port, Kili?
* Proper bootstrapping from .hc files.
* Think about a better way to build the libraries; I understand why the GHC developers do it using the makefiles generated by Cabal, but I'd really prefer something less intrusive (i.e. let Cabal generate only some makefile snippets with dependencies, special flags etc. and include those snippets from a "classical" Makefile that fits better into the good old fptools framework).
* Port it to more archs (arm, powerpc, maybe alpha and vax, and, if I'll ever be at that point, to everything else, at least unregisterised).
The debian port is inspiring in this regard. E.g. xmonad is available for: alpha, amd64, arm, hppa, i386, ia64, mips, mipsel, s390, sparc http://packages.debian.org/sid/xmonad
* Omit as many core libraries as possible from the build, and make separate ports for them.
So in 6.8.2 only those actually required to build ghc should be in the core.
* Improve ghc.port.mk to make ports of "standard" stuff on hackage more simple. Currently all GHC-depending ports are a real mess, for example xmonad: http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/xmonad/ With the new ghc.port.mk, all the do-something targets will vanish, and the xmonad Makefile will just contain a line like
MODGHC_BUILD= cabal hackage haddock register
which means: use Cabal (Setup.hs or Setup.lhs), fetch sources from hackage, use haddock to build the documentation, create register/unregister scripts that update package.conf on installation/deinstallation.
yeah, a tool to spit out Makefile defs from .cabal files to automate the process of getting the 500 things on hackage into the ports tree would be ideal. -- Don

On Sat, 10 May 2008 23:59:18 +0200
Matthias Kilian
Here you go:
http://openbsd.dead-parrot.de/distfiles/ghc-6.6.1-amd64-unknown-openbsd-hc.t...
Thanks, I have managed to build a stage1/ghc-6.6.1 with those,
which is a start even if it does immediately core dump. I will
follow up off list if I get anywhere interesting with it, either
to parties to this exchange or maybe glasgow-haskell-users would
be an appropriate place.
--
Donn Cave

donn:
On Sat, 10 May 2008 23:59:18 +0200 Matthias Kilian
wrote: Here you go:
http://openbsd.dead-parrot.de/distfiles/ghc-6.6.1-amd64-unknown-openbsd-hc.t...
Thanks, I have managed to build a stage1/ghc-6.6.1 with those, which is a start even if it does immediately core dump. I will follow up off list if I get anywhere interesting with it, either to parties to this exchange or maybe glasgow-haskell-users would be an appropriate place.
glasgow-haskell-users is good. Also, gdb can be your friend when debugging failures porting .hc files. -- Don

On Sat, 10 May 2008 10:35:12 +0100
Emil Skoeldberg
On Fri, May 09, 2008 at 10:21:19PM -0700, Donn Cave wrote:
So here I am with 64 bit Athlon hardware, running amd64 NetBSD (a.k.a. x86_64), reasonably motivated to compile Haskell.
So, we are in the same boat then!
OK, for you and me and probably no one else in the world, I have
built 6.8.2, and for a short time I have it on-line - at my ISP's
site, http://www.avvanta.com/~donn/ ... append file name, which
is ghc-6.8.2-netbsd-amd64.tar.bz2 Size is ca. 54 Mb.
When you want to use this to build future ghc releases, you'll
probably have to modify libbfd.so to get GNU ar to index one
or two of the larger libraries. I believe the release itself
will work fine without this mod - ld uses the same library, but
I think only ar has the problem.
That cost me a lot of time. The other thing that cost me some
time was the gmp dist in ghc-6.6.1, which didn't fully configure
for the platform. The rest was reasonably straightforward.
I built 6.6.1 .hc files on OpenBSD.
--
Donn Cave

donn:
On Sat, 10 May 2008 10:35:12 +0100 Emil Skoeldberg
wrote: On Fri, May 09, 2008 at 10:21:19PM -0700, Donn Cave wrote:
So here I am with 64 bit Athlon hardware, running amd64 NetBSD (a.k.a. x86_64), reasonably motivated to compile Haskell.
So, we are in the same boat then!
OK, for you and me and probably no one else in the world, I have built 6.8.2, and for a short time I have it on-line - at my ISP's site, http://www.avvanta.com/~donn/ ... append file name, which is ghc-6.8.2-netbsd-amd64.tar.bz2 Size is ca. 54 Mb.
When you want to use this to build future ghc releases, you'll probably have to modify libbfd.so to get GNU ar to index one or two of the larger libraries. I believe the release itself will work fine without this mod - ld uses the same library, but I think only ar has the problem.
That cost me a lot of time. The other thing that cost me some time was the gmp dist in ghc-6.6.1, which didn't fully configure for the platform. The rest was reasonably straightforward. I built 6.6.1 .hc files on OpenBSD.
Great work, let's get it up on the download page, http://haskell.org/ghc/download_ghc_682.html -- Don

On Sun, 1 Jun 2008 19:34:10 -0700
Don Stewart
Great work, let's get it up on the download page,
Suits me, but now that I've had a chance to compile a little
more Haskell with it, I think I might like to fix up a couple
things. I'm not promising to make ghci work, though that would
be nice, but mainly I'm talking about linker warnings attached
to a couple of "compatibility" functions that got linked in
when the more POSIX compliant versions would have been found
if e.g. stdlib.h had been included. opendir(), unsetenv(), etc.
So if that's agreeable, don't take the file I put on-line, I'll
build up another one.
thanks
--
Donn Cave
participants (4)
-
Don Stewart
-
Donn Cave
-
Emil Skoeldberg
-
Matthias Kilian