[Hackage] #896: cabal install cabal-install fails if gcc not in /Developer/usr/bin/gcc

Hackage cvs-ghc at haskell.org
Thu Oct 20 02:31:52 CEST 2011


#896: cabal install cabal-install fails if gcc not in /Developer/usr/bin/gcc
---------------------------------+------------------------------------------
  Reporter:  jeremyw.sherman     |        Owner:         
      Type:  defect              |       Status:  new    
  Priority:  normal              |    Milestone:         
 Component:  cabal-install tool  |      Version:  1.8.0.2
  Severity:  normal              |     Keywords:         
Difficulty:  unknown             |   Ghcversion:         
  Platform:  Mac OS              |  
---------------------------------+------------------------------------------
 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
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/896>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects



More information about the cabal-devel mailing list