Compiling GHC 7.4.1 on Mac OS X, XCode 4.3

Hello! I have for various subtle reasons bought a MacBook Pro. It certainly is very shiny :) I find it somewhat reluctant in the Haskell department, though: I do not want the lagging haskell-platform, and decided to do things from scratch, i.e. compile ghc myself. I followed the intructions, and I *have* compiled stuff before, so I'm not completely lost. However, after ./configure, make exits with the message <code> ===--- building phase 0 make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds libraries/extensible-exceptions/ghc.mk:3: libraries/extensible-exceptions/dist-boot/package-data.mk: No such file or directory libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk: No such file or directory libraries/Cabal/Cabal/ghc.mk:3: libraries/Cabal/Cabal/dist-boot/package-data.mk: No such file or directory libraries/binary/ghc.mk:3: libraries/binary/dist-boot/package-data.mk: No such file or directory libraries/bin-package-db/ghc.mk:3: libraries/bin-package-db/dist-boot/package-data.mk: No such file or directory libraries/hoopl/ghc.mk:3: libraries/hoopl/dist-boot/package-data.mk: No such file or directory compiler/ghc.mk:437: compiler/stage1/package-data.mk: No such file or directory utils/hsc2hs/ghc.mk:14: utils/hsc2hs/dist/package-data.mk: No such file or directory ghc/ghc.mk:93: ghc/stage1/package-data.mk: No such file or directory "inplace/bin/ghc-cabal" configure --with-ghc="/usr/bin/ghc" --with-ghc-pkg="/usr/bin/ghc-pkg" --package-db=/Users/fcar/Downloads/ghc-7.4.1/libraries/bootstrapping.conf --enable-library-profiling --enable-shared --enable-library-for-ghci --configure-option=CFLAGS=" -m64 -fno-stack-protector " --configure-option=LDFLAGS=" -m64 " --configure-option=CPPFLAGS=" -m64 " --constraint "Cabal == 1.14.0" --constraint "hpc == 0.5.1.1" --constraint "extensible-exceptions == 0.1.1.4" --constraint "binary == 0.5.1.0" --constraint "bin-package-db == 0.0.0.0" --constraint "hoopl == 3.8.7.3" --with-gcc="/usr/bin/gcc" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/Developer/usr/bin/ar" --with-ranlib="ranlib" -- dist-boot libraries/Cabal/Cabal Configuring Cabal-1.14.0... ghc-cabal: Cannot find the program 'ar' at '/Developer/usr/bin/ar' or on the path make[1]: *** [libraries/Cabal/Cabal/dist-boot/package-data.mk] Error 1 make: *** [all] Error 2 </code> I can clearly make out the offending flag: --with-ar="/Developer/usr/bin/ar". Having Xcode 4.3, there is no longer any /Developer folder - but where do I tell it to use "/usr/bin/ar" instead? Furthermore, it says "or on the path" above, but /usr/bin *is* in PATH, at least in the environment I have at the shell prompt (but this might be changed in some script that make calls or whatever...) Grateful for help. /Fredrik, Stockholm

On 5 March 2012 13:08, Obscaenvs
I find it somewhat reluctant in the Haskell department, though: I do not want the lagging haskell-platform, and decided to do things from scratch, i.e. compile ghc myself. I followed the intructions, and I *have* compiled stuff before, so I'm not completely lost. However, after ./configure, make exits with the message
Have you considered using the Homebrew package manager¹? Using homebrew it should – at least in theory – be as easy as: $ brew update $ brew install --devel ghc The “--devel” switch should choose GHC 7.4.1, as far as I remember. [1] http://mxcl.github.com/homebrew/ -- Erlend Hamberg ehamberg@gmail.com

You need to install the command-line tools from Xcode's preferences because the locations in the Developer prefix don't play nice. The package will install the usual tools to the usual locations, and all should be well.
Jack Henahan
jhenahan@uvm.edu
==
Computer science is no more about computers than astronomy is about telescopes.
-- Michael R. Fellows
==
On Mar 5, 2012, at 7:08 AM, Obscaenvs
Hello! I have for various subtle reasons bought a MacBook Pro. It certainly is very shiny :)
I find it somewhat reluctant in the Haskell department, though: I do not want the lagging haskell-platform, and decided to do things from scratch, i.e. compile ghc myself. I followed the intructions, and I *have* compiled stuff before, so I'm not completely lost. However, after ./configure, make exits with the message
<code> ===--- building phase 0 make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds libraries/extensible-exceptions/ghc.mk:3: libraries/extensible-exceptions/dist-boot/package-data.mk: No such file or directory libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk: No such file or directory libraries/Cabal/Cabal/ghc.mk:3: libraries/Cabal/Cabal/dist-boot/package-data.mk: No such file or directory libraries/binary/ghc.mk:3: libraries/binary/dist-boot/package-data.mk: No such file or directory libraries/bin-package-db/ghc.mk:3: libraries/bin-package-db/dist-boot/package-data.mk: No such file or directory libraries/hoopl/ghc.mk:3: libraries/hoopl/dist-boot/package-data.mk: No such file or directory compiler/ghc.mk:437: compiler/stage1/package-data.mk: No such file or directory utils/hsc2hs/ghc.mk:14: utils/hsc2hs/dist/package-data.mk: No such file or directory ghc/ghc.mk:93: ghc/stage1/package-data.mk: No such file or directory "inplace/bin/ghc-cabal" configure --with-ghc="/usr/bin/ghc" --with-ghc-pkg="/usr/bin/ghc-pkg" --package-db=/Users/fcar/Downloads/ghc-7.4.1/libraries/bootstrapping.conf --enable-library-profiling --enable-shared --enable-library-for-ghci --configure-option=CFLAGS=" -m64 -fno-stack-protector " --configure-option=LDFLAGS=" -m64 " --configure-option=CPPFLAGS=" -m64 " --constraint "Cabal == 1.14.0" --constraint "hpc == 0.5.1.1" --constraint "extensible-exceptions == 0.1.1.4" --constraint "binary == 0.5.1.0" --constraint "bin-package-db == 0.0.0.0" --constraint "hoopl == 3.8.7.3" --with-gcc="/usr/bin/gcc" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/Developer/usr/bin/ar" --with-ranlib="ranlib" -- dist-boot libraries/Cabal/Cabal Configuring Cabal-1.14.0... ghc-cabal: Cannot find the program 'ar' at '/Developer/usr/bin/ar' or on the path make[1]: *** [libraries/Cabal/Cabal/dist-boot/package-data.mk] Error 1 make: *** [all] Error 2 </code>
I can clearly make out the offending flag: --with-ar="/Developer/usr/bin/ar". Having Xcode 4.3, there is no longer any /Developer folder - but where do I tell it to use "/usr/bin/ar" instead? Furthermore, it says "or on the path" above, but /usr/bin *is* in PATH, at least in the environment I have at the shell prompt (but this might be changed in some script that make calls or whatever...)
Grateful for help.
/Fredrik, Stockholm
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
participants (3)
-
Erlend Hamberg
-
Jack Henahan
-
Obscaenvs