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

Marc Glisse marc.glisse at normalesup.org
Mon Jun 1 03:23:52 CEST 2009


On Sat, 30 May 2009, Dennis Clarke wrote:

> #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.

http://gmplib.org/list-archives/gmp-bugs/2009-February/001276.html
http://gmplib.org/list-archives/gmp-bugs/2009-February/001278.html

IOW, yes.

> "../../../gmp-4.3.1/gmpxx.h", line 3138: Error: Ambiguous partial
> specialization for __gmp_expr<__mpf_struct[1],
> __gmp_binary_expr<__gmp_expr<__mpf_struct[1],
> __gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
> __gmp_expr<__mpf_struct[1], __mpf_struct[1]>, __gmp_binary_plus>>,
> __gmp_expr<__mpf_struct[1], __gmp_unary_expr<__gmp_expr<__mpf_struct[1],
> __mpf_struct[1]>, __gmp_unary_minus>>, __gmp_binary_multiplies>>,
> __gmp_expr and __gmp_expr.
> "../../../gmp-4.3.1/gmpxx.h", line 3138: Error: Too many arguments in cast
> to __gmp_expr<__mpf_struct[1],
> __gmp_binary_expr<__gmp_expr<__mpf_struct[1],
> __gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
> __gmp_expr<__mpf_struct[1], __mpf_struct[1]>, __gmp_binary_plus>>,
> __gmp_expr<__mpf_struct[1], __gmp_unary_expr<__gmp_expr<__mpf_struct[1],
> __mpf_struct[1]>, __gmp_unary_minus>>, __gmp_binary_multiplies>>.

Looks like bug 6528695 (fixed in a studio 12 patch).

It is strange, I don't think this code has changed recently, and I don't 
remember hearing about this failure on the list (ternary operators used to 
produce something similar).

-- 
Marc Glisse


More information about the gmp-bugs mailing list