GHC on Win32 strangeness

Simon Peyton-Jones simonpj@microsoft.com
Mon, 11 Feb 2002 01:22:47 -0800


I've updated the instructions on win32 building, but they havn't
got to the web site yet.

You have to say

./configure --host=3Di386-unknown-mingw32 --with-gcc=3D/mingw/bin/gcc


Without this, things go badly arwy. =20

For the --with-gcc part you need to install a mingwin bundle from
	http://www.mingw.org

Simon


| -----Original Message-----
| From: Manuel M. T. Chakravarty [mailto:chak@cse.unsw.edu.au]=20
| Sent: 11 February 2002 03:24
| To: glasgow-haskell-users@haskell.org
| Cc: brk@jenkon.com
| Subject: GHC on Win32 strangeness
|=20
|=20
| Hi!
|=20
| Bryn <brk@jenkon.com> is trying to compile C->Haskell with
| GHC on Win32, but ran into some problems.  Firstly,
| configure says,
|=20
|   $ ./configure
|   loading cache ./config.cache
|   checking host system type... i686-pc-cygwin
|   checking target system type... i686-pc-cygwin
|   checking build system type... i686-pc-cygwin
|   checking for Cygwin environment... (cached) no
|   checking for gcc... (cached) gcc
|   [..]
|=20
| So, it says no Cygwin, but identifies the system as=20
| i686-pc-cygwin.  AFAIK, GHC uses mingw32 these days, doesn't=20
| it?  How can this be reliably tested for?  (To exclude=20
| -package posix on that platform.)
|=20
| Secondly, are there any issues with symlinks?  I append a=20
| sequence of commands that seems to indicate that GHC doesn't=20
| find a file, because it is symlinked.
|=20
| Any ideas?
|=20
| Cheers,
| Manuel
|=20
| -=3D-
|=20
| Administrator@BRK ~/hipar/build/ghc5/base/admin
| $ file BaseVersion.hs
| BaseVersion.hs: symbolic link to ../../../../base/admin/BaseVersion.hs
|=20
| So, change it to an absolute:
|=20
| Administrator@BRK ~/hipar/build/ghc5/base/admin
| $ ln -s /home/hipar/base/admin/BaseVersion.hs BaseVersion.hs
|=20
| Administrator@BRK ~/hipar/build/ghc5/base/admin
| $ ls
| BaseVersion.hs  Common.hs  Config.hs  Makefile
|=20
| Administrator@BRK ~/hipar/build/ghc5/base/admin
| $ file BaseVersion.hs
| BaseVersion.hs: symbolic link to /home/hipar/base/admin/BaseVersion.hs
|=20
| The build fails the same way, copy the command line and=20
| restrict it to just the file we changed, to be sure:
|=20
| Administrator@BRK ~/hipar/build/ghc5/base
| $ ghc -M -syslib lang -optdep-f -optdep.depend -iadmin=20
| -ierrors -igeneral -igra phs -istate -isyms -isyntax -isysdep=20
| admin/BaseVersion.hs
| ghc.exe: file `admin/BaseVersion.hs' does not exist=20
| _______________________________________________
| Glasgow-haskell-users mailing list=20
| Glasgow-haskell-users@haskell.org=20
| http://www.haskell.org/mailman/listinfo/glasgow-| haskell-users
|=20