Problems install gmp 5.0.5 on Powermac Quad with OS X 10.5.8

Jack Howarth howarth at bromo.med.uc.edu
Mon Oct 22 18:30:39 CEST 2012


On Mon, Oct 22, 2012 at 09:09:58AM -0700, Christian Calderon wrote:
> Well, I discovered that the problem I was having was with my apple  
> version of gcc. Apparently it didn't have support for __gnu_inline__  
> stuff, and that was making everything fail. so I HAVE to use the CC=  
> part of my configure. I tried again after installing gcc47 from  
> MacPorts, and everything seemed to go ok, until i tried:
>
> make check
>
> Which is where everything died again. It looked like I was missing some 
> architecture specific files, as I saw these line in the output of make 
> check just before it output a bunch of undefined symbol warnings and 
> died:
>
> ld: warning: in /opt/local/lib/gcc47/libgcc_ext.10.5.dylib, missing  
> required architecture ppc64 in file
> ld: warning: in /opt/local/lib/gcc47/gcc/ppc-apple-darwin9/4.7.2/ 
> libgcc.a, file was built for unsupported file format which is not the  
> architecture being linked (ppc64)
>
> So I will try now to use JUST the CC option and see where that takes me.
> Also, I took a look at the url you sent me to, and here is the other  
> info:
>
> uname -a
> Darwin administrators-power-mac-g5.local 9.8.0 Darwin Kernel Version  
> 9.8.0: Wed Jul 15 16:57:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC  
> Power Macintosh
>
> ./config.guess
> powerpc970-apple-darwin9.8.0
>
> ./configfsf.guess
> powerpc-apple-darwin9.8.0
>
> This time I was configuring as so:
>
> ./configure CC=gcc-mp-4.7 CXX=g++-mp-4.7 --prefix=/opt/gmp/5.0.5 -- 
> enable-cxx --enable-assert --build=powerpc970-apple-darwin9.8.0
>
> I will attempt to build again using only CC=gcc-mp-4.7 now.
>
> On Oct 22, 2012, at 8:40 AM, Marc Glisse wrote:
>
>> On Sun, 21 Oct 2012, Christian Calderon wrote:
>>
>>> The install failed during the make phase of the build. I configured  
>>> as so:
>>>
>>> ./configure --prefix=/opt/gmp/5.0.5 --enable-cxx --enable-assert -- 
>>> build=powerpc970-apple-darwin9.8.0
>>>
>>> The configure succeeded, so the next thing I did was:
>>>
>>> make
>>>
>>> During the make process lots of warnings came up about  
>>> '__gnu_inline__' being ignored.
>>>
>>> The last four lines were
>>>
>>> ld: duplicate symbol ___gmpz_abs in .libs/compat.o and .libs/assert.o
>>> collect2: ld returned 1 exit status
>>> make[2]: *** [libgmp.la] Error 1
>>> make[1]: *** [all-recursive] Error 1
>>> make: *** [all] Error 2

I believe this was discussed long ago in http://gmplib.org/list-archives/gmp-bugs/2010-January/001838.html.

Just use CC/CXX to set the compiler to gcc-4.2 and g++-4.2 on darwin9.
You also may want to add the powerpc asm fix discussed in this thread

http://gmplib.org/list-archives/gmp-bugs/2012-July/002731.html

and attached from the fink gmp5 package.
              Jack
>>
>> See http://gmplib.org/manual/Reporting-Bugs.html , we need more info.
>>
>>> Is this because of the --enable-assert option?
>>
>> Probably not, but the first thing to try before reporting a bug is to 
>> remove as many configure options as you can (start with no option at 
>> all).
>>
>> -- 
>> Marc Glisse
>
> _______________________________________________
> gmp-bugs mailing list
> gmp-bugs at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-bugs
-------------- next part --------------
diff -r 816c18dbd492 -r 829215e83ff1 ChangeLog
--- a/ChangeLog	Tue Jun 19 15:02:48 2012 +0200
+++ b/ChangeLog	Sat Jul 21 19:19:11 2012 +0200
@@ -1,3 +1,8 @@
+2012-07-21  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/powerpc32/vmx/mod_34lsub1.asm: Fix r0 clobbering issue with
+	"large" code affecting elf+darwin PIC.
+
 2012-05-06  Torbjorn Granlund  <tege at gmplib.org>
 
 	* Version 5.0.5 released.
diff -r 816c18dbd492 -r 829215e83ff1 mpn/powerpc32/vmx/mod_34lsub1.asm
--- a/mpn/powerpc32/vmx/mod_34lsub1.asm	Tue Jun 19 15:02:48 2012 +0200
+++ b/mpn/powerpc32/vmx/mod_34lsub1.asm	Sat Jul 21 19:19:11 2012 +0200
@@ -1,6 +1,7 @@
 dnl  PowerPC-32 mpn_mod_34lsub1 -- mpn remainder mod 2^24-1.
 
-dnl  Copyright 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl  Copyright 2002, 2003, 2005, 2006, 2007, 2012 Free Software Foundation,
+dnl  Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -135,15 +136,15 @@
 
 	andi.	r7, up, 15
 	vxor	a0, v0, v0
-	lis	r0, 0xaaaa
+	lis	r9, 0xaaaa
 	vxor	a1, v0, v0
-	ori	r0, r0, 0xaaab
+	ori	r9, r9, 0xaaab
 	vxor	a2, v0, v0
 	li	r5, 16
 	vxor	c0, v0, v0
 	li	r6, 32
 	vxor	c1, v0, v0
-	LEAL(	r11, cnsts)
+	LEAL(	r11, cnsts)		C CAUTION clobbers r0 for elf, darwin
 	vxor	c2, v0, v0
 	vxor	z, v0, v0
 
@@ -158,7 +159,7 @@
 	vsldoi	a2, z, a2, 12
 
 	addi	n, n, 9
-	mulhwu	r0, n, r0
+	mulhwu	r0, n, r9
 	srwi	r0, r0, 3		C r0 = floor(n/12)
 	mtctr	r0
 
@@ -174,7 +175,7 @@
 	vsldoi	a1, z, a1, 8
 
 	addi	n, n, 6
-	mulhwu	r0, n, r0
+	mulhwu	r0, n, r9
 	srwi	r0, r0, 3		C r0 = floor(n/12)
 	mtctr	r0
 
@@ -188,7 +189,7 @@
 	vsldoi	a0, z, a0, 4
 
 	addi	n, n, 3
-	mulhwu	r0, n, r0
+	mulhwu	r0, n, r9
 	srwi	r0, r0, 3		C r0 = floor(n/12)
 	mtctr	r0
 
@@ -197,7 +198,7 @@
 	b	L(0)
 
 L(aligned16):
-	mulhwu	r0, n, r0
+	mulhwu	r0, n, r9
 	srwi	r0, r0, 3		C r0 = floor(n/12)
 	mtctr	r0
 


More information about the gmp-bugs mailing list