Opened 8 years ago

Closed 8 years ago

#1170 closed support request (fixed)

Can't install on intel mac

Reported by: j.millen@… Owned by:
Priority: normal Milestone:
Component: Build System Version: 6.6
Keywords: Cc:
Operating System: MacOS X Architecture: x86
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description (last modified by igloo)

Mac Intel (Tiger) installation from the binary package failed.

I downloaded http://haskell.org/ghc/dist/6.6/ghc-6.6-i386-apple-darwin.tar.bz2 and
moved the directory ghc6.6 under /Applications. I then tried a few combinations of
./configure and make, none of which worked, apparently because there is no /usr/local/lib.

(caveat: I'm not a UNIX guru, I only have the vaguest idea what's going on here.)

I tried ./configure (with no prefix) and then make install; when that failed for
lack of /usr/local/lib, I tried make in-place.

That apparently succeeded and told me to put
/Applications/ghc-6.6/bin/i386-apple-darwin in my PATH. I haven't yet looked up where the
plist file is that sets my PATH, but I just tried
/Applications/ghc-6.6/bin/i386-apple-darwin/ghci, and that failed for lack of
/usr/local/lib/ghc-6.6/ghc-6.6.

The ghci script being executed is apparently:

#! /bin/sh
bindir='/Applications/ghc-6.6/bin/i386-apple-darwin'
libdir='/Applications/ghc-6.6/lib/i386-apple-darwin'
libexecdir='/Applications/ghc-6.6/lib/i386-apple-darwin'
datadir='/Applications/ghc-6.6/share'
SED='/usr/bin/sed'
DEFAULT_TMPDIR='/tmp'
#!/bin/sh
GHCBIN="/usr/local/lib/ghc-6.6/ghc-6.6";
TOPDIROPT="-B/usr/local/lib/ghc-6.6";
# Mini-driver for GHCi
exec $GHCBIN $TOPDIROPT --interactive ${1+"$@"}

I tried ./configure --prefix /Applications/ghc6.6
and then make in-place, and got the same results.

Jon

Change History (1)

comment:1 Changed 8 years ago by igloo

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

Hmm, ghc-6.6/bin/i386-unknown-linux/ghci-6.6.sh is supposed to contain the lines

GHCBIN="$libexecdir/ghc-6.6";
TOPDIROPT="-B$libdir";

whereas in that tarball it contains

GHCBIN="/usr/local/lib/ghc-6.6/ghc-6.6";
TOPDIROPT="-B/usr/local/lib/ghc-6.6";

(The ghci script is then built by echoing the variable definitions and catting
ghci-6.6.sh).

So, I'm not sure why that happened, but you can work around the problem by editing the scripts and setting the paths manually, either to the appropriate variables or just to the correct absolute paths. Alternatively, I've just fixed the scripts in the tarball, so downloading it again and trying to install it should work.

I was already planning to change the way these scripts are made so that we always get the version with variables, so hopefully this won't come up again in the future.

Please feel free to reopen this bug (or file another one) if you still have trouble.

Note: See TracTickets for help on using tickets.