Building GHC on Mac OS 10.2.1
Hi all, I'm trying to build the HEAD on a somewhat old PowerBook G4 running Mac OS 10.2.1. It would seem that I don't have a new enough version of gcc: % gcc --version gcc (GCC) 3.1 20020420 (prerelease) and I can't seem to build a newer version of gcc (3.3) due to missing system include files which I assume (though that assumption may be wrong) are due to running 10.2 instead of 10.4. (For the full tale of woe, see http://hackage.haskell.org/trac/ghc/wiki/KirstenSandbox). Am I right in thinking that building GHC on Mac OS 10.2.1 is more or less impossible, or has anyone managed to do it? I'm pretty close to just giving up and buying a PC (various things make it difficult for me to upgrade to Tiger). Thanks, Kirsten -- Kirsten Chevalier* chevalier@alum.wellesley.edu *Often in error, never in doubt "Are you aware that rushing toward a goal is a sublimated death wish? It's no coincidence we call them 'deadlines'." -- Tom Robbins
Hi Kirsten, You may have better luck downloading gcc-3.3 from connect.apple.com. (You need to log in, but you can create an ADC account for free.) Look through the "Developer Tools" downloads for the gcc update from August 2003. (Depending on the state of your system, you may need the December 2002 dev tools update as well.) Since those updates are packaged as standard OS X installers, they should be a lot easier to get working. Hope that helps, -Judah On 12/29/06, Kirsten Chevalier <catamorphism@gmail.com> wrote:
Hi all, I'm trying to build the HEAD on a somewhat old PowerBook G4 running Mac OS 10.2.1. It would seem that I don't have a new enough version of gcc: % gcc --version gcc (GCC) 3.1 20020420 (prerelease) and I can't seem to build a newer version of gcc (3.3) due to missing system include files which I assume (though that assumption may be wrong) are due to running 10.2 instead of 10.4. (For the full tale of woe, see http://hackage.haskell.org/trac/ghc/wiki/KirstenSandbox). Am I right in thinking that building GHC on Mac OS 10.2.1 is more or less impossible, or has anyone managed to do it? I'm pretty close to just giving up and buying a PC (various things make it difficult for me to upgrade to Tiger).
Thanks, Kirsten
-- Kirsten Chevalier* chevalier@alum.wellesley.edu *Often in error, never in doubt "Are you aware that rushing toward a goal is a sublimated death wish? It's no coincidence we call them 'deadlines'." -- Tom Robbins _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Hello, Not much help, I'm afraid, but for what it's worth: I have built GHC-6.6 and some HEAD-ish version successfully on a PowerBook G4 with Mac OS X 10.3 (Panther?) and also after upgrading to 10.4 Tiger. I have never tried with 10.2. To assist in your difficult decisions, here are some details about the machinery: Hardware Overview: Machine Name: PowerBook G4 Machine Model: PowerBook3,2 CPU Type: PowerPC G4 (11.3) Number Of CPUs: 1 CPU Speed: 400 MHz L2 Cache (per CPU): 1 MB Memory: 384 MB Bus Speed: 100 MHz ... Macintosh HD: Capacity: 9.36 GB Available: 1.6 GB ... As you can probably see, this is also quite an old machine, but 10.4 runs comfortably here. Not much disc space left, though: I had to be rather selective when installing. And thanks for the priceless account of your arduous journey. Best regards Thorkil On Friday 29 December 2006 09:37, Kirsten Chevalier wrote:
Hi all, I'm trying to build the HEAD on a somewhat old PowerBook G4 running Mac OS 10.2.1. It would seem that I don't have a new enough version of gcc: % gcc --version gcc (GCC) 3.1 20020420 (prerelease) and I can't seem to build a newer version of gcc (3.3) due to missing system include files which I assume (though that assumption may be wrong) are due to running 10.2 instead of 10.4. (For the full tale of woe, see http://hackage.haskell.org/trac/ghc/wiki/KirstenSandbox). Am I right in thinking that building GHC on Mac OS 10.2.1 is more or less impossible, or has anyone managed to do it? I'm pretty close to just giving up and buying a PC (various things make it difficult for me to upgrade to Tiger).
Thanks, Kirsten
-- Kirsten Chevalier* chevalier@alum.wellesley.edu *Often in error, never in doubt "Are you aware that rushing toward a goal is a sublimated death wish? It's no coincidence we call them 'deadlines'." -- Tom Robbins _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
I'm trying to build the HEAD on a somewhat old PowerBook G4 running Mac OS 10.2.1. It would seem that I don't have a new enough version of gcc: % gcc --version gcc (GCC) 3.1 20020420 (prerelease)
Well, support for that version has definitely bitrotted, but it shouldn't be impossible to fix. How far do you get, what kind of errors do you get? Cheers, Wolfgang
On 12/29/06, Wolfgang Thaller <wolfgang.thaller@gmx.net> wrote:
I'm trying to build the HEAD on a somewhat old PowerBook G4 running Mac OS 10.2.1. It would seem that I don't have a new enough version of gcc: % gcc --version gcc (GCC) 3.1 20020420 (prerelease)
Well, support for that version has definitely bitrotted, but it shouldn't be impossible to fix. How far do you get, what kind of errors do you get?
The link I included to my tale of woe on the wiki answers the question, but, I admit, in a way that's a bit interleaved with profanity. So, in short: (after running make in ghc:) gcc -O -DTABLES_NEXT_TO_CODE -I. -I../rts -c mkDerivedConstants.c -o mkDerivedConstants.o InfoTables.h:314: illegal member declaration, missing name, found `}' OSThreads.h:135: #error "Threads not supported" OSThreads.h:141: undefined type, found `OSThreadId' OSThreads.h:145: illegal external declaration, missing `;' after `OSThreadProcAttr' OSThreads.h:145: illegal external declaration, missing `;' after `*' OSThreads.h:147: undefined type, found `OSThreadId' OSThreads.h:148: undefined type, found `OSThreadProc' OSThreads.h:153: undefined type, found `Condition' OSThreads.h:154: undefined type, found `Condition' OSThreads.h:155: undefined type, found `Condition' OSThreads.h:156: undefined type, found `Condition' OSThreads.h:157: undefined type, found `Condition' OSThreads.h:158: undefined type, found `Mutex' OSThreads.h:163: undefined type, found `Mutex' OSThreads.h:164: undefined type, found `Mutex' OSThreads.h:169: undefined type, found `ThreadLocalKey' OSThreads.h:170: undefined type, found `ThreadLocalKey' OSThreads.h:171: undefined type, found `ThreadLocalKey' Storage.h:211: undefined type, found `Mutex' Storage.h:212: undefined type, found `Mutex' ../rts/Task.h:88: undefined type, found `OSThreadId' ../rts/Task.h:115: undefined type, found `Condition' ../rts/Task.h:116: undefined type, found `Mutex' ../rts/Task.h:225: illegal function prototype, found `*' ../rts/Task.h:225: illegal function definition, found `)' ../rts/Task.h:235: undefined type, found `ThreadLocalKey' ../rts/Capability.h:74: undefined type, found `Mutex' ../rts/Capability.h:197: undefined type, found `Mutex' cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode make[1]: *** [mkDerivedConstants.o] Error 1 make: *** [stage1] Error 1 I ASSumed that this was a gcc 3.1 vs. gcc 3.3 issue, and then got stuck trying to upgrade gcc (I'm now downloading the .dmg for it per Judah's suggestion to see if it helps). I don't know if it really is or not. At the least, if there is a dependency on newer gcc versions or on include files not found in OS 10.2, it would be nice to have configure warn you about it. Cheers, Kirsten -- Kirsten Chevalier* chevalier@alum.wellesley.edu *Often in error, never in doubt "You don't have to be a supermodel to do the animal thing / You don't have to be a genius to open your face up and sing" -- Ani DiFranco
The latest is that while I was able to successfully install gcc 3.3, it made no difference at all. I was able to make some progress by running configure with --disable-threaded-rts. But, now I get: ------------------------------------------------------------------------ == make boot -r; in /Users/krc/ghc-head/ghc/compat ------------------------------------------------------------------------ ../utils/mkdependC/mkdependC -f .depend -I. -Iinclude -I../includes -- -O -I. -Iinclude -D__GHC_PATCHLEVEL__=1 -I../libraries/base/cbits -I../libraries/base/include --\ cbits/directory.c cbits/rawSystem.c cbits/unicode.c /usr/local/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O -I. -Iinclude -Rghc-timing -I../libraries -fglasgow-exts -no-recomp Compat/Directory.hs Compat/RawSystem.h\ s Compat/Unicode.hs Distribution/Compat/FilePath.hs Distribution/Compat/ReadP.hs Distribution/Compiler.hs Distribution/GetOpt.hs Distribution/InstalledPackageInfo.hs Distribu\ tion/License.hs Distribution/Package.hs Distribution/ParseUtils.hs Distribution/Version.hs Language/Haskell/Extension.hs System/Directory/Internals.hs <<ghc: 8975060 bytes, 3 GCs, 9280/9280 avg/max bytes residency (1 samples), 15M in use, 0.02 INIT (0.01 elapsed), 0.13 MUT (0.95 elapsed), 0.03 GC (0.05 elapsed) :ghc>> make all /usr/local/bin/ghc -H16m -O -I. -Iinclude -Rghc-timing -I../libraries -fglasgow-exts -no-recomp -c System/Directory/Internals.hs -o System/Directory/Internals.o -ohi Sys\ tem/Directory/Internals.hi System/Directory/Internals.hs:1: parse error on input `#' <<ghc: 5250952 bytes, 3 GCs, 5688/5688 avg/max bytes residency (1 samples), 16M in use, 0.02 INIT (0.02 elapsed), 0.06 MUT (0.22 elapsed), 0.04 GC (0.05 elapsed) :ghc>> make[2]: *** [System/Directory/Internals.o] Error 1 make[1]: *** [boot] Error 2 make: *** [stage1] Error 1 My /usr/local/bin/ghc is ghc 6.0.1, which... *should* recognize OPTIONS (or any other pragma), right? Various documentation claims you should be able to bootstrap with anything newer than 5.0.4. I'm not *entirely* sure where the existing old version of ghc I have installed came from. But I think it's a standard build. Can anyone tell what's up? I've built ghc I-don't-know-how-many-times now and I'm *still* mystified by this. Thanks, Kirsten -- Kirsten Chevalier* chevalier@alum.wellesley.edu *Often in error, never in doubt "Of the seven deadly sins, lust is definitely the pick of the litter." -- Tom Robbins
Hello, Sometimes, ghc complains about '#' for me when the C preprocessor has not been run and there is an unexpected #include or #define in the way. Also, as I read ifeq "$(ghc_ge_603)" "YES" # These modules are provided in GHC 6.3+ EXCLUDED_SRCS += \ System/Directory/Internals.hs ... endif in compat/Makefile, the particular compilation that you are stuck on here should be excluded if you were using ghc-6.3 or newer. I am using a ghc-6.4.1 and building ghc-6.6 does not involve building compat/System/Directory/Internals.o. Best regards Thorkil On Saturday 30 December 2006 07:56, Kirsten Chevalier wrote:
The latest is that while I was able to successfully install gcc 3.3, it made no difference at all. I was able to make some progress by running configure with --disable-threaded-rts. But, now I get:
------------------------------------------------------------------------ == make boot -r; in /Users/krc/ghc-head/ghc/compat ------------------------------------------------------------------------ ../utils/mkdependC/mkdependC -f .depend -I. -Iinclude -I../includes -- -O -I. -Iinclude -D__GHC_PATCHLEVEL__=1 -I../libraries/base/cbits -I../libraries/base/include --\ cbits/directory.c cbits/rawSystem.c cbits/unicode.c /usr/local/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O -I. -Iinclude -Rghc-timing -I../libraries -fglasgow-exts -no-recomp Compat/Directory.hs Compat/RawSystem.h\ s Compat/Unicode.hs Distribution/Compat/FilePath.hs Distribution/Compat/ReadP.hs Distribution/Compiler.hs Distribution/GetOpt.hs Distribution/InstalledPackageInfo.hs Distribu\ tion/License.hs Distribution/Package.hs Distribution/ParseUtils.hs Distribution/Version.hs Language/Haskell/Extension.hs System/Directory/Internals.hs <<ghc: 8975060 bytes, 3 GCs, 9280/9280 avg/max bytes residency (1 samples), 15M in use, 0.02 INIT (0.01 elapsed), 0.13 MUT (0.95 elapsed), 0.03 GC (0.05 elapsed) :ghc>> make all /usr/local/bin/ghc -H16m -O -I. -Iinclude -Rghc-timing -I../libraries -fglasgow-exts -no-recomp -c System/Directory/Internals.hs -o System/Directory/Internals.o -ohi Sys\ tem/Directory/Internals.hi System/Directory/Internals.hs:1: parse error on input `#' <<ghc: 5250952 bytes, 3 GCs, 5688/5688 avg/max bytes residency (1 samples), 16M in use, 0.02 INIT (0.02 elapsed), 0.06 MUT (0.22 elapsed), 0.04 GC (0.05 elapsed) :ghc>> make[2]: *** [System/Directory/Internals.o] Error 1 make[1]: *** [boot] Error 2 make: *** [stage1] Error 1
My /usr/local/bin/ghc is ghc 6.0.1, which... *should* recognize OPTIONS (or any other pragma), right? Various documentation claims you should be able to bootstrap with anything newer than 5.0.4. I'm not *entirely* sure where the existing old version of ghc I have installed came from. But I think it's a standard build. Can anyone tell what's up? I've built ghc I-don't-know-how-many-times now and I'm *still* mystified by this.
Thanks, Kirsten
-- Kirsten Chevalier* chevalier@alum.wellesley.edu *Often in error, never in doubt "Of the seven deadly sins, lust is definitely the pick of the litter." -- Tom Robbins _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (4)
-
Judah Jacobson -
Kirsten Chevalier -
Thorkil Naur -
Wolfgang Thaller