problem building for cygwin

Beni Kavanagh b.i.kavanagh at sms.ed.ac.uk
Thu Sep 16 07:10:46 EDT 2004


> > Has anyone else ran into this problem. Am I making a mistake?
> 
> In the terminology of the build system, you're building with
> host=i386-unknown-mingw32 and target=i386-unknown-cygwin32.  Try
> configuring with those options.
> 
> Sounds like the compiler's Makefile should be checking the host rather
> than the target when adding -package unix too.
> 
> Cheers,
> 	Simon


(Again, I am building from 6.2.1). 

If I try to configure cygwin with host = "i386-unknown-mingw32", target =
"i386-unknown-cygwin32" it complains that cross compilation is not
supported. Did you mean I should go through the cross compilation process?

Is there an unofficial binary release for ghc-6.2.1 on cygwin?

All I really need is Readline which is not built into the mingw binary
release. Initially I tried to get the mingw build to work. This failed. The
script 'configure' hangs in the step "checking if your perl works in shell
scripts". 

Has anyone had this problem?

Here was my path in the mingw terminal

$ echo $PATH
.:/usr/local/bin:/mingw/bin:/bin:/c/Program
Files/Ghostgum/gsview:/c/Ghostscript/gs8.14/bin:/c/WINDOWS/system32:/c/WINDO
WS:/c/WINDOWS/System32/Wbem:/c/Program Files/Common Files/Autodesk
Shared/:/c/Program Files/Common Files/Roxio Shared/DLLShared

Cygwin is intalled. This problem occurs when c:/cygwin/bin is in the path or
not.

Here is a snippet of the trace where it hangs, in case that could be of use.


Ben


--- STRACE BELOW
checking for perl... /bin/perl
checking if your perl works in shell scripts... 


   36   44296 [main] sh 2592 path_conv::check:
this->path(c:\ghc\ghc-6.2.1\configure), has_acls(1)
   39   44335 [main] sh 2592 build_fh_pc: fh 0x616D1438
   41   44376 [main] sh 2592 fhandler_base::open:
(c:\ghc\ghc-6.2.1\configure, 0x100000)
   89   44465 [main] sh 2592 fhandler_base::open: 0 = NtCreateFile (0x6C4,
80100000, c:\ghc\ghc-6.2.1\configure, io, NULL, 0, 7, 1, 20, NULL, 0)
   38   44503 [main] sh 2592 fhandler_base::set_flags: flags 0x100000,
supplied_bin 0x10000
   33   44536 [main] sh 2592 fhandler_base::set_flags: filemode set to
binary
   33   44569 [main] sh 2592 fhandler_base::open: 1 = fhandler_base::open
(c:\ghc\ghc-6.2.1\configure, 0x100000)
   33   44602 [main] sh 2592 fhandler_base::open_fs: 1 =
fhandler_disk_file::open (c:\ghc\ghc-6.2.1\configure, 0x0)
   33   44635 [main] sh 2592 open: 3 = open (configure, 0x0)
   41   44676 [main] sh 2592 dtable::dup2: dup2 (3, 10)
   35   44711 [main] sh 2592 build_fh_pc: fh 0x616D1640
   33   44744 [main] sh 2592 fhandler_base::dup: in fhandler_base dup
   36   44780 [main] sh 2592 dtable::dup_worker: duped
'/cygdrive/c/ghc/ghc-6.2.1/configure' old 0x6C4, new 0x68C
   34   44814 [main] sh 2592 dtable::dup2: newfh->io_handle 0x68C,
oldfh->io_handle 0x6C4
   32   44846 [main] sh 2592 dtable::dup2: 10 = dup2 (3, 10)
   32   44878 [main] sh 2592 fcntl_worker: 10 = fcntl (3, 0, 0xA)
   38   44916 [main] sh 2592 close: close (3)
   33   44949 [main] sh 2592 fhandler_base::close: closing
'/cygdrive/c/ghc/ghc-6.2.1/configure' handle 0x6C4
   42   44991 [main] sh 2592 close: 0 = close (3)
   36   45027 [main] sh 2592 fhandler_base::set_close_on_exec: set
close_on_exec for /cygdrive/c/ghc/ghc-6.2.1/configure to 1
   47   45074 [main] sh 2592 fcntl_worker: 0 = fcntl (10, 2, 0x1)
   39   45113 [main] sh 2592 fhandler_base::set_flags: flags 0x120000,
supplied_bin 0x0
   33   45146 [main] sh 2592 fhandler_base::set_flags: O_TEXT/O_BINARY set
in flags 0x20000
   32   45178 [main] sh 2592 fhandler_base::set_flags: filemode set to text
   32   45210 [main] sh 2592 _cygwin_istext_for_stdio: fd 10: defaulting to
text
  109   45319 [main] sh 2592 setmode_helper: improbable



> -----Original Message-----
> From: Simon Marlow [mailto:simonmar at microsoft.com]
>
> >> From a clean windows box I
> >
> > Installed cygwin to c:/cygwin
> > Added c:/cygwin/bin to path
> > Installed MSys and MinGW in c:/msys and c:/mingw   (did not add path)
> > Installed ghc to c:/ghc/ghc-6.2.1
> > Untarred source to c:/ghc/ghc-6.2.1    (same dir)
> > Copied perl from ghc dist to /cygwin/bin/perl
> > Downloaded and build happy and alex     (not that this is necessary
> > but built just fine)
> > Ran ./configure --with-ghc=c:/ghc/ghc-6.2.1/bin/ghc --with-
> >                                          gcc=c:/cygwin/bin/gcc
> >
> > make
> >
> > failed while trying to build ghc/compiler. The build rules give the
> > argument -package unix but the binary ghc release from
> > www.haskell.org is a mingw version and so doesn't have package unix.
> > Of course inorder to build the unix library I need
> > ghc/compiler/ghc-inplace and I'm now skuppered.
> >
> > Has anyone else ran into this problem. Am I making a mistake?
> 
> In the terminology of the build system, you're building with
> host=i386-unknown-mingw32 and target=i386-unknown-cygwin32.  Try
> configuring with those options.
> 
> Sounds like the compiler's Makefile should be checking the host rather
> than the target when adding -package unix too.
> 
> Cheers,
> 	Simon




More information about the Glasgow-haskell-users mailing list