Mitchell, Neil | 8 Sep 10:40
Favicon

Windows build failure

Hi,

I've just tried building GHC HEAD using GHC 6.8.3 on Windows following
the instructions on the wiki
(http://hackage.haskell.org/trac/ghc/wiki/Building/Windows)

I initially got a failure about cc1 not being found when executing
6.8.3's gcc, which I worked around by adding c:/ghc/ghc-6.8.3/gcc-lib at
the end of the path (i.e. last priority)

After this error I get a problem with include files, see the attached
log file. It looks like include files are going wrong between Mingw and
6.8.3. My current $PATH variable is:

/cygdrive/c/mingw/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdr
ive/c/WI
NNT/Microsoft.NET/Framework/v2.0.50727:/cygdrive/c/local/MikTex/texmf/mi
ktex/bin
:/cygdrive/c/Perl/site/bin:/cygdrive/c/Utils/mks/MKSNT:/cygdrive/c/WINNT
/system3
2:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/cygdrive/c/CSsystem
:/cygdri
ve/c/Utils:/cygdrive/c/Program
Files/Sybase.12/OCS-12_0/bin:/cygdrive/c/ghc/ghc-
6.8.3:/cygdrive/c/ghc/ghc-6.8.3/bin:/cygdrive/c/bin:/cygdrive/c/Program
Files/Ha
skell/bin:/cygdrive/f/ImslNT.30/CNL/Bin:/cygdrive/c/Utils/mks/mksnt:/cyg
drive/f/
Fame/76:/cygdrive/c/Utils/mks/MKSNT:/cygdrive/c/ghc/ghc-6.8.3/gcc-lib

(Continue reading)

Mitchell, Neil | 9 Sep 13:08
Favicon

RE: Windows build failure

Hi,

I worked around the first problem, lacking cc1, by following the
instructions here: http://www.nabble.com/cc1-not-found-td9742088.html -
adding c:\mingw\libexec\gcc\mingw32\3.4.5 to the $PATH. Then I get a
shorter error:

cd hpc    && c:/ghc-build/ghc/libraries/cabal-bin
c:/ghc/ghc-6.8.3/bin/ghc c:/gh
c-build/ghc/libraries/bootstrapping.conf configure
--distpref=dist-bootstrapping
 --with-compiler=c:/ghc/ghc-6.8.3/bin/ghc
--with-hc-pkg=c:/ghc/ghc-6.8.3/bin/ghc
-pkg --package-db=c:/ghc-build/ghc/libraries/bootstrapping.conf.tmp
Configuring hpc-0.5...
cd hpc    && c:/ghc-build/ghc/libraries/cabal-bin
c:/ghc/ghc-6.8.3/bin/ghc c:/gh
c-build/ghc/libraries/bootstrapping.conf build
--distpref=dist-bootstrapping

Preprocessing library hpc-0.5...
In file included from
/mingw/lib/gcc/mingw32/3.4.5/../../../../include/float.h:1
9,
                 from c:/ghc/ghc-6.8.3/include/mingw/float.h:19,
                 from c:/ghc/ghc-6.8.3/include/HsFFI.h:69,
                 from c:/ghc/ghc-6.8.3/template-hsc.h:4,
                 from
dist-bootstrapping\build\Trace\Hpc\Reflect_hsc_make.c:1:
/mingw/include/float.h:102: error: syntax error before "_controlfp"
(Continue reading)

Mitchell, Neil | 9 Sep 15:56
Favicon

RE: Windows build failure

Hi

I've now got a build of GHC, and a binary distribution. The compilation
succeeded after the hacks detailed in the previous message.

There are now two issues:

* runhaskell isn't in ghc/bin - but runghc is. I guess something forgot
to get copied or created. This issue is very minor to me, but will be of
great significance if it was missing in a release.

* The ghc API package hasn't been installed. "ghc-pkg list" gives:

C:\Neil\haddock>ghc-pkg list
C:/ghc/ghc-6.9.20080905\package.conf:
    Cabal-1.5.4, Win32-2.1, array-0.1, base-3.0.3.0, base-4.0,
    bytestring-0.9, containers-0.1, directory-1.0, filepath-1.1,
    ghc-prim-0.1, {haddock-2.2.2}, haskell98-1.0.1, hpc-0.5,
    integer-0.1, old-locale-1.0, old-time-1.0, packedstring-0.1,
    pretty-1.0, process-1.0.1, random-1.0, rts-1.0, syb-0.1,
    template-haskell-2.2

My aim of building GHC was to run haddock (and eventually hoogle), so
not having the ghc library available is a problem. Does something have
to be configured to get the library? Is it hiding somewhere, just not
exposed? How did haddock-2.2.2 get installed and compiled without a ghc
library?

Thanks

(Continue reading)

Mitchell, Neil | 9 Sep 16:05
Favicon

RE: Windows build failure

Hi

The haddock placed in bin/ also seems to want to find
bin/inplace-datadir/package.conf, which isn't in the distribution
tarball as well. I guess haddock either needs building again, or not
distributing.

Thanks

Neil

-----Original Message-----
From: Mitchell, Neil 
Sent: 09 September 2008 2:56 pm
To: 'glasgow-haskell-users <at> haskell.org'
Subject: RE: Windows build failure

Hi

I've now got a build of GHC, and a binary distribution. The compilation
succeeded after the hacks detailed in the previous message.

There are now two issues:

* runhaskell isn't in ghc/bin - but runghc is. I guess something forgot
to get copied or created. This issue is very minor to me, but will be of
great significance if it was missing in a release.

* The ghc API package hasn't been installed. "ghc-pkg list" gives:

(Continue reading)

Mitchell, Neil | 9 Sep 17:16
Favicon

Windows HEAD issues

Hi

Another small issue, pwd.exe is placed in the bin directory. Given that
pwd is a common and well understood command, GHC shouldn't be hijacking
it with a completely different program.

Further playing with the haddock installed by GHC shows it to have
hardcoded the mingw gcc patch on the build machine into the binary,
which causes it to fail when installed on a machine without mingw.

Thanks

Neil

-----Original Message-----
From: Mitchell, Neil 
Sent: 09 September 2008 3:05 pm
To: 'glasgow-haskell-users <at> haskell.org'
Subject: RE: Windows build failure

Hi

The haddock placed in bin/ also seems to want to find
bin/inplace-datadir/package.conf, which isn't in the distribution
tarball as well. I guess haddock either needs building again, or not
distributing.

Thanks

Neil
(Continue reading)

Ian Lynagh | 13 Sep 02:07
Gravatar

Re: Windows HEAD issues


Hi Neil,

On Tue, Sep 09, 2008 at 04:16:47PM +0100, Mitchell, Neil wrote:
> 
> Another small issue, pwd.exe is placed in the bin directory. Given that
> pwd is a common and well understood command, GHC shouldn't be hijacking
> it with a completely different program.

Fixed; thanks for the report.

> Further playing with the haddock installed by GHC shows it to have
> hardcoded the mingw gcc patch on the build machine into the binary,
> which causes it to fail when installed on a machine without mingw.

If you want to put it on a different machine then you'll have to do it
as part of a GHC bindist (make binary-dist). If that's not working then
can you please give more details, showing what's going wrong?

Thanks
Ian
Mitchell, Neil | 15 Sep 10:11
Favicon

RE: Windows HEAD issues

Hi

> If you want to put it on a different machine then you'll have 
> to do it as part of a GHC bindist (make binary-dist). If 
> that's not working then can you please give more details, 
> showing what's going wrong?

I did do a binary-dist, and that wasn't working when moved to a
different machine. Unfortunately I've tweaked and hacked at too much now
to know whether haddock is working or not, and if I've broken it or not.
Will try and remember to take a look when I make a fresh build.

Thanks

Neil

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
Simon Peyton-Jones | 9 Sep 16:32

RE: Windows build failure

Thanks very much Neil; we (well Ian!) will digest your efforts.

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces <at> haskell.org [mailto:glasgow-haskell-users-
| bounces <at> haskell.org] On Behalf Of Mitchell, Neil
| Sent: 09 September 2008 14:56
| To: glasgow-haskell-users <at> haskell.org
| Subject: RE: Windows build failure
|
| Hi
|
| I've now got a build of GHC, and a binary distribution. The compilation
| succeeded after the hacks detailed in the previous message.
|
| There are now two issues:
|
| * runhaskell isn't in ghc/bin - but runghc is. I guess something forgot
| to get copied or created. This issue is very minor to me, but will be of
| great significance if it was missing in a release.
|
| * The ghc API package hasn't been installed. "ghc-pkg list" gives:
|
| C:\Neil\haddock>ghc-pkg list
| C:/ghc/ghc-6.9.20080905\package.conf:
|     Cabal-1.5.4, Win32-2.1, array-0.1, base-3.0.3.0, base-4.0,
|     bytestring-0.9, containers-0.1, directory-1.0, filepath-1.1,
|     ghc-prim-0.1, {haddock-2.2.2}, haskell98-1.0.1, hpc-0.5,
|     integer-0.1, old-locale-1.0, old-time-1.0, packedstring-0.1,
(Continue reading)

Ian Lynagh | 10 Sep 13:24
Gravatar

Re: Windows build failure

On Tue, Sep 09, 2008 at 02:56:28PM +0100, Mitchell, Neil wrote:
> 
> * runhaskell isn't in ghc/bin - but runghc is. I guess something forgot
> to get copied or created. This issue is very minor to me, but will be of
> great significance if it was missing in a release.

Thanks; trac'ed as #2582 so I don't forget about it.

> * The ghc API package hasn't been installed. "ghc-pkg list" gives:

Do you have this patch?:

[Install the stage 2 ghc package when installing; fixes trac #2567
Ian Lynagh <igloo <at> earth.li>**20080906142546] {
hunk ./compiler/Makefile 196
-# XXX We ought to actually install the (stage 2) library
hunk ./compiler/Makefile 197
-       @:
+       $(INSTALL_PACKAGE) install '$(GHC_PKG_INSTALL_PROG)' '$(DESTDIR)$(datadi
r)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)'
 '$(ilibexecdir)' '$(idynlibdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(ih
addockdir)' --distpref dist-stage2
[...]

Thanks
Ian
Mitchell, Neil | 10 Sep 13:26
Favicon

RE: Windows build failure


> * The ghc API package hasn't been installed. "ghc-pkg list" gives:

| Do you have this patch?:

Probably not, I've just pulled and am rebuilding.

Thanks

Neil

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
Ian Lynagh | 10 Sep 14:14
Gravatar

Re: Windows build failure

On Wed, Sep 10, 2008 at 12:26:00PM +0100, Mitchell, Neil wrote:
> 
> > * The ghc API package hasn't been installed. "ghc-pkg list" gives:
> 
> | Do you have this patch?:
> 
> Probably not, I've just pulled and am rebuilding.

OK, I think your haddock problems are also fixed in the HEAD, by:
    [Fix in-tree haddock on Windows
    Ian Lynagh <igloo <at> earth.li>**20080829000742] {
so if you ./darcs-all pull then that should work too.

Thanks
Ian
Mitchell, Neil | 10 Sep 14:45
Favicon

RE: Windows build failure

Hi Ian,

Fresh pull, and I get in bind-dist:

------------------------------------------------------------------------
../../utils/mkdirhier/mkdirhier
c:/ghc-build/ghc/ghc-6.9.20080905/share/man
mkdir c:/ghc-build/ghc/ghc-6.9.20080905/share
mkdir c:/ghc-build/ghc/ghc-6.9.20080905/share/man
../../utils/mkdirhier/mkdirhier
c:/ghc-build/ghc/ghc-6.9.20080905/share/man/man1

mkdir c:/ghc-build/ghc/ghc-6.9.20080905/share/man/man1
/usr/bin/install -c -m 644    ghc.1
c:/ghc-build/ghc/ghc-6.9.20080905/share/man/
man1
Finished making install-docs in man: 0
------------------------------------------------------------------------
== make install-docs - --no-print-directory -r;
 in /cygdrive/c/ghc-build/ghc/docs/docbook-cheat-sheet
------------------------------------------------------------------------
make[3]: Nothing to be done for `install-docs'.
Finished making install-docs in docbook-cheat-sheet: 0
------------------------------------------------------------------------
== make install-docs - --no-print-directory -r;
 in /cygdrive/c/ghc-build/ghc/docs/users_guide
------------------------------------------------------------------------
make[3]: Nothing to be done for `install-docs'.
Finished making install-docs in users_guide: 0
------------------------------------------------------------------------
(Continue reading)

Ian Lynagh | 13 Sep 02:11
Gravatar

Re: Windows build failure


Hi Neil,

On Wed, Sep 10, 2008 at 01:45:34PM +0100, Mitchell, Neil wrote:
> 
> Fresh pull, and I get in bind-dist:
> 
> == make install-docs - --no-print-directory -r;
>  in /cygdrive/c/ghc-build/ghc/docs/ext-core
> ------------------------------------------------------------------------
> make[3]: *** No rule to make target `install-docs'.  Stop.
> Failed making install-docs in ext-core: 1
> make[2]: *** [install-docs] Error 1
> make[1]: *** [install-docs] Error 1
> make[1]: Leaving directory `/cygdrive/c/ghc-build/ghc'
> make: *** [binary-dist] Error 2
> 
> Ext-core install-docs doesn't work?

This is fixed now.

Thanks
Ian
Ian Lynagh | 10 Sep 13:19
Gravatar

Re: Windows build failure

On Tue, Sep 09, 2008 at 12:08:12PM +0100, Mitchell, Neil wrote:
> 
> #define __MINGW_NOTHROW
> 
> So I added c:\mingw\lib\gcc\mingw32\3.4.5 to the $PATH, where I found a
> copy of crtbegin.o.

I'm not sure what's happening here, but I think we should see if the
forthcoming -B patch fixes these too.

Thanks
Ian
Ian Lynagh | 10 Sep 02:52
Gravatar

Re: Windows build failure


Hi Neil,

On Mon, Sep 08, 2008 at 09:40:47AM +0100, Mitchell, Neil wrote:
> 
> I initially got a failure about cc1 not being found when executing
> 6.8.3's gcc, which I worked around by adding c:/ghc/ghc-6.8.3/gcc-lib at
> the end of the path (i.e. last priority)

I'm not sure why some people see this and others don't. Anyway, John
Dias has also seen it, and he and Duncan are working on a patch for it
(basically, Cabal needs to pass a "-B <path>" flag to gcc, to tell it
where its bits are).

Thanks
Ian
Mitchell, Neil | 10 Sep 09:08
Favicon

RE: Windows build failure

Hi Ian,

> I initially got a failure about cc1 not being found when executing 
> 6.8.3's gcc, which I worked around by adding c:/ghc/ghc-6.8.3/gcc-lib 
> at the end of the path (i.e. last priority)

| I'm not sure why some people see this and others don't. Anyway, John
Dias has also seen it, and he and Duncan
| are working on a patch for it (basically, Cabal needs to pass a "-B
<path>" flag to gcc, to tell it where its bits are).

My best guess is that it's a mingw issue, something that chanced in
recent release. It seems to effect more than just GHC.

Thanks

Neil

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
Claus Reinke | 10 Sep 11:57

Re: Windows build failure

| I'm not sure why some people see this and others don't. Anyway, John
| Dias has also seen it, and he and Duncan
| are working on a patch for it (basically, Cabal needs to pass a "-B
| <path>" flag to gcc, to tell it where its bits are).

>My best guess is that it's a mingw issue, something that chanced in
>recent release. It seems to effect more than just GHC.

If it was just a mingw issue, you could simply go back to an
old mingw (mine has gcc 3.4.2). From what I can tell (and I'm
just a user) there are interactions with Vista and cygwin. 

Vista changed some APIs wrt earlier windows versions, which 
needed following, and occasionally someone changes mingw 
without taking those changes into account. I thought that mingw 
had decoupled from the cygwin version of mingw, but there is 
still talk about that, about not picking up the wrong versions of 
gcc tools (which relates to usage of -B).

Anyway, you can read about it on the mingw mailing list and
bug tracker. Below is an email I was about to send when Neil 
reported that he had got things going himself.

Claus

-----------------
1. are you using 
    - cygwin bash+mingw gcc
    - msys bash+mingw gcc?

(Continue reading)

Mitchell, Neil | 10 Sep 12:47
Favicon

RE: Windows build failure

Hi Claus,

For reference, I'm using cygwin bash+mingw gcc on Windows XP, following
your instructions as closely as possible - but with the latest version
of cygwin and mingw.

The biggest niggle for me currently is the lack of the GHC API, which is
built in stage2, but not transferred across to the bindist. However,
there seem to be lots of little things that will require fixing before
the Windows version is ready for release.

> If it was just a mingw issue, you could simply go back to an old mingw
(mine has gcc 3.4.2).
> From what I can tell (and I'm just a user) there are interactions with
Vista and cygwin.

My new home computer will almost certainly be Vista, so I guess I'm in
for a world of fun then :-)

Thanks

Neil

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
Claus Reinke | 10 Sep 13:16

Re: Windows build failure

>For reference, I'm using cygwin bash+mingw gcc on Windows XP, following
>your instructions as closely as possible - but with the latest version
>of cygwin and mingw.

Then I'm really surprised to see you having so much trouble. Unless you've
accidentally installed parts of the cygwin gcc chain (or cygwin's --no-cygwin
mingw variant), that would mean issues in the latest mingw versions. Perhaps
going back to an older mingw is easier than working around those issues?

>The biggest niggle for me currently is the lack of the GHC API, which is
>built in stage2, but not transferred across to the bindist. 

Sat Sep  6 15:25:46 GMT Daylight Time 2008  Ian Lynagh <igloo <at> earth.li>
  * Install the stage 2 ghc package when installing; fixes trac #2567

    M ./compiler/Makefile -2 +1
    M ./compiler/ghc.cabal -1 +1
    M ./libraries/Makefile -31
    M ./mk/cabal-flags.mk +34

>there seem to be lots of little things that will require fixing before
>the Windows version is ready for release.

Yes, but since 'make binary-dist' is working again, we can at least
start reporting those little things (though Ian sometimes insists on
seeing a trac ticket first rather than a mere email, as in the ghc 
package case;-).

>My new home computer will almost certainly be Vista, so I guess I'm 
>in for a world of fun then :-)
(Continue reading)


Gmane