logo       

solutions for errors installing ghc-6.4.1 (Mac OS X 10.4.6, Xcode 2.2.1): msg#00113

lang.haskell.glasgow.bugs

Subject: solutions for errors installing ghc-6.4.1 (Mac OS X 10.4.6, Xcode 2.2.1)

I got ghc-6.4.1 running on my G4 Mac. I'm sending this to the
glasgow-haskell-bugs list in case others have had the same problems
(one of these problems was previously posted to this list in Dec 2005
but received no reply).

Why 6.4.1? Because I'm not interested in building ghc-6.4.2 at this
time, just in having a running haskell compiler, and a ghc-6.4.2
binary isn't yet available for OS X.

I downloaded ghc-6.4.1dyn-powerpc-apple-darwin.tar and tried to
install it. Everything seemed to go fine with ./configure and make
install (except for the missing *.ps files others have commented on).

Then I tried to run ghci -

Problem 1:

Try to run ghci and get this error:

dyld: Library not loaded: /usr/local/lib/libreadline.5.0.dylib
Referenced from: /usr/local/lib/ghc-6.4.1/ghc-6.4.1
Reason: image not found

My machine already has several versions of readline installed but not
the version 5.0 that ghc wants. Installing from the GNU source doesn't
get me the dynamic library that gnc wants but using Fink to install
readline 5.0 gets me the correct library in /usr/lib and a symbolic
link in /usr/local/lib pointing to that library makes gchi happy.

Problem 2:

Now ghci gives me a new 'Library not loaded' error complaining about
not being able to find 'GMP.framework/Versions/A/GMP'

I downloaded the disk image for AquaCurry from
http://danae.uni-muenster.de/~lux/curry/aqua.html

which has a GMP.framework folder which I dragged and dropped into
/Library/frameworks
(This was the problem that was posted to this list in Dec 2005 and
received no reply.)

Problem 3:

Now ghci runs OK so I proceed to test the compiler installation with a
'Hello World' program as described in the Users Guide.

I get 'table of contents for archive: <xxx> out of date; rerun
ranlib(1) (can't load from it)' for these archives:

libHShaskell98.a
libHSbase.a
libHSbase_cbits.a
libHSrts.a

so I use ranlib to bring them up to date. Now I finally have a working
Haskell interpreter and compiler.

Now I can get some work done. I already know Scheme is cool; now I'll
find out if Haskell is cooler.

(BTW, if you want to run ghc-6.4.1 on a recent version of OS X which
uses gcc 4.0 as default you'll need to run gcc_select to set gcc 3.3
as the default since that's what ghc_6.4.1 is compatible with.)

Rich Talley


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise