building ghc from source
johago@web.de
johago@web.de
Sat, 24 May 2003 14:00:07 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0317_01C321FC.C8B81BD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
----- Original Message -----=20
From: Simon Peyton-Jones=20
To: johago@web.de ; GHC bugs=20
Sent: Monday, May 19, 2003 10:23 AM
Subject: RE: building ghc from source
[Redirecting this to GHC bugs]
=20
9. Entered
"./configure --host=3Di386-unknown-mingw32 =
--with-gcc=3D/cygdrive/c/MinGW/bin/gc
c". No errors occurred.
I believe your problem is here. You must not use Cygwin-style paths =
when specifying what GCC is. Instead use
--with-gcc=3Dc:/mingw/bin/gcc
Can you let me know if that fixes it? (remove config.cache before =
reconfiguring)
The online Building Guide is wrong on this point, but it's fixed in =
the repository. I'll try to get the fixed version online asap.
=20
Simon
I tried to compile the current cvs sources (using the windows binary =
distribution of ghc-5.04.3), following your instructions. Giving a =
windows style path name for for the gcc executable seems to solve my =
(first) problem. According to Mike Thomas' and Derek Elkins' posts, I =
also enabled HAVE_O_BINARY in config.h.
./configure --build=3Di386-unknown-mingw32 --with-gcc=3Dc:/MinGW/bin/gcc
make
--- snip ---
[...]
../../glafp-utils/mkdependC/mkdependC -f .depend -I../../ghc/includes =
-s p --
-mno-cygwin -O -DTARGET_GHC -I../../ghc/includes -- =
GDITypes_stub_ffi.c Win3
2Bitmap_stub_ffi.c Win32Brush_stub_ffi.c Win32Clip_stub_ffi.c =
Win32Control_stub_
ffi.c Win32DLL_stub_ffi.c Win32Dialogue_stub_ffi.c Win32File_stub_ffi.c =
Win32Fon
t_stub_ffi.c Win32Graphics2D_stub_ffi.c Win32HDC_stub_ffi.c =
Win32Icon_stub_ffi.c
Win32Key_stub_ffi.c Win32MM_stub_ffi.c Win32Menu_stub_ffi.c =
Win32Misc_stub_ffi.
c Win32NLS_stub_ffi.c Win32Palette_stub_ffi.c Win32Path_stub_ffi.c =
Win32Pen_stub
_ffi.c Win32Process_stub_ffi.c Win32Region_stub_ffi.c =
Win32Registry_stub_ffi.c W
in32Resource_stub_ffi.c Win32SystemInfo_stub_ffi.c Win32Types_stub_ffi.c =
Win32Wi
nMessage_stub_ffi.c Win32Window_stub_ffi.c WndProc.c diatemp.c dumpBMP.c =
errors.
c finalizers.c spawnProc.c
../../ghc/compiler/ghc-inplace -M -optdep-f -optdep.depend -optdep-s =
-optdepp -o
suf o -H16m -O -cpp -fvia-C -optc-DTARGET_GHC -fglasgow-exts =
-package-name wi
n32 -O -Rghc-timing -package lang GDITypes.hs StdDIS.hs Win32.hs =
Win32Bitmap.hs
Win32Brush.hs Win32Clip.hs Win32Control.hs Win32DLL.hs Win32Dialogue.hs =
Win32Fil
e.hs Win32Font.hs Win32Graphics2D.hs Win32HDC.hs Win32Icon.hs =
Win32Key.hs Win32M
M.hs Win32Menu.hs Win32Misc.hs Win32NLS.hs Win32Palette.hs Win32Path.hs =
Win32Pen
.hs Win32Process.hs Win32Region.hs Win32Registry.hs Win32Resource.hs =
Win32Spawn.
hs Win32SystemInfo.hs Win32Types.hs Win32WinMessage.hs Win32Window.hs
Win32Spawn.hs: can't locate import `GHC.Posix'
make[2]: *** [depend] Error 1
make[1]: *** [boot] Error 1
make[1]: Leaving directory `/cygdrive/c/try6/fptools/hslibs'
make: *** [build] Error 1
--- snap ---
Unfortunately, module GHC.Posix doesn't exist. I read something about =
this module to be unavailable under mingw and that I first had to build =
a cygwin-ghc-inplace which supports posix and then compile mingw-ghc =
with it... Therefore, I try the following:
./configure --build=3Di686-pc-cygwin --host=3Di386-unknown-mingw32
omitting --with-gcc=3Dc:/MinGW/bin/gcc
Is this correct?
Thanks again,
Johannes
johago@web.de
------=_NextPart_000_0317_01C321FC.C8B81BD0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D=20
"urn:schemas-microsoft-com:vml" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE>@font-face {
font-family: Verdana;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt =
90.0pt; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
FONT-WEIGHT: normal; COLOR: blue; FONT-STYLE: normal; FONT-FAMILY: =
Verdana; TEXT-DECORATION: none; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=3DEN-GB vLink=3Dblue link=3Dblue bgColor=3Dwhite><FONT =
face=3DArial size=3D2>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3Dsimonpj@microsoft.com =
href=3D"mailto:simonpj@microsoft.com">Simon=20
Peyton-Jones</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A title=3Djohago@web.de=20
href=3D"mailto:johago@web.de">johago@web.de</A> ; <A=20
title=3Dglasgow-haskell-bugs@haskell.org=20
href=3D"mailto:glasgow-haskell-bugs@haskell.org">GHC bugs</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, May 19, 2003 =
10:23 AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: building ghc from=20
source</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><FONT=20
face=3DArial size=3D2></FONT><FONT face=3DArial size=3D2></FONT><FONT =
face=3DArial=20
size=3D2></FONT><FONT face=3DArial size=3D2></FONT><FONT face=3DArial=20
size=3D2></FONT><FONT face=3DArial size=3D2></FONT><BR></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3DVerdana color=3Dblue size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana">[Redirecting this=20
to GHC bugs]<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DVerdana color=3Dblue size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT face=3D"Times =
New Roman"=20
size=3D3><SPAN style=3D"FONT-SIZE: 12pt">9. Entered<BR>"./configure=20
--host=3Di386-unknown-mingw32 =
--with-gcc=3D/cygdrive/c/MinGW/bin/gc<BR>c". No=20
errors occurred.<FONT color=3Dblue><SPAN=20
style=3D"COLOR: blue"><o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana"><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana">I=20
believe your problem is here. You must not use Cygwin-style =
paths when=20
specifying what GCC is. Instead use<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana"> =20
--with-gcc=3Dc:/mingw/bin/gcc<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana">Can=20
you let me know if that fixes it? (remove config.cache before=20
reconfiguring)<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana">The=20
online Building Guide is wrong on this point, but it=92s fixed in the=20
repository. I=92ll try to get the fixed version online=20
asap.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana">Simon</SPAN></FONT></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><FONT =
face=3DVerdana color=3Dblue=20
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
Verdana"></SPAN></FONT> </P></DIV></BLOCKQUOTE>
<DIV> </DIV>
<DIV>I tried to compile the current cvs sources (using the windows =
binary=20
distribution of ghc-5.04.3), following your instructions. Giving a =
windows style=20
path name for for the gcc executable seems to solve my (first) problem.=20
According to Mike Thomas' and Derek Elkins' posts, I also enabled =
HAVE_O_BINARY=20
in config.h.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>./configure --build=3Di386-unknown-mingw32 =
--with-gcc=3Dc:/MinGW/bin/gcc</DIV>
<DIV>make</DIV>
<DIV> </DIV>
<DIV></FONT><FONT face=3DArial size=3D2>--- snip ---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>[...]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>../../glafp-utils/mkdependC/mkdependC =
-f=20
.depend -I../../ghc/includes -s p =
--<BR> -mno-cygwin -O=20
-DTARGET_GHC -I../../ghc/includes -- =
GDITypes_stub_ffi.c=20
Win3<BR>2Bitmap_stub_ffi.c Win32Brush_stub_ffi.c Win32Clip_stub_ffi.c=20
Win32Control_stub_<BR>ffi.c Win32DLL_stub_ffi.c Win32Dialogue_stub_ffi.c =
Win32File_stub_ffi.c Win32Fon<BR>t_stub_ffi.c Win32Graphics2D_stub_ffi.c =
Win32HDC_stub_ffi.c Win32Icon_stub_ffi.c<BR> Win32Key_stub_ffi.c=20
Win32MM_stub_ffi.c Win32Menu_stub_ffi.c Win32Misc_stub_ffi.<BR>c=20
Win32NLS_stub_ffi.c Win32Palette_stub_ffi.c Win32Path_stub_ffi.c=20
Win32Pen_stub<BR>_ffi.c Win32Process_stub_ffi.c Win32Region_stub_ffi.c=20
Win32Registry_stub_ffi.c W<BR>in32Resource_stub_ffi.c =
Win32SystemInfo_stub_ffi.c=20
Win32Types_stub_ffi.c Win32Wi<BR>nMessage_stub_ffi.c =
Win32Window_stub_ffi.c=20
WndProc.c diatemp.c dumpBMP.c errors.<BR>c finalizers.c=20
spawnProc.c<BR>../../ghc/compiler/ghc-inplace -M -optdep-f =
-optdep.depend=20
-optdep-s -optdepp -o<BR>suf o -H16m -O -cpp -fvia-C=20
-optc-DTARGET_GHC -fglasgow-exts -package-name wi<BR>n32 -O -Rghc-timing =
-package lang GDITypes.hs StdDIS.hs Win32.hs =
Win32Bitmap.hs<BR>Win32Brush.hs=20
Win32Clip.hs Win32Control.hs Win32DLL.hs Win32Dialogue.hs =
Win32Fil<BR>e.hs=20
Win32Font.hs Win32Graphics2D.hs Win32HDC.hs Win32Icon.hs Win32Key.hs=20
Win32M<BR>M.hs Win32Menu.hs Win32Misc.hs Win32NLS.hs Win32Palette.hs=20
Win32Path.hs Win32Pen<BR>.hs Win32Process.hs Win32Region.hs =
Win32Registry.hs=20
Win32Resource.hs Win32Spawn.<BR>hs Win32SystemInfo.hs Win32Types.hs=20
Win32WinMessage.hs Win32Window.hs<BR>Win32Spawn.hs: can't locate import=20
`GHC.Posix'<BR>make[2]: *** [depend] Error 1<BR>make[1]: *** [boot] =
Error=20
1<BR>make[1]: Leaving directory =
`/cygdrive/c/try6/fptools/hslibs'<BR>make: ***=20
[build] Error 1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>--- snap ---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>Unfortunately, module GHC.Posix doesn't exist. I read something =
about this=20
module to be unavailable under mingw and that I first had to build a=20
cygwin-ghc-inplace which supports posix and then compile mingw-ghc with =
it...=20
Therefore, I try the following:</DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>./configure --build=3Di686-pc-cygwin=20
--host=3Di386-unknown-mingw32</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>omitting =
--with-gcc=3Dc:/MinGW/bin/gcc</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is this correct?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks again,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Johannes</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"mailto:johago@web.de">johago@web.de</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0317_01C321FC.C8B81BD0--