Opened 4 years ago

Closed 3 years ago

#5390 closed bug (fixed)

Hard-coded /Developer path in Mac ghc

Reported by: Ahruman Owned by: pumpkin
Priority: low Milestone: 7.6.1
Component: Compiler Version: 7.0.3
Keywords: platform Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: GHC doesn't work at all Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):

Description (last modified by igloo)

The Haskell Platform package for Mac OS X installs a /usr/bin/ghc script which hard-codes the path to gcc as:


This is incorrect, as Xcode tools can be installed at semi-arbitrary locations, and there may be several versions installed. The correct approach is:

developerpath=`xcode-select --print-path` # Produces "/Developer" or alternative path

Change History (10)

comment:1 Changed 4 years ago by igloo

  • Description modified (diff)

comment:2 Changed 4 years ago by igloo

  • Milestone set to 7.4.1
  • Owner set to pumpkin

comment:3 Changed 4 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from normal to low

comment:4 Changed 3 years ago by altaic

I believe this issue has been fixed; with Haskell Platform 2012.0.0 (OS X, 64 bit), my /usr/bin/ghc looks like the following (no references to /Developer, or even gcc, for that matter):

exec "$executablename" -B"$topdir" ${1+"$@"}

comment:5 Changed 3 years ago by altaic

Oops, I meant to say: Haskell Platform 2012.2.0.0

comment:6 Changed 3 years ago by simonmar

  • difficulty set to Unknown

We still have a gcc path in the settings file, I believe.

comment:7 Changed 3 years ago by Ahruman

There is indeed a fixed path in settings, but it doesn’t have the same problem of relying on an Xcode install path. Instead, GHC requires the command line developer tools package, now a separate installation which doesn’t have the option of a custom path.

(The approach of using xcode-select --print-path is still valid, and produces /Applications/ by default under the new regime, but there’s no clear advantage to doing that any longer.)

comment:8 Changed 3 years ago by simonmar

Ok, so you're saying that now gcc is always in /usr/bin and is independent of the XCode installation path, it doesn't matter that we have a fixed path in our settings file?

comment:9 Changed 3 years ago by Ahruman

Yes. Or close enough to yes for rock’n’roll.

comment:10 Changed 3 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.