tech-toolchain archive

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

libgmp: duplicate symbol




Hi,

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
build/tooldir.amd64/lib/libgmp.a(lt22-init.o)


Attached is a fix. Please review.

Christoph
Index: external/lgpl3/gmp/dist/gmp-h.in
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/gmp-h.in,v
retrieving revision 1.2
diff -u -p -r1.2 gmp-h.in
--- external/lgpl3/gmp/dist/gmp-h.in    2 Jul 2011 14:05:03 -0000       1.2
+++ external/lgpl3/gmp/dist/gmp-h.in    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__))
-#else
+#elif (__GNUC__ == 4 && __GNUC_MINOR__ > 2)
 #define __GMP_EXTERN_INLINE      extern __inline__
 #endif
 #define __GMP_INLINE_PROTOTYPES  1


Home | Main Index | Thread Index | Old Index