GHC build linking error

Hello all, 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 Which looks like the same issue discussed in: http://www.haskell.org/pipermail/glasgow-haskell-users/2011-December/021339.... The only proposed solution was Sean mentioned explicitly passing the GMP.framework to ./configure via --with-gmp-libraries and --with-gmp-includes; however, I have no such GMP.framework (I'm building from the framework versions of GHC 6.12.1 and HP 2010.1.0.0). So, any ideas on how to fix this? -- Live well, ~wren

Hi wren, On Tue, Jun 5, 2012 at 7:32 AM, wren ng thornton wrote:
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
Which looks like the same issue discussed in:
http://www.haskell.org/**pipermail/glasgow-haskell-** users/2011-December/021339.**htmlhttp://www.haskell.org/pipermail/glasgow-haskell-users/2011-December/021339....
The only proposed solution was Sean mentioned explicitly passing the GMP.framework to ./configure via --with-gmp-libraries and --with-gmp-includes; however, I have no such GMP.framework (I'm building from the framework versions of GHC 6.12.1 and HP 2010.1.0.0).
So, any ideas on how to fix this?
I was hoping somebody else had a bright idea, but no takers, yet. I don't remember where I got my GMP.framework from, exactly. I thought it used to be bundled with the HP. But it's apparently not anymore. I did some digging and came across the old repository for building Mac frameworks: http://hackage.haskell.org/trac/ghc/browser/MacFrameworks?rev=83153fae8bfe23... Perhaps you can use the script that's in there to build GMP.framework. Alternatively, I can provide you with mine directly. Regards, Sean

On 6/7/12 12:40 PM, Sean Leather wrote:
I was hoping somebody else had a bright idea, but no takers, yet.
I don't remember where I got my GMP.framework from, exactly. I thought it used to be bundled with the HP. But it's apparently not anymore.
I did some digging and came across the old repository for building Mac frameworks: http://hackage.haskell.org/trac/ghc/browser/MacFrameworks?rev=83153fae8bfe23...
Perhaps you can use the script that's in there to build GMP.framework. Alternatively, I can provide you with mine directly.
Thanks. I'll give it a shot and email you if I run into more issues. -- Live well, ~wren

wren ng thornton
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
participants (3)
-
harro verkouter
-
Sean Leather
-
wren ng thornton