Re: [Haskell-cafe] Compiling GHC

On 4/11/07, Andrew Appleyard
The source paths for these copies are derived from the path of the gcc binary ($GccDir). Did you call configure with '--with-gcc=C:/ Mingw/bin/gcc.exe'? I received those errors when I forgot to do that.
Yep that fixed that. Thanks.
I think that 'gettimeofday' is statically linked into the ghc executable, so it's just that GHCi doesn't know about it. Adding a:
Sym(gettimeofday) \
line to the RTS_MINGW_ONLY_SYMBOLS #define in rts/Linker.c (from line 265) seemed to fix the problem for me.
I'm not sure if this is a GHCi bug or something else being awry. 'gettimeofday' was added to the mingwex library in mingw- runtime-3.10, which was released in July last year, so I would have expected this problem to have come up before now...
I made this change but I still get the error unknown symbol `_gettimeofday' I'm using mingw 5.1.3 which as far as i can tell should use the 3.11 runtime.

On 11/04/2007, at 7:52 pm, Chris Witte wrote:
I made this change but I still get the error unknown symbol `_gettimeofday' I'm using mingw 5.1.3 which as far as i can tell should use the 3.11 runtime.
Ensure that HAVE_GETTIMEOFDAY is defined in mk/config.h. Also, I discovered that changes to Linker.c don't make it into ghc.exe if you just do a 'make' in the base directory. You need to make the RTS, then link ghc with the new RTS. The following commands work for me (more typing, but a lot faster than making clean): make -C rts rm compiler/stage2/ghc.exe make -C compiler stage=2 make install Hope that helps. Regards, Andrew.

Awesome that works!
Thanks for your help.
Well that works for the ghc-6.7.20070402 tar ball but if I try and
pull down the darcs head it fails to make with
make[1]: Entering directory `/c/cwitte/source/ghc/libraries'
rm -f -f stamp/configure.library.*.base
cd base && setup/Setup configure \
\
--prefix=/usr/local \
--with-compiler=../../compiler/ghc-inplace.bat \
--with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace.bat \
--with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace.bat \
--with-ld=/mingw/bin/ld \
--datasubdir=ghc \
--haddock-args="--use-contents=../index.html
--use-index=../doc-index.html" \
--configure-option=--with-cc=c:/mingw/bin/gcc.exe
The system cannot find the path specified.
make[1]: *** [stamp/configure.library.build.base] Error 1
make[1]: Leaving directory `/c/cwitte/source/ghc/libraries'
make: *** [stage1] Error 2
I wonder what has changed between then and now to cause this.
On 4/12/07, Andrew Appleyard
On 11/04/2007, at 7:52 pm, Chris Witte wrote:
I made this change but I still get the error unknown symbol `_gettimeofday' I'm using mingw 5.1.3 which as far as i can tell should use the 3.11 runtime.
Ensure that HAVE_GETTIMEOFDAY is defined in mk/config.h.
Also, I discovered that changes to Linker.c don't make it into ghc.exe if you just do a 'make' in the base directory. You need to make the RTS, then link ghc with the new RTS. The following commands work for me (more typing, but a lot faster than making clean):
make -C rts rm compiler/stage2/ghc.exe make -C compiler stage=2 make install
Hope that helps.
Regards, Andrew.

On 13/04/2007, at 11:03 am, Chris Witte wrote:
Well that works for the ghc-6.7.20070402 tar ball but if I try and pull down the darcs head it fails to make with ... I wonder what has changed between then and now to cause this.
Not sure about that one, I was building ghc-6.6. Darcs should be able to help you find the changes, of course which ones are causing the problem is another story... Regards, Andrew.
participants (2)
-
Andrew Appleyard
-
Chris Witte