Which ghc versions can build ghc-6.8.1?
Gregory Wright
gwright at comcast.net
Thu Dec 6 10:49:14 EST 2007
Hi,
I'm the process of updating MacPort's ghc to 6.8.1 and adding support
for
Leopard (OS X 10.5) and have been having] some trouble.
The first task is just to get 6.8.1 running on Tiger (10.4). On PPC,
I use
ghc 6.4 as a bootstrap compiler and on Intel ghc 6.6. I am traveling
with
only a PPC PowerBook G4/OS X 10.4, so that's all I've been able to
test with.
The problem is that ghc 6.4 can not build 6.8.1. It seems related to
Cabal.
Using the 6.4 bootstrap compiler (with the version of Cabal that it
shipped
with) I get:
ranlib libHSrts_thr_debug.a
------------------------------------------------------------------------
== Finished recursively making `all' for ways: p debug thr thr_p
thr_debug ...
PWD = /opt/local/var/macports/build/_Users_gwright_src_macports-
trunk_dports_lang_ghc/work/ghc-6.8.1/rts
------------------------------------------------------------------------
make -C libraries boot
rm -f -rf bootstrapping.Cabal
cp -R Cabal bootstrapping.Cabal
/usr/bin/find bootstrapping.Cabal \( -name "*.o" -o -name "*.hi" \) \
-exec rm -f -f {} \;
touch stamp/bootstrapping.Cabal
rm -f -rf bootstrapping.filepath
cp -R filepath bootstrapping.filepath
/usr/bin/find bootstrapping.filepath \( -name "*.o" -o -name "*.hi" \) \
-exec rm -f -f {} \;
touch stamp/bootstrapping.filepath
rm -f -rf ifBuildable
mkdir ifBuildable
cp ifBuildable.hs ifBuildable/
cd ifBuildable && /opt/local/var/macports/build/
_Users_gwright_src_macports-trunk_dports_lang_ghc/work/ghc-bootstrap/
bin/ghc -Wall --make ifBuildable -o ifBuildable
Chasing modules from: ifBuildable
Compiling Main ( ifBuildable.hs, ifBuildable.o )
Linking ...
ld: warning prebinding disabled because dependent library: /opt/local/
lib/libgmp.3.dylib is not prebound
rm -f -rf base/setup
mkdir base/setup
cp base/Setup.*hs base/setup
cd base/setup && /opt/local/var/macports/build/
_Users_gwright_src_macports-trunk_dports_lang_ghc/work/ghc-bootstrap/
bin/ghc -Wall -cpp --make Setup.*hs -o Setup \
-DCABAL_VERSION=1,2,2,0 -i../../
bootstrapping.Cabal -i../../bootstrapping.filepath
Chasing modules from: Setup.hs
Compiling System.FilePath.Posix ( ../../bootstrapping.filepath/System/
FilePath/Posix.hs, ../../bootstrapping.filepath/System/FilePath/
Posix.o )
Compiling System.FilePath ( ../../bootstrapping.filepath/System/
FilePath.hs, ../../bootstrapping.filepath/System/FilePath.o )
Compiling Main ( Setup.hs, Setup.o )
Setup.hs:19:18: Not in scope: `buildHook'
Setup.hs:21:30: Not in scope: `buildHook'
Setup.hs:22:18: Not in scope: `makefileHook'
Setup.hs:24:33: Not in scope: `makefileHook'
Setup.hs:25:18: Not in scope: `instHook'
Setup.hs:26:29: Not in scope: `instHook'
Setup.hs:33:12: Not in scope: `compilerFlavor'
Setup.hs:33:45: Not in scope: data constructor `GHC'
make[1]: *** [base/setup/Setup] Error 1
make: *** [stage1] Error 2
If I upgrade the bootstrap compiler's Cabal to 1.1.6.2, the build
still fails.
(The old version of Cabal was unregistered according the instructions
for working with older versions of ghc & Cabal.)
ranlib libHSrts_thr_debug.a
------------------------------------------------------------------------
== Finished recursively making `all' for ways: p debug thr thr_p
thr_debug ...
PWD = /Users/gwright/Desktop/ghc-6.8.1/rts
------------------------------------------------------------------------
make -C libraries boot
rm -f -rf bootstrapping.Cabal
cp -R Cabal bootstrapping.Cabal
/usr/bin/find bootstrapping.Cabal \( -name "*.o" -o -name "*.hi" \) \
-exec rm -f -f {} \;
touch stamp/bootstrapping.Cabal
rm -f -rf bootstrapping.filepath
cp -R filepath bootstrapping.filepath
/usr/bin/find bootstrapping.filepath \( -name "*.o" -o -name "*.hi" \) \
-exec rm -f -f {} \;
touch stamp/bootstrapping.filepath
rm -f -rf ifBuildable
mkdir ifBuildable
cp ifBuildable.hs ifBuildable/
cd ifBuildable && /opt/local/bin/ghc -Wall --make ifBuildable -o
ifBuildable
Chasing modules from: ifBuildable
Compiling Main ( ifBuildable.hs, ifBuildable.o )
Linking ...
rm -f -rf base/setup
mkdir base/setup
cp base/Setup.*hs base/setup
cd base/setup && /opt/local/bin/ghc -Wall -cpp --make Setup.*hs -o
Setup \
-DCABAL_VERSION=1,2,2,0 -i../../
bootstrapping.Cabal -i../../bootstrapping.filepath
Chasing modules from: Setup.hs
Compiling System.FilePath.Posix ( ../../bootstrapping.filepath/System/
FilePath/Posix.hs, ../../bootstrapping.filepath/System/FilePath/
Posix.o )
Compiling System.FilePath ( ../../bootstrapping.filepath/System/
FilePath.hs, ../../bootstrapping.filepath/System/FilePath.o )
Compiling Main ( Setup.hs, Setup.o )
Setup.hs:22:18: Not in scope: `makefileHook'
Setup.hs:24:33: Not in scope: `makefileHook'
make[1]: *** [base/setup/Setup] Error 1
make: *** [stage1] Error 2
With my installed 6.6.1 (and the Cabal 1.1.6.2 shipped with it) I was
able
to build 6.8.1.
I tried adding "-ignore-package Cabal" to the lines
BOOTSTRAP_INC_1_UP = -DCABAL_VERSION=1,2,2,0 $(addprefix -i../
bootstrapping.,$(BOOTSTRAP_LIBS))
BOOTSTRAP_INC_2_UP = -DCABAL_VERSION=1,2,2,0 $(addprefix -i../../
bootstrapping.,$(BOOTSTRAP_LIBS))
in libraries/Makefile and was able to compile all of the Setup files,
but the "setup configure" failed in libraries/base, complaining that
Setup
could not determine the version of ghc-inplace. (It also printed a
message
that to build libraries/base the ghc version needs to be at least
6.2. This
at the least is different than the distribution web page, which only
mentions
that ghc => 6.0 is needed.)
For comparison, the same part of the build log building 6.8.1 using
the 6.6.1
installed by MacPorts:
ranlib libHSrts_thr_debug.a
------------------------------------------------------------------------
== Finished recursively making `all' for ways: p debug thr thr_p
thr_debug ...
PWD = /Users/gwright/Desktop/ghc-6.8.1/rts
------------------------------------------------------------------------
make -C libraries boot
rm -f -rf bootstrapping.Cabal
cp -R Cabal bootstrapping.Cabal
/usr/bin/find bootstrapping.Cabal \( -name "*.o" -o -name "*.hi" \) \
-exec rm -f -f {} \;
touch stamp/bootstrapping.Cabal
rm -f -rf bootstrapping.filepath
cp -R filepath bootstrapping.filepath
/usr/bin/find bootstrapping.filepath \( -name "*.o" -o -name "*.hi" \) \
-exec rm -f -f {} \;
touch stamp/bootstrapping.filepath
rm -f -rf ifBuildable
mkdir ifBuildable
cp ifBuildable.hs ifBuildable/
cd ifBuildable && /opt/local/bin/ghc -Wall --make ifBuildable -o
ifBuildable
[1 of 1] Compiling Main ( ifBuildable.hs, ifBuildable.o )
Linking ifBuildable ...
rm -f -rf base/setup
mkdir base/setup
cp base/Setup.*hs base/setup
cd base/setup && /opt/local/bin/ghc -Wall -cpp --make Setup.*hs -o
Setup \
-DCABAL_VERSION=1,2,2,0 -i../../
bootstrapping.Cabal -i../../bootstrapping.filepath
[ 1 of 42] Compiling Distribution.Simple.GHC.Makefile ( ../../
bootstrapping.Cabal/Distribution/Simple/GHC/Makefile.hs, ../../
bootstrapping.Cabal/Distribution/Simple/GHC/Makefile.o )
[ 2 of 42] Compiling Distribution.Simple.PreProcess.Unlit ( ../../
bootstrapping.Cabal/Distribution/Simple/PreProcess/Unlit.hs, ../../
bootstrapping.Cabal/Distribution/Simple/PreProcess/Unlit.o )
[ 3 of 42] Compiling Distribution.System ( ../../bootstrapping.Cabal/
Distribution/System.hs, ../../bootstrapping.Cabal/Distribution/
System.o )
[ 4 of 42] Compiling Distribution.Verbosity ( ../../
bootstrapping.Cabal/Distribution/Verbosity.hs, ../../
bootstrapping.Cabal/Distribution/Verbosity.o )
[ 5 of 42] Compiling Distribution.Compat.ReadP ( ../../
bootstrapping.Cabal/Distribution/Compat/ReadP.hs, ../../
bootstrapping.Cabal/Distribution/Compat/ReadP.o )
[ 6 of 42] Compiling Distribution.Compat.RawSystem ( ../../
bootstrapping.Cabal/Distribution/Compat/RawSystem.hs, ../../
bootstrapping.Cabal/Distribution/Compat/RawSystem.o )
[ 7 of 42] Compiling Distribution.Compat.Exception ( ../../
bootstrapping.Cabal/Distribution/Compat/Exception.hs, ../../
bootstrapping.Cabal/Distribution/Compat/Exception.o )
[ 8 of 42] Compiling Distribution.Compat.Directory ( ../../
bootstrapping.Cabal/Distribution/Compat/Directory.hs, ../../
bootstrapping.Cabal/Distribution/Compat/Directory.o )
[ 9 of 42] Compiling Distribution.Compat.Map ( ../../
bootstrapping.Cabal/Distribution/Compat/Map.hs, ../../
bootstrapping.Cabal/Distribution/Compat/Map.o )
[10 of 42] Compiling Distribution.GetOpt ( ../../bootstrapping.Cabal/
Distribution/GetOpt.hs, ../../bootstrapping.Cabal/Distribution/
GetOpt.o )
[11 of 42] Compiling Language.Haskell.Extension ( ../../
bootstrapping.Cabal/Language/Haskell/Extension.hs, ../../
bootstrapping.Cabal/Language/Haskell/Extension.o )
[12 of 42] Compiling Distribution.Version ( ../../bootstrapping.Cabal/
Distribution/Version.hs, ../../bootstrapping.Cabal/Distribution/
Version.o )
[13 of 42] Compiling Distribution.Configuration ( ../../
bootstrapping.Cabal/Distribution/Configuration.hs, ../../
bootstrapping.Cabal/Distribution/Configuration.o )
[14 of 42] Compiling Distribution.Package ( ../../bootstrapping.Cabal/
Distribution/Package.hs, ../../bootstrapping.Cabal/Distribution/
Package.o )
[15 of 42] Compiling Distribution.License ( ../../bootstrapping.Cabal/
Distribution/License.hs, ../../bootstrapping.Cabal/Distribution/
License.o )
[16 of 42] Compiling Distribution.Compiler ( ../../
bootstrapping.Cabal/Distribution/Compiler.hs, ../../
bootstrapping.Cabal/Distribution/Compiler.o )
[17 of 42] Compiling Distribution.ParseUtils ( ../../
bootstrapping.Cabal/Distribution/ParseUtils.hs, ../../
bootstrapping.Cabal/Distribution/ParseUtils.o )
[18 of 42] Compiling Distribution.InstalledPackageInfo ( ../../
bootstrapping.Cabal/Distribution/InstalledPackageInfo.hs, ../../
bootstrapping.Cabal/Distribution/InstalledPackageInfo.o )
[19 of 42] Compiling Distribution.Simple.Compiler ( ../../
bootstrapping.Cabal/Distribution/Simple/Compiler.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Compiler.o )
[20 of 42] Compiling System.FilePath.Posix ( ../../
bootstrapping.filepath/System/FilePath/Posix.hs, ../../
bootstrapping.filepath/System/FilePath/Posix.o )
[21 of 42] Compiling System.FilePath ( ../../bootstrapping.filepath/
System/FilePath.hs, ../../bootstrapping.filepath/System/FilePath.o )
[22 of 42] Compiling Distribution.Compat.TempFile ( ../../
bootstrapping.Cabal/Distribution/Compat/TempFile.hs, ../../
bootstrapping.Cabal/Distribution/Compat/TempFile.o )
[23 of 42] Compiling Distribution.Simple.Utils ( ../../
bootstrapping.Cabal/Distribution/Simple/Utils.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Utils.o )
[24 of 42] Compiling Distribution.PackageDescription ( ../../
bootstrapping.Cabal/Distribution/PackageDescription.hs, ../../
bootstrapping.Cabal/Distribution/PackageDescription.o )
[25 of 42] Compiling Distribution.Simple.Program ( ../../
bootstrapping.Cabal/Distribution/Simple/Program.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Program.o )
[26 of 42] Compiling Distribution.Simple.Setup ( ../../
bootstrapping.Cabal/Distribution/Simple/Setup.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Setup.o )
[27 of 42] Compiling Distribution.Simple.InstallDirs ( ../../
bootstrapping.Cabal/Distribution/Simple/InstallDirs.hs, ../../
bootstrapping.Cabal/Distribution/Simple/InstallDirs.o )
[28 of 42] Compiling Distribution.Simple.LocalBuildInfo ( ../../
bootstrapping.Cabal/Distribution/Simple/LocalBuildInfo.hs, ../../
bootstrapping.Cabal/Distribution/Simple/LocalBuildInfo.o )
[29 of 42] Compiling Distribution.Simple.JHC ( ../../
bootstrapping.Cabal/Distribution/Simple/JHC.hs, ../../
bootstrapping.Cabal/Distribution/Simple/JHC.o )
[30 of 42] Compiling Distribution.Simple.NHC ( ../../
bootstrapping.Cabal/Distribution/Simple/NHC.hs, ../../
bootstrapping.Cabal/Distribution/Simple/NHC.o )
[31 of 42] Compiling Distribution.Simple.PreProcess ( ../../
bootstrapping.Cabal/Distribution/Simple/PreProcess.hs, ../../
bootstrapping.Cabal/Distribution/Simple/PreProcess.o )
[32 of 42] Compiling Distribution.Simple.Hugs ( ../../
bootstrapping.Cabal/Distribution/Simple/Hugs.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Hugs.o )
[33 of 42] Compiling Distribution.Simple.SrcDist ( ../../
bootstrapping.Cabal/Distribution/Simple/SrcDist.hs, ../../
bootstrapping.Cabal/Distribution/Simple/SrcDist.o )
[34 of 42] Compiling Distribution.Simple.Haddock ( ../../
bootstrapping.Cabal/Distribution/Simple/Haddock.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Haddock.o )
[35 of 42] Compiling Distribution.Simple.GHC.PackageConfig ( ../../
bootstrapping.Cabal/Distribution/Simple/GHC/PackageConfig.hs, ../../
bootstrapping.Cabal/Distribution/Simple/GHC/PackageConfig.o )
[36 of 42] Compiling Distribution.Simple.GHC ( ../../
bootstrapping.Cabal/Distribution/Simple/GHC.hs, ../../
bootstrapping.Cabal/Distribution/Simple/GHC.o )
[37 of 42] Compiling Distribution.Simple.Install ( ../../
bootstrapping.Cabal/Distribution/Simple/Install.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Install.o )
[38 of 42] Compiling Distribution.Simple.Register ( ../../
bootstrapping.Cabal/Distribution/Simple/Register.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Register.o )
[39 of 42] Compiling Distribution.Simple.Configure ( ../../
bootstrapping.Cabal/Distribution/Simple/Configure.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Configure.o )
[40 of 42] Compiling Distribution.Simple.Build ( ../../
bootstrapping.Cabal/Distribution/Simple/Build.hs, ../../
bootstrapping.Cabal/Distribution/Simple/Build.o )
[41 of 42] Compiling Distribution.Simple ( ../../bootstrapping.Cabal/
Distribution/Simple.hs, ../../bootstrapping.Cabal/Distribution/
Simple.o )
[42 of 42] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
Can 6.4 build 6.8.1? Or is a later version required? If possible, I
want
to use the existing bootstrap compiler for OS X < 10.5, since building a
new one is a lot of work, especially to root out unnecessary
dependencies.
And it would mean terminating support for Panther (10.3). We only
promise
support for the most recent two OS version, so dropping Panther is
not a big deal,
but I try not to gratuitously drop support for older version if I can
avoid it.
If a later version bootstrap compiler is needed, we should take the
opportunity
to update the documentation.
Best Wishes,
Greg
More information about the Glasgow-haskell-users
mailing list