-
Notifications
You must be signed in to change notification settings - Fork 722
Description
(Imported from Trac #896, reported by jeremyw.sherman on 2011-10-20)
Under Mac OS X, cabal assumes gcc is at /Developer/usr/bin/gcc. This fails when Xcode is installed to another directory. Xcode has supported installing to an arbitrary folder since at least Xcode 3.x. This is particularly common among iOS developers, as they frequently require multiple parallel Xcode installs.
Since Xcode installs gcc to both $DEVELOPER/usr/bin/gcc and /usr/bin/gcc, this could be fixed by using /usr/bin/gcc directly or the result of a search in $PATH for gcc.
The user workaround for now is to symlink /Xcode_4_2 (or whatever the user's latest Xcode install directory is) to /Developer.
(Apple is moving from gcc to clang, anyway. Apple's gcc has been frozen at an ancient version for some time now.)
Sample session exhibiting this bug:
$ cabal install cabal-install Resolving dependencies... Configuring cabal-install-0.10.2... ghc: could not execute: /Developer/usr/bin/gcc cabal: Error: some packages failed to install: cabal-install-0.10.2 failed during the configure step. The exception was: ExitFailure 1 $ cabal --version cabal-install version 0.8.0 using version 1.8.0.2 of the Cabal library $ which gcc /usr/bin/gcc $ which clang /usr/bin/clang $ ls -l `which gcc` lrwxr-xr-x 1 root wheel 12 13 Okt 15:37 /usr/bin/gcc@ -> llvm-gcc-4.2 $ ls -l `which clang` -rwxrwxr-x 1 root admin 41251344 27 Aug 03:53 /usr/bin/clang* $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.0.3