
I'm tying to compile GHC under mingw (winxp with mingw no cygwin), everything appears to go OK but when I run make install it fails to copy some files cp -rp ./../include/* /usr/local/include/mingw cp: cannot stat `./../include/*': No such file or directory make: [install] Error 1 (ignored) cp -rp ./../lib/gcc-lib/mingw32/3.4.2/* /usr/local/gcc-lib cp: cannot stat `./../lib/gcc-lib/mingw32/3.4.2/*': No such file or directory make: [install] Error 1 (ignored) cp -rp ./../lib/gcc/mingw32/3.4.2/* /usr/local/gcc-lib cp: cannot stat `./../lib/gcc/mingw32/3.4.2/*': No such file or directory make: [install] Error 1 (ignored) cp -rp ./../libexec/gcc/mingw32/3.4.2/* /usr/local/gcc-lib cp: cannot stat `./../libexec/gcc/mingw32/3.4.2/*': No such file or directory make: [install] Error 1 (ignored) cp ./../lib/*.* /usr/local/gcc-lib cp: cannot stat `./../lib/*.*': No such file or directory make: [install] Error 1 (ignored) cp ./gcc.exe /usr/local cp: cannot stat `./gcc.exe': No such file or directory make: [install] Error 1 (ignored) cp ./as.exe /usr/local/gcc-lib cp: cannot stat `./as.exe': No such file or directory make: [install] Error 1 (ignored) cp ./ld.exe /usr/local/gcc-lib cp: cannot stat `./ld.exe': No such file or directory make: [install] Error 1 (ignored) cp ./dllwrap.exe /usr/local/gcc-lib cp: cannot stat `./dllwrap.exe': No such file or directory make: [install] Error 1 (ignored) cp ./dlltool.exe /usr/local/gcc-lib cp: cannot stat `./dlltool.exe': No such file or directory make: [install] Error 1 (ignored) cp /c/ghc/ghc-6.6/bin/../perl.exe /usr/local cp /c/ghc/ghc-6.6/bin/../perl56.dll /usr/local for i in ANNOUNCE LICENSE README; do \ /bin/install -c -m 644 $i /usr/local; \ done and then when I try and run, say, GHCi I get $ ghcii.sh ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.7.20070323, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base ... linking ... ghc.exe: unable to load package `base' ghc.exe: C:/msys/1.0/local/HSbase.o: unknown symbol `_gettimeofday' any ideas on what could be causing this. Cheers Chris Witte

On Fri, Mar 30, 2007 at 04:36:32PM +1000, Chris Witte wrote:
I'm tying to compile GHC under mingw (winxp with mingw no cygwin),
Loading package base ... linking ... ghc.exe: unable to load package `base' ghc.exe: C:/msys/1.0/local/HSbase.o: unknown symbol `_gettimeofday'
any ideas on what could be causing this.
What does grep -i gettimeofday mk/config.h say? If HAVE_GETTIMEOFDAY is defined then either comment it out (between running configure and running make), or work out why the configure test is succeeding but it doesn't work when GHC tries to use it. Thanks Ian

HAVE_GETTIMEOFDAY is defined. I wrote a quick c program to check and I
can use gettimeofday fine. I can't work out why ghc can't find it. How
can I work out where ghc is searching to find it?
Chris.
On 3/30/07, Ian Lynagh
On Fri, Mar 30, 2007 at 04:36:32PM +1000, Chris Witte wrote:
I'm tying to compile GHC under mingw (winxp with mingw no cygwin),
Loading package base ... linking ... ghc.exe: unable to load package `base' ghc.exe: C:/msys/1.0/local/HSbase.o: unknown symbol `_gettimeofday'
any ideas on what could be causing this.
What does
grep -i gettimeofday mk/config.h
say?
If HAVE_GETTIMEOFDAY is defined then either comment it out (between running configure and running make), or work out why the configure test is succeeding but it doesn't work when GHC tries to use it.
Thanks Ian

Hi,
On 3/30/07, Chris Witte
I'm tying to compile GHC under mingw (winxp with mingw no cygwin), everything appears to go OK but when I run make install it fails to copy some files
[snip copy errors on make install]
Loading package base ... linking ... ghc.exe: unable to load package `base' ghc.exe: C:/msys/1.0/local/HSbase.o: unknown symbol `_gettimeofday'
any ideas on what could be causing this.
My guess is that your mingw version is diffrent from the one makefile assumes. Atleast that problem I have had in past - using diffrent mingw than ghc/mingw maintainer. You can check this by running in-place scripts and checking if ghci works that way. You could also try copying neccesary stuff from existing ghc installation - but that might cause even more wierd errors. HTH, Esa Ilari Vuokko

On 30/03/2007, at 4:36 pm, Chris Witte wrote:
cp -rp ./../include/* /usr/local/include/mingw cp: cannot stat `./../include/*': No such file or directory
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.
Loading package base ... linking ... ghc.exe: unable to load package `base' ghc.exe: C:/msys/1.0/local/HSbase.o: unknown symbol `_gettimeofday'
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... Regards, Andrew.
participants (5)
-
Andrew Appleyard
-
Chris Witte
-
Esa Ilari Vuokko
-
Ian Lynagh
-
Matthew William Cox