ld: fatal: symbol `__gmpz_abs' is multiply-defined:
Marc Glisse
marc.glisse at normalesup.org
Sun May 31 00:55:50 CEST 2009
On Sat, 30 May 2009, Dennis Clarke wrote:
> ld: fatal: symbol `__gmpz_abs' is multiply-defined:
> (file .libs/assert.o type=FUNC; file mpz/.libs/abs.o type=FUNC);
In gmp-h.in, you have the following:
/* Recent enough Sun C compilers accept "extern inline" */
#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \
&& ! defined (__GMP_EXTERN_INLINE)
#define __GMP_EXTERN_INLINE extern inline
#endif
/* Somewhat older Sun C compilers accept "static inline" */
#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \
&& ! defined (__GMP_EXTERN_INLINE)
#define __GMP_EXTERN_INLINE static inline
#endif
If you remove the first block, things work better. Now I am off to try and
understand what goes wrong with the "extern inline" version, my basic
tests seemed to imply that it should work... Apparently, putting just
"inline" also fails with a weird message about non-PIC code. At least
"static inline" works...
Sorry about that.
--
Marc Glisse
More information about the gmp-bugs
mailing list