ld: fatal: symbol `__gmpz_abs' is multiply-defined:
Dennis Clarke
dclarke at blastwave.org
Sun May 31 04:09:57 CEST 2009
> On Sun, 31 May 2009, Marc Glisse wrote:
>
>> "inline": should work (and be even better at avoiding duplicates), works
>> on
>> x86, but fails on x64 (I reported it as a bug to Sun, we'll see if they
>> agree)
>
> Hmm, I should have mentionned that this bug only manifests if you compile
> gmp without any optimization. The most basic level of optimization (-xO1)
> is enough to hide it, so using "inline" (which is better than "static
> inline") shouldn't hurt too many people. Still, "static inline" looks like
> the safe option.
I do my initial test builds with no optimization and perhaps that is part
of the issue.
The Sparc v8plus build just finished and the testsuite report looks clean :
opensolaris:~$ grep -c PASS test_report_gmp.log
126
opensolaris:~$ grep tests\ passed test_report_gmp.log
All 9 tests passed
All 12 tests passed
All 58 tests passed
All 11 tests passed
All 26 tests passed
All 7 tests passed
All 3 tests passed
With the exception of the last bits thus :
/opt/studio/SOS11/SUNWspro/bin/CC -DHAVE_CONFIG_H -I.
-I../../../gmp-4.3.1/tests/cxx -I../.. -I../../../gmp-4.3.1
-I../../../gmp-4.3.1/tests -I/export/home/foss/local/include
-xarch=v8plus -library=stlport4 -norunpath -R/export/home/foss/local/lib
-L/export/home/foss/local/lib -g -xs -D_TS_ERRNO -c -o t-assign.o
../../../gmp-4.3.1/tests/cxx/t-assign.cc
/bin/bash ../../libtool --mode=link /opt/studio/SOS11/SUNWspro/bin/CC
-xarch=v8plus -library=stlport4 -norunpath -R/export/home/foss/local/lib
-L/export/home/foss/local/lib -g -xs -D_TS_ERRNO -o t-assign t-assign.o
-L../../.libs ../../tests/libtests.la ../../libgmpxx.la ../../libgmp.la
mkdir .libs
/opt/studio/SOS11/SUNWspro/bin/CC -xarch=v8plus -norunpath -g -xs
-D_TS_ERRNO -o .libs/t-assign t-assign.o
-L/opt/build/foss/libgmp/gmp-4.3.1_sparcv8-try3/.libs
-L/export/home/foss/local/lib ../../tests/.libs/libtests.a
../../.libs/libgmpxx.so -library=stlport4
/opt/build/foss/libgmp/gmp-4.3.1_sparcv8-try3/.libs/libgmp.so
../../.libs/libgmp.so -R/export/home/foss/local/lib
ld: warning: file ../../.libs/libgmp.so: linked to
/opt/build/foss/libgmp/gmp-4.3.1_sparcv8-try3/.libs/libgmp.so: attempted
multiple inclusion of file
creating t-assign
/opt/studio/SOS11/SUNWspro/bin/CC -DHAVE_CONFIG_H -I.
-I../../../gmp-4.3.1/tests/cxx -I../.. -I../../../gmp-4.3.1
-I../../../gmp-4.3.1/tests -I/export/home/foss/local/include
-xarch=v8plus -library=stlport4 -norunpath -R/export/home/foss/local/lib
-L/export/home/foss/local/lib -g -xs -D_TS_ERRNO -c -o t-binary.o
../../../gmp-4.3.1/tests/cxx/t-binary.cc
"../../../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>>.
"../../../gmp-4.3.1/gmpxx.h", line 3136: Error: Ambiguous partial
specialization for __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
__gmp_expr<__mpz_struct[1], __mpz_struct[1]>, __gmp_binary_plus>>,
__gmp_expr and __gmp_expr.
"../../../gmp-4.3.1/gmpxx.h", line 3136: Error: Too many arguments in cast
to __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
__gmp_expr<__mpz_struct[1], __mpz_struct[1]>, __gmp_binary_plus>>.
"../../../gmp-4.3.1/gmpxx.h", line 3139: Error: Ambiguous partial
specialization for __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 and __gmp_expr.
"../../../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], __mpf_struct[1]>,
__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, __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], __mpf_struct[1]>,
__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, __gmp_binary_multiplies>>.
"../../../gmp-4.3.1/gmpxx.h", line 3137: 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_divides>>,
__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, __gmp_binary_minus>>,
__gmp_expr and __gmp_expr.
"../../../gmp-4.3.1/gmpxx.h", line 3137: 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_divides>>,
__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, __gmp_binary_minus>>.
"../../../gmp-4.3.1/gmpxx.h", line 3138: Error: Ambiguous partial
specialization for __gmp_expr<__mpf_struct[1],
__gmp_unary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
__gmp_unary_minus>>, __gmp_expr and __gmp_expr.
"../../../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], __mpf_struct[1]>,
__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], __mpf_struct[1]>,
__gmp_expr<__mpf_struct[1], __gmp_unary_expr<__gmp_expr<__mpf_struct[1],
__mpf_struct[1]>, __gmp_unary_minus>>, __gmp_binary_multiplies>>.
"../../../gmp-4.3.1/gmpxx.h", line 3133: Error: Ambiguous partial
specialization for __gmp_expr<__mpf_struct[1],
__gmp_unary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
__gmp_unary_minus>>, __gmp_expr and __gmp_expr.
"../../../gmp-4.3.1/gmpxx.h", line 3133: Error: The type
"__gmp_expr<__mpf_struct[1], __gmp_unary_expr<__gmp_expr<__mpf_struct[1],
__mpf_struct[1]>, __gmp_unary_minus>>" is incomplete.
"../../../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], __mpf_struct[1]>,
__gmp_expr<__mpq_struct[1], __mpq_struct[1]>, __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], __mpf_struct[1]>,
__gmp_expr<__mpq_struct[1], __mpq_struct[1]>, __gmp_binary_multiplies>>.
"../../../gmp-4.3.1/gmpxx.h", line 3138: Error: Ambiguous partial
specialization for __gmp_expr<__mpz_struct[1],
__gmp_binary_expr<__gmp_expr<__mpz_struct[1], __mpz_struct[1]>,
__gmp_expr<__mpz_struct[1], __mpz_struct[1]>, __gmp_binary_plus>>,
__gmp_expr and __gmp_expr.
"../../../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], __mpf_struct[1]>,
__gmp_expr<__mpz_struct[1], __gmp_binary_expr<__gmp_expr<__mpz_struct[1],
__mpz_struct[1]>, __gmp_expr<__mpz_struct[1], __mpz_struct[1]>,
__gmp_binary_plus>>, __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], __mpf_struct[1]>,
__gmp_expr<__mpz_struct[1], __gmp_binary_expr<__gmp_expr<__mpz_struct[1],
__mpz_struct[1]>, __gmp_expr<__mpz_struct[1], __mpz_struct[1]>,
__gmp_binary_plus>>, __gmp_binary_multiplies>>.
"../../../gmp-4.3.1/gmpxx.h", line 3137: Error: Ambiguous partial
specialization for __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
__gmp_expr<__mpz_struct[1], __mpz_struct[1]>, __gmp_binary_minus>>,
__gmp_expr and __gmp_expr.
"../../../gmp-4.3.1/gmpxx.h", line 3137: Error: Too many arguments in cast
to __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>,
__gmp_expr<__mpz_struct[1], __mpz_struct[1]>, __gmp_binary_minus>>.
"../../../gmp-4.3.1/gmpxx.h", line 3136: Error: Ambiguous partial
specialization for __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, long,
__gmp_binary_plus>>, __gmp_expr and __gmp_expr.
"../../../gmp-4.3.1/gmpxx.h", line 3136: Error: Too many arguments in cast
to __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, long,
__gmp_binary_plus>>.
"../../../gmp-4.3.1/gmpxx.h", line 3137: Error: Ambiguous partial
specialization for __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, long,
__gmp_binary_minus>>, __gmp_expr and __gmp_expr.
"../../../gmp-4.3.1/gmpxx.h", line 3137: Error: Too many arguments in cast
to __gmp_expr<__mpf_struct[1],
__gmp_binary_expr<__gmp_expr<__mpf_struct[1], __mpf_struct[1]>, long,
__gmp_binary_minus>>.
Compilation aborted, too many Error messages.
make[4]: *** [t-binary.o] Error 1
make[4]: Leaving directory
`/opt/build/foss/libgmp/gmp-4.3.1_sparcv8-try3/tests/cxx'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory
`/opt/build/foss/libgmp/gmp-4.3.1_sparcv8-try3/tests/cxx'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory
`/opt/build/foss/libgmp/gmp-4.3.1_sparcv8-try3/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/opt/build/foss/libgmp/gmp-4.3.1_sparcv8-try3'
make: *** [check] Error 2
bash-4.0$
Dennis
More information about the gmp-bugs
mailing list