Re: GHC 6.8.1 port on FreeBSD-amd64?

2008-01-06 Thread Ian Lynagh
On Fri, Jan 04, 2008 at 09:54:45PM +0100, Matthias Kilian wrote:
 [Note: already shortly discussed with Wilhelm]
 
 On Fri, Nov 23, 2007 at 12:30:06PM +, Wilhelm B. Kloke wrote:
   ../../compiler/stage1/ghc-inplace -package-name unix-2.2.0.0 
   -hide-all-packages -i -idist/build/autogen -idist/build -i. -Idist/build 
   -Iinclude -#include HsUnix.h -#include execvpe.h -odir dist/build 
   -hidir dist/build -stubdir dist/build -package base-3.0.0.0 -package 
   directory-1.0.0.0 -O -XCPP -XForeignFunctionInterface -idist/build  -H32m 
   -O0 -fasm -Rghc-timing -keep-hc-files -O -c 
   dist/build/System/Posix/Process.hs -o dist/build/System/Posix/Process.o  
   -ohi dist/build/System/Posix/Process.hi
   Prologue junk?: .type   s32x_ret, @function
   s32x_ret:
   pushl   %ebp
   movl%esp, %ebp
 
 I see nearly the same problem with ghc-6.8.2 on OpenBSD, using the
 gcc-3.3.5 included in its base system.

Presumably this also happens if you do a normal build with -fvia-C, i.e.
it's not specific to building from an HC file bundle?

 [1] BTW: what's the point of using -fasm with -keep-hc-files? IMHO,
 it should be -fviaC -keep-hc-files. Someone let me know if I should
 correct this in the wiki.

GHC will act as if -fvia-C is given if -keep-hc-files is given. It
would be nice to update the wiki to say -fvia-C rather than -fasm to
avoid confusion, though.

 ps: yes, I'm slowly trying to bring HC bootstrap back to work. It's
 a must-have for the OpenBSD port.

Note that there is a plan to drop the registerised via-C way of
compiling GHC at some point, so this isn't going to work in the long
term (unless you want to bootstrap via an unregisterised compiler).

Would it not be possible to have a ghc-bin package in OpenBSD, which
contains a precompiled binary that can be used to compile a ghc source
package? I think Gentoo does something like that.

 pps: I guess, cvs-ghc would be the more correct list for sending
 patches and discussing the bootstrapping stuff, right?

Yup.


Thanks
Ian

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC 6.8.1 port on FreeBSD-amd64?

2008-01-06 Thread Matthias Kilian
On Sun, Jan 06, 2008 at 05:20:18PM +, Ian Lynagh wrote:
Prologue junk?: .type   s32x_ret, @function
s32x_ret:
pushl   %ebp
movl%esp, %ebp
  
  I see nearly the same problem with ghc-6.8.2 on OpenBSD, using the
  gcc-3.3.5 included in its base system.
 
 Presumably this also happens if you do a normal build with -fvia-C, i.e.
 it's not specific to building from an HC file bundle?

That's right, it's just -fvia-C that triggers the bug.

  [1] BTW: what's the point of using -fasm with -keep-hc-files? IMHO,
  it should be -fviaC -keep-hc-files. Someone let me know if I should
  correct this in the wiki.
 
 GHC will act as if -fvia-C is given if -keep-hc-files is given. It
 would be nice to update the wiki to say -fvia-C rather than -fasm to
 avoid confusion, though.

Done.

  ps: yes, I'm slowly trying to bring HC bootstrap back to work. It's
  a must-have for the OpenBSD port.
 
 Note that there is a plan to drop the registerised via-C way of
 compiling GHC at some point, so this isn't going to work in the long
 term (unless you want to bootstrap via an unregisterised compiler).

I think I'll be happy with unregisterised bootstrap, too, even if
the actual build of the port will take longer.

 Would it not be possible to have a ghc-bin package in OpenBSD, which
 contains a precompiled binary that can be used to compile a ghc source
 package? I think Gentoo does something like that.

AFAIK, FreeBSD does it in a similar way. However, this isn't the
way we do ports for OpenBSD, so I'll work towards the unregisterised
bootstrap.

Ciao,
Kili
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC 6.8.1 port on FreeBSD-amd64?

2008-01-06 Thread Wilhelm B. Kloke
Matthias Kilian [EMAIL PROTECTED] schrieb:
 On Sun, Jan 06, 2008 at 05:20:18PM +, Ian Lynagh wrote:
Prologue junk?: .type   s32x_ret, @function
s32x_ret:
pushl   %ebp
movl%esp, %ebp
  
  I see nearly the same problem with ghc-6.8.2 on OpenBSD, using the
  gcc-3.3.5 included in its base system.
 
 Presumably this also happens if you do a normal build with -fvia-C, i.e.
 it's not specific to building from an HC file bundle?

 That's right, it's just -fvia-C that triggers the bug.

This is not quite the case. I compiled even with -fvia-C without
errors on FreeBSD-amd64. This bug is specific for the bootstrap
with crosscompiling i386 - amd64 vi .hc-bundle.
-- 
Dipl.-Math. Wilhelm Bernhard Kloke
Institut fuer Arbeitsphysiologie an der Universitaet Dortmund
Ardeystrasse 67, D-44139 Dortmund, Tel. 0231-1084-257
PGP: http://vestein.arb-phys.uni-dortmund.de/~wb/mypublic.key

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC 6.8.1 port on FreeBSD-amd64?

2008-01-04 Thread Matthias Kilian
[Note: already shortly discussed with Wilhelm]

On Fri, Nov 23, 2007 at 12:30:06PM +, Wilhelm B. Kloke wrote:
  ../../compiler/stage1/ghc-inplace -package-name unix-2.2.0.0 
  -hide-all-packages -i -idist/build/autogen -idist/build -i. -Idist/build 
  -Iinclude -#include HsUnix.h -#include execvpe.h -odir dist/build 
  -hidir dist/build -stubdir dist/build -package base-3.0.0.0 -package 
  directory-1.0.0.0 -O -XCPP -XForeignFunctionInterface -idist/build  -H32m 
  -O0 -fasm -Rghc-timing -keep-hc-files -O -c 
  dist/build/System/Posix/Process.hs -o dist/build/System/Posix/Process.o  
  -ohi dist/build/System/Posix/Process.hi
  Prologue junk?: .type   s32x_ret, @function
  s32x_ret:
  pushl   %ebp
  movl%esp, %ebp

I see nearly the same problem with ghc-6.8.2 on OpenBSD, using the
gcc-3.3.5 included in its base system.

Regardless of wether there's something wrong with the generated
code or wether it's just a bug in the mangler, it's possible to
build Process.c with -fviaC *and* -O0.[1]

For now, I'm able to build a HC file bundle with this settings in
build.mk and running gmake stage1 hc-file-bundle:

SRC_HC_OPTS=-H64 -O -fvia-C -keep-hc-files
GhcLibHcOpts=   -O0 # Workaround the mangler problem
GhcLibWays=
GhcRTSWays=
SplitObjs=  NO

I'd appreciate any reports wether people see the same problem on
other systems (if so: what gcc version are you using?) and wether
GhcLibHcOpts=-O0 fixes it.

Ciao,
Kili

[1] BTW: what's the point of using -fasm with -keep-hc-files? IMHO,
it should be -fviaC -keep-hc-files. Someone let me know if I should
correct this in the wiki.


ps: yes, I'm slowly trying to bring HC bootstrap back to work. It's
a must-have for the OpenBSD port. Apart from the HC file bundle,
this will require some more hacking especially on library/Makefile
and the Cabal-generated GNUmakefiles (and/or Makefile.local).

pps: I guess, cvs-ghc would be the more correct list for sending
patches and discussing the bootstrapping stuff, right?
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


GHC 6.8.1 port on FreeBSD-amd64?

2007-11-23 Thread Wilhelm B. Kloke
As I have got an amd64 machine again, I am returning to my previous
porting effort.

When I try to build to .hc files on i386 system, I
get the following error:
 ...
 gmake[2]: Entering directory `/usr/home/wb/ghc-6.8.1/libraries/unix'
 ../../compiler/stage1/ghc-inplace -package-name unix-2.2.0.0 
 -hide-all-packages -i -idist/build/autogen -idist/build -i. -Idist/build 
 -Iinclude -#include HsUnix.h -#include execvpe.h -odir dist/build -hidir 
 dist/build -stubdir dist/build -package base-3.0.0.0 -package 
 directory-1.0.0.0 -O -XCPP -XForeignFunctionInterface -idist/build  -H32m -O0 
 -fasm -Rghc-timing -keep-hc-files -O -c dist/build/System/Posix/Process.hs -o 
 dist/build/System/Posix/Process.o  -ohi dist/build/System/Posix/Process.hi
 Prologue junk?: .type   s32x_ret, @function
 s32x_ret:
 pushl   %ebp
 movl%esp, %ebp
 
 ghc: 114363808 bytes, 9 GCs, 2951168/5799936 avg/max bytes residency (2 
 samples), 33M in use, 0.00 INIT (0.00 elapsed), 0.78 MUT (2.33 elapsed), 0.20 
 GC (0.23 elapsed) :ghc
 gmake[2]: *** [dist/build/System/Posix/Process.o] Fehler 255
 gmake[2]: Leaving directory `/usr/home/wb/ghc-6.8.1/libraries/unix'
 gmake[1]: *** [make.library.unix] Fehler 2
 gmake[1]: Leaving directory `/usr/home/wb/ghc-6.8.1/libraries'
 gmake: *** [stage1] Fehler 2

which I don't understand at all. The build of ghc-6.8.1 for native
use on a FreeBSD-6.2 i386 did not cause any problems.

Perhaps someone else has done the porting work already. Please give me
a note, if anybody is able to provide me a set of files to get the
bootstrap further.
-- 
Dipl.-Math. Wilhelm Bernhard Kloke
Institut fuer Arbeitsphysiologie an der Universitaet Dortmund
Ardeystrasse 67, D-44139 Dortmund, Tel. 0231-1084-257
PGP: http://vestein.arb-phys.uni-dortmund.de/~wb/mypublic.key

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users