Error building ghc 6.4 under os x
Hi All, I'm trying to build ghc 6.4 on mac os x (10.3) using ghc 6.2. The build dies with "/tmp/ghc18478.hc:3:17: Stg.h: No such file or directory". An abridged session transcript is below. Any ideas about what's going on? Thanks! --Jeff root@Narcissus ghc-6.4 # autoreconf root@Narcissus ghc-6.4 # ./configure [seems to work file] root@Narcissus ghc-6.4 # make ------------------------------------------------------------------------ ===fptools== Recursively making `boot' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/mkdependC ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/mkdirhier ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/runstdtest ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/lndir ------------------------------------------------------------------------ ../../glafp-utils/mkdependC/mkdependC -f .depend -- -O -- lndir.c ------------------------------------------------------------------------ ===fptools== Finished making `boot' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ------------------------------------------------------------------------ ------------------------------------------------------------------------ ===fptools== Recursively making `all' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/mkdependC ------------------------------------------------------------------------ make[2]: Nothing to be done for `all'. ------------------------------------------------------------------------ ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/mkdirhier ------------------------------------------------------------------------ make[2]: Nothing to be done for `all'. ------------------------------------------------------------------------ ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/runstdtest ------------------------------------------------------------------------ make[2]: Nothing to be done for `all'. ------------------------------------------------------------------------ ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/lndir ------------------------------------------------------------------------ make[2]: Nothing to be done for `all'. ------------------------------------------------------------------------ ===fptools== Finished making `all' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ------------------------------------------------------------------------ ------------------------------------------------------------------------ ===fptools== Recursively making `boot' in includes lib utils driver docs compiler rts ... PWD = /usr/local/ghc-6.4/ghc ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== make boot -r; in /usr/local/ghc-6.4/ghc/includes ------------------------------------------------------------------------ ../../glafp-utils/mkdependC/mkdependC -f .depend -- -O -- mkDerivedConstants.c ------------------------------------------------------------------------ ==fptools== make boot -r; in /usr/local/ghc-6.4/ghc/lib ------------------------------------------------------------------------ ------------------------------------------------------------------------ ===fptools== Recursively making `boot' in compat ... PWD = /usr/local/ghc-6.4/ghc/lib ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== make boot - --no-print-directory -r; in /usr/local/ghc-6.4/ghc/lib/compat ------------------------------------------------------------------------ ../../../glafp-utils/mkdependC/mkdependC -f .depend -I../../includes -- -O -- cbits/directory.c cbits/rawSystem.c /sw/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp Compat/Directory.hs Compat/RawSystem.hs Distribution/Compat/ReadP.hs Distribution/Extension.hs Distribution/GetOpt.hs Distribution/InstalledPackageInfo.hs Distribution/License.hs Distribution/Package.hs Distribution/ParseUtils.hs Distribution/Setup.hs Distribution/Version.hs System/Directory/Internals.hs <<ghc: 7384080 bytes, 3 GCs, 41848/41848 avg/max bytes residency (1 samples), 16M in use, 0.01 INIT (0.02 elapsed), 0.05 MUT (1.85 elapsed), 0.01 GC (1.26 elapsed) :ghc>> make all rm -f Compat/Directory.o; if [ ! -d Compat/Directory_split ]; then mkdir Compat/Directory_split; else /usr/bin/find Compat/Directory_split -name '*.o' -print | xargs rm -f __rm_food; fi; /sw/bin/ghc -H16m -O -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp -split-objs -c Compat/Directory.hs -o Compat/Directory.o -ohi Compat/Directory.hi /tmp/ghc14786.hc:3:17: Stg.h: No such file or directory /tmp/ghc14786.hc:4:20: HsBase.h: No such file or directory /tmp/ghc14786.hc:6: error: parse error before "START_MOD_INIT" /tmp/ghc14786.hc:7: error: parse error before "EF_" /tmp/ghc14786.hc:7: warning: type defaults to `int' in declaration of `EF_' ... lots more ... /tmp/ghc14786.hc:1268: error: parse error before '}' token <<ghc: 73185768 bytes, 15 GCs, 2345088/4627896 avg/max bytes residency (3 samples), 18M in use, 0.01 INIT (0.06 elapsed), 0.71 MUT (1.87 elapsed), 0.31 GC (0.38 elapsed) :ghc>> make[4]: *** [Compat/Directory.o] Error 1 make[3]: *** [boot] Error 2 make[2]: *** [boot] Error 1 make[1]: *** [boot] Error 1 make: *** [build] Error 1
Hi Jeffrey, Using the darwinports infrastructure we successfully built ghc-6.4 using ghc-6.2.2; you might look at the port file to get an idea of how the build procedure had to be arranged to make it work. (The port file is a tcl script but it is pretty self-explanatory which parts specify the arguments to configure, etc.) Look at http:// darwinports.opendarwin.org for more information. Or just download and install the darwinports system and type sudo port install ghc and you'll get a build from source. It takes about 4 hours on a 1.5 GHz powerbook G4. For a good time, specify the verbose debugging flags and you can watch the build go by: sudo port -dv install ghc Note that you should be using Xcode 1.5 with all the updates, including the gcc update from the end of 2004. You might also have to upgrade to gnu make 3.80 to avoid a bug in gmake 3.79 which can cause gmake to fall into an infinite loop. The darwinports build takes care of this for you. Best Wishes, Greg On May 4, 2005, at 9:03 PM, Jeffrey Vaughan wrote:
Hi All,
I'm trying to build ghc 6.4 on mac os x (10.3) using ghc 6.2. The build dies with "/tmp/ghc18478.hc:3:17: Stg.h: No such file or directory". An abridged session transcript is below.
Any ideas about what's going on?
Thanks!
--Jeff
root@Narcissus ghc-6.4 # autoreconf root@Narcissus ghc-6.4 # ./configure [seems to work file] root@Narcissus ghc-6.4 # make ---------------------------------------------------------------------- -- ===fptools== Recursively making `boot' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/mkdependC ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/mkdirhier ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/runstdtest ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ==fptools== make boot -r; in /usr/local/ghc-6.4/glafp-utils/lndir ---------------------------------------------------------------------- -- ../../glafp-utils/mkdependC/mkdependC -f .depend -- -O -- lndir.c ---------------------------------------------------------------------- -- ===fptools== Finished making `boot' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ===fptools== Recursively making `all' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/mkdependC ---------------------------------------------------------------------- -- make[2]: Nothing to be done for `all'. ---------------------------------------------------------------------- -- ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/mkdirhier ---------------------------------------------------------------------- -- make[2]: Nothing to be done for `all'. ---------------------------------------------------------------------- -- ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/runstdtest ---------------------------------------------------------------------- -- make[2]: Nothing to be done for `all'. ---------------------------------------------------------------------- -- ==fptools== make all -r; in /usr/local/ghc-6.4/glafp-utils/lndir ---------------------------------------------------------------------- -- make[2]: Nothing to be done for `all'. ---------------------------------------------------------------------- -- ===fptools== Finished making `all' in mkdependC mkdirhier runstdtest lndir ... PWD = /usr/local/ghc-6.4/glafp-utils ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ===fptools== Recursively making `boot' in includes lib utils driver docs compiler rts ... PWD = /usr/local/ghc-6.4/ghc ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ==fptools== make boot -r; in /usr/local/ghc-6.4/ghc/includes ---------------------------------------------------------------------- -- ../../glafp-utils/mkdependC/mkdependC -f .depend -- -O -- mkDerivedConstants.c ---------------------------------------------------------------------- -- ==fptools== make boot -r; in /usr/local/ghc-6.4/ghc/lib ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ===fptools== Recursively making `boot' in compat ... PWD = /usr/local/ghc-6.4/ghc/lib ---------------------------------------------------------------------- -- ---------------------------------------------------------------------- -- ==fptools== make boot - --no-print-directory -r; in /usr/local/ghc-6.4/ghc/lib/compat ---------------------------------------------------------------------- -- ../../../glafp-utils/mkdependC/mkdependC -f .depend -I../../ includes -- -O -- cbits/directory.c cbits/rawSystem.c /sw/bin/ghc -M -optdep-f -optdep.depend -osuf o -H16m -O -I. - Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp Compat/ Directory.hs Compat/RawSystem.hs Distribution/Compat/ReadP.hs Distribution/Extension.hs Distribution/GetOpt.hs Distribution/ InstalledPackageInfo.hs Distribution/License.hs Distribution/ Package.hs Distribution/ParseUtils.hs Distribution/Setup.hs Distribution/Version.hs System/Directory/Internals.hs <<ghc: 7384080 bytes, 3 GCs, 41848/41848 avg/max bytes residency (1 samples), 16M in use, 0.01 INIT (0.02 elapsed), 0.05 MUT (1.85 elapsed), 0.01 GC (1.26 elapsed) :ghc>> make all rm -f Compat/Directory.o; if [ ! -d Compat/Directory_split ]; then mkdir Compat/Directory_split; else /usr/bin/find Compat/ Directory_split -name '*.o' -print | xargs rm -f __rm_food; fi; /sw/bin/ghc -H16m -O -I. -Rghc-timing -I../../../libraries - fglasgow-exts -no-recomp -split-objs -c Compat/Directory.hs -o Compat/Directory.o -ohi Compat/Directory.hi /tmp/ghc14786.hc:3:17: Stg.h: No such file or directory /tmp/ghc14786.hc:4:20: HsBase.h: No such file or directory /tmp/ghc14786.hc:6: error: parse error before "START_MOD_INIT" /tmp/ghc14786.hc:7: error: parse error before "EF_" /tmp/ghc14786.hc:7: warning: type defaults to `int' in declaration of `EF_' ... lots more ... /tmp/ghc14786.hc:1268: error: parse error before '}' token <<ghc: 73185768 bytes, 15 GCs, 2345088/4627896 avg/max bytes residency (3 samples), 18M in use, 0.01 INIT (0.06 elapsed), 0.71 MUT (1.87 elapsed), 0.31 GC (0.38 elapsed) :ghc>> make[4]: *** [Compat/Directory.o] Error 1 make[3]: *** [boot] Error 2 make[2]: *** [boot] Error 1 make[1]: *** [boot] Error 1 make: *** [build] Error 1 _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Thanks for the quick reply:) Gregory Wright wrote:
Or just download and install the darwinports system and type
sudo port install ghc
Unfortunately this isn't working for me. It appears that port is attempting to download ghc-6.4-darwin-bootstrap.tar.bz2 which does not exists. However this is a ghc-6.4-darwin-bootstrap-v01.tar.bz2. I changed Portfile to reflect this, and the build died later in the process. I'm currently waiting for xcode 1.5 to download, but i'm pretty sure the above is a bug. --Jeff
On May 4, 2005, at 9:03 PM, Jeffrey Vaughan wrote:
Hi All,
I'm trying to build ghc 6.4 on mac os x (10.3) using ghc 6.2. The build dies with "/tmp/ghc18478.hc:3:17: Stg.h: No such file or directory". An abridged session transcript is below.
On May 5, 2005, at 2:03 AM, Jeffrey Vaughan wrote:
Thanks for the quick reply:)
Gregory Wright wrote:
Or just download and install the darwinports system and type sudo port install ghc
Unfortunately this isn't working for me. It appears that port is attempting to download ghc-6.4-darwin-bootstrap.tar.bz2 which does not exists. However this is a ghc-6.4-darwin-bootstrap-v01.tar.bz2.
Where did you get your copy of darwinports? The -v01 bootstrap file has been in use for several months. And after installing, did you run sudo port -d selfupdate to ensure you had the latest portfiles?
I changed Portfile to reflect this, and the build died later in the process. I'm currently waiting for xcode 1.5 to download, but i'm pretty sure the above is a bug.
Not surprising, since somehow you got a very outdated port file. Send me the portfile you tried and I'll try to get an idea of what happened. If you didn't have the Xcode 1.5 tools + updates, building ghc from source was almost certainly bound to fail. -Greg
--Jeff
On May 4, 2005, at 9:03 PM, Jeffrey Vaughan wrote:
Hi All,
I'm trying to build ghc 6.4 on mac os x (10.3) using ghc 6.2. The build dies with "/tmp/ghc18478.hc:3:17: Stg.h: No such file or directory". An abridged session transcript is below.
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Jeff, Mmmmm....maybe I was right about the portfile not being up to date. The latest does indeed refer to -v01, and the haskell ftp site has the -v01 bootstrap compiler (just checked!). Send me your portfile, along with a transcript of the sudo port -dv install output. Greg On May 5, 2005, at 2:03 AM, Jeffrey Vaughan wrote:
Thanks for the quick reply:)
Gregory Wright wrote:
Or just download and install the darwinports system and type sudo port install ghc
Unfortunately this isn't working for me. It appears that port is attempting to download ghc-6.4-darwin-bootstrap.tar.bz2 which does not exists. However this is a ghc-6.4-darwin-bootstrap-v01.tar.bz2.
I changed Portfile to reflect this, and the build died later in the process. I'm currently waiting for xcode 1.5 to download, but i'm pretty sure the above is a bug.
--Jeff
On May 4, 2005, at 9:03 PM, Jeffrey Vaughan wrote:
Hi All,
I'm trying to build ghc 6.4 on mac os x (10.3) using ghc 6.2. The build dies with "/tmp/ghc18478.hc:3:17: Stg.h: No such file or directory". An abridged session transcript is below.
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Greg, The combination of upgrading XTools to 1.5 and running self update did the trick. Thanks a lot:) Jeff Gregory Wright wrote:
Jeff,
Mmmmm....maybe I was right about the portfile not being up to date. The latest does indeed refer to -v01, and the haskell ftp site has the -v01 bootstrap compiler (just checked!).
Send me your portfile, along with a transcript of the sudo port -dv install output.
Greg
On May 5, 2005, at 2:03 AM, Jeffrey Vaughan wrote:
Thanks for the quick reply:)
Gregory Wright wrote:
Or just download and install the darwinports system and type sudo port install ghc
Unfortunately this isn't working for me. It appears that port is attempting to download ghc-6.4-darwin-bootstrap.tar.bz2 which does not exists. However this is a ghc-6.4-darwin-bootstrap-v01.tar.bz2.
I changed Portfile to reflect this, and the build died later in the process. I'm currently waiting for xcode 1.5 to download, but i'm pretty sure the above is a bug.
--Jeff
On May 4, 2005, at 9:03 PM, Jeffrey Vaughan wrote:
Hi All,
I'm trying to build ghc 6.4 on mac os x (10.3) using ghc 6.2. The build dies with "/tmp/ghc18478.hc:3:17: Stg.h: No such file or directory". An abridged session transcript is below.
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (2)
-
Gregory Wright -
Jeffrey Vaughan