ld fails under Solaris/i386
Torbjorn Granlund
tg at gmplib.org
Fri Jan 15 17:38:20 CET 2010
Marc Glisse <marc.glisse at normalesup.org> writes:
On Fri, 20 Nov 2009, Marc Glisse wrote:
> On Fri, 20 Nov 2009, Vincent Lefevre wrote:
>
>> When building GMP, ld fails under Solaris (see attachment for
>> config.log and make output). First error is:
>>
>> ld: fatal: symbol `__gmpz_abs' is multiply-defined:
>> (file .libs/assert.o type=FUNC; file mpz/.libs/abs.o type=FUNC);
>
> In gmp.h, for sunpro, there is a line that says "extern inline"
> where it should be just "inline" (see previous discussions here). It
> looks like it hasn't been fixed in mercurial yet.
Ping.
Ping ping.
As the above paragraph suggests, you just need to remove the word
"extern" on line 466 of gmp-h.in to let gmp compile with sunpro (well,
the version I tried segfaulted on the "reuse" test in gmp5, but that
is something else).
Using just "inline" without some other keyword seems just wrong.
1. The function will appear in .o files even if not used (waste of space).
2. The function will appear as global in many .o files and thus cause
multiply defined symbol errors.
--
Torbjörn
More information about the gmp-bugs
mailing list