ld: fatal: symbol `__gmpz_abs' is multiply-defined:
marc.glisse at normalesup.org
Mon Jun 1 19:07:46 CEST 2009
On Mon, 1 Jun 2009, Torbjorn Granlund wrote:
> I cannot follow the various Sun compiler problems, and therefore hope
> you will summarize for me the workarounds that you determine are
> necessary and reasonable.
> Whether a bug should be wrked around is a sticky issue. If it takes a
> #define or two, then it is fine. But changing the actual library code
> is a losing game, since the envelope of compilable, correct code is
> surely empty.
Except for the weird C++ ambiguity message (which doesn't happen with
recent versions of the compiler), we are actually talking about gmp bugs
that are easy to fix.
1) __GMP_EXTERN_INLINE should not be "extern inline". "static inline"
works fine. "inline" works even better, except on x86_64 when no
optimization is used (because of a bug). So, your choice whether you
replace "extern inline" with "inline" (ignore the bug) or just remove 6
lines (but maybe keep a comment somewhere that "inline" is the right
2) if you want std::va_list, include cstdarg. If OTOH you want va_list
(without the std:: in front), include stdarg.h instead. All the files in
cxx/ currently use stdarg.h except for osdoprnti.cc which has cstdarg and
would benefit from switching to stdarg.h like the others.
(I stand by what I said in:
which would also allow you to remove all the stdarg.h and cstdarg from
More information about the gmp-bugs