GHC build linking error
harro verkouter
hverkouter at gmail.com
Fri Nov 30 02:58:53 CET 2012
wren ng thornton <wren <at> freegeek.org> 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
Hi,
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.
See http://gmplib.org/list-archives/gmp-bugs/2010-January/001838.html
2) then I installed the "Haskell Platform 6.12.3" from
http://www.haskell.org/ghc/download_ghc_6_12_3
http://www.haskell.org/ghc/download_ghc_6_12_3#macosxintel
3) download ghc-7.4.1.tar.bz2
http://www.haskell.org/ghc/download_ghc_7_4_2#sources
4) after unbzipping and untarring:
$> cd ghc-7.4.2
$> ./configure --with-gcc=gcc-4.2
$> make
(success!)
$> make install
(profit!)
Hope you will manage to get it to work too!
cheers,
h verkouter
More information about the Glasgow-haskell-users
mailing list