Hi! Bryn <brk@jenkon.com> is trying to compile C->Haskell with GHC on Win32, but ran into some problems. Firstly, configure says, $ ./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 [..] So, it says no Cygwin, but identifies the system as i686-pc-cygwin. AFAIK, GHC uses mingw32 these days, doesn't it? How can this be reliably tested for? (To exclude -package posix on that platform.) Secondly, are there any issues with symlinks? I append a sequence of commands that seems to indicate that GHC doesn't find a file, because it is symlinked. Any ideas? Cheers, Manuel -=- Administrator@BRK ~/hipar/build/ghc5/base/admin $ file BaseVersion.hs BaseVersion.hs: symbolic link to ../../../../base/admin/BaseVersion.hs So, change it to an absolute: Administrator@BRK ~/hipar/build/ghc5/base/admin $ ln -s /home/hipar/base/admin/BaseVersion.hs BaseVersion.hs Administrator@BRK ~/hipar/build/ghc5/base/admin $ ls BaseVersion.hs Common.hs Config.hs Makefile Administrator@BRK ~/hipar/build/ghc5/base/admin $ file BaseVersion.hs BaseVersion.hs: symbolic link to /home/hipar/base/admin/BaseVersion.hs The build fails the same way, copy the command line and restrict it to just the file we changed, to be sure: Administrator@BRK ~/hipar/build/ghc5/base $ ghc -M -syslib lang -optdep-f -optdep.depend -iadmin -ierrors -igeneral -igra phs -istate -isyms -isyntax -isysdep admin/BaseVersion.hs ghc.exe: file `admin/BaseVersion.hs' does not exist
Bryn <brk@jenkon.com> is trying to compile C->Haskell with GHC on Win32, but ran into some problems. Firstly, configure says,
$ ./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 [..]
Don't know about this one, sorry. Maybe playing with the --build/--host/--target parameters might help: ./configure --help should give you some information.
So, it says no Cygwin, but identifies the system as i686-pc-cygwin. AFAIK, GHC uses mingw32 these days, doesn't it? How can this be reliably tested for? (To exclude -package posix on that platform.)
Secondly, are there any issues with symlinks? I append a sequence of commands that seems to indicate that GHC doesn't find a file, because it is symlinked.
GHC doesn't know about Cygwin symbolic links. One way to deal with this is to hand patch configure to use "cp" instad of "ln -s" wherever needed. Another way might be to use the mingw32 MSYS environment, which is a Cygwin branch hosting Mingw32 tools in a Posix setting, so that configure works a-la Cygwin, but the output executables are normal Mingw32 programs - ie, they know nothing about Cygwinisms. Certain other gotcha's associated with Mingw32 under Cygwin are also removed. They are currently focused on the symlink problem.
participants (2)
-
Manuel M. T. Chakravarty -
Mike Thomas