ld: fatal: symbol `__gmpz_abs' is multiply-defined:

Dennis Clarke dclarke at blastwave.org
Sun May 31 01:08:12 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.

Thank you.

also, here is another annoying little thing :

$ ls -l cxx/osdoprnti.cc
-rw-r--r--   1 dclarke  csw     2002 May 30 19:36 cxx/osdoprnti.cc

#include <iostream>
/* This next line was #include <cstdarg> which does not work with Solaris */
#include <stdarg.h>    /* for va_list and hence doprnt_funs_t */
#include <cstring>    /* for strlen */

that has to change or bad things happen also.

I'll give your modification a whirl right now and see what happens.

Dennis



More information about the gmp-bugs mailing list