tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libgmp: duplicate symbol


when building tools for NetBSD/amd64 on Mac OSX 10.5 configure for mpfr
fails with:

checking dynamic linker characteristics... darwin9.8.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether gcc __attribute__ ((mode (XX))) works... yes
checking for recent GMP... yes
checking for __gmpz_init in -lgmp... no
configure: error: libgmp not found or uses a different ABI.
Please read the INSTALL file -- see "In case of problem".
*** [.configure_done] Error code 1

Looking into the config.log I find this error:

ld: duplicate symbol ___gmpz_abs in
build/tooldir.amd64/lib/libgmp.a(memory.o) and

Attached is a fix. Please review.

Index: external/lgpl3/gmp/dist/
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/,v
retrieving revision 1.2
diff -u -p -r1.2
--- external/lgpl3/gmp/dist/    2 Jul 2011 14:05:03 -0000       1.2
+++ external/lgpl3/gmp/dist/    12 Dec 2012 14:13:45 -0000
@@ -423,7 +423,7 @@ typedef __mpq_struct *mpq_ptr;
 #ifdef __GNUC__
 #if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2)
 #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__))
+#elif (__GNUC__ == 4 && __GNUC_MINOR__ > 2)
 #define __GMP_EXTERN_INLINE      extern __inline__

Home | Main Index | Thread Index | Old Index