.hc files for building ghc-6.4.1 on amd64 ?

Wilhelm B. Kloke wb at arb-phys.uni-dortmund.de
Mon Sep 19 07:45:11 EDT 2005

Simon Marlow <simonmar at microsoft.com> schrieb:
> On 17 September 2005 22:05, Wilhelm B. Kloke wrote:
>> I tried it again today. One of my problems was related to gmake
>> version. 
>> The configure script should warn, if gmake is older than 3.80 (I had
>> 3.78). 
> I'm using 3.79.1.  I do vaguely remember a problem with older versions
> of gmake - what goes wrong for you?

The old gmake does not get the dependencies right.

>> The building of the .hc bundle fails wirth the following messages:
>> ...
>> tar czf ghc-6.4.1-x86_64-unknown-freebsd-hc.tar.gz `cat
>> hc-files-to-go` 
>> tar: ghc-6.4.1/ghc/rts/PrimOps.hc: Cannot stat: No such file or
>> directory 
>> Cannot stat: No such file or directory gmake: *** [hc-file-bundle]
>> Fehler 1 
> Yes, you do actually need to generate these .hc files on the host
> system.  What happened to the build in ghc/rts - could you post the
> error message?  Possibly a 'make -k' in ghc/rts will be enough to get
> these files.
>> I tried to go back to ghc/rts to build more files following the
>> ipattern of the last steps before, but this destroys genapply.
> Don't quite understand this - could you elaborate?

I tried
> (cd ghc/rts ; gmake all)
after (cd ghc/compiler ; gmake stage=2 )

I have further information now. When compiling Linker.c,
the compilation fails, because there is no MAP_32BIT in FreeBSD-amd64.
Perhaps just removing this could make it work. I have no idea
why it is needed on linux-x86_64.

>> there is no rule to build those files. Also, I needed to have happy
>> and alex 
>> on the target system, because make boot fails without them (catch 22).
> When things are working properly, you don't need Happy or Alex on the
> target system.  I suspect things have gone wrong earlier.

Probably. But this is in a very early stage. It even happens when using
> gmake -n boot
(for finding the cause I wanted to know the commands which may have failed),
that two command using $(HAPPY) and $(ALEX) are executed. I was not
able to locate the point better. Perhaps you could try the first stages of
the crossbuild on suitable system, where these two variable from
mk/config.mk are defined empty (as was the case on my system after configure).

>> A final glitch is that (at least, my) FreeBSD-amd64-6.0 gcc does not
>> include -I/usr/local/include and -L/usr/local/lib in the search path.
>> So libgmp is not found.
> Ok.  You can use the libgmp in the tree (this should happen
> automatically), or you can add the -I/-L flags to the relevant places.

This was not possible, as x86_64 does not seem supported in ghc's gmp.
The other solution (exporting LDFLAGS=-L/usr/local/lib) works.

Dipl.-Math. Wilhelm Bernhard Kloke
Institut fuer Arbeitsphysiologie an der Universitaet Dortmund
Ardeystrasse 67, D-44139 Dortmund, Tel. 0231-1084-257

More information about the Glasgow-haskell-users mailing list