GHC build linking error

harro verkouter hverkouter at
Fri Nov 30 02:58:53 CET 2012

wren ng thornton <wren <at>> writes:

> I'm working on creating some distribution bundles of GHC 7.4.1 and HP 
> 2012.2.0.0 for OSX 10.5 to help rectify the lack of support on older 
> Macs. In building GHC I've run into a linking error in stage1:
>      ld: duplicate symbol ___gmpz_abs in 
> libraries/integer-gmp/gmp/objs/add.o and 
> libraries/integer-gmp/gmp/objs/abs.o


I ran into the same problem but managed to get it to work, finally.
I run Mac OSX 10.5.8 on an Intel based Mac.

1) make sure you have Xcode 3.4.1 from the Apple Developers download site:
You need gcc-4.2. Test this by doing this in a shell:
   $> gcc-4.2 -v

According to the gmp developers this link error goes away when using gcc-4.2.

2) then I installed the "Haskell Platform 6.12.3" from

3) download ghc-7.4.1.tar.bz2

4) after unbzipping and untarring:
   $> cd ghc-7.4.2
   $> ./configure --with-gcc=gcc-4.2
   $> make 
   $> make install

Hope you will manage to get it to work too!

h verkouter

More information about the Glasgow-haskell-users mailing list