multiple definition errors during gmp build

Mirko Vukovic mirko.vukovic at
Wed Jan 26 22:55:56 CET 2011

On Wed, Jan 26, 2011 at 2:45 PM, Marc Glisse <marc.glisse at> wrote:

> On Wed, 26 Jan 2011, Mirko Vukovic wrote:
>  I am building gmp 4.3.2 on a RHEL5
>> After doing configure, make fails with multiple definitions when linking:
>> gcc -std=gnu99 -shared  .libs/assert.o .libs/compat.o .libs/errno.o
>> ...
>> scanf/.libs/vscanf.o scanf/.libs/vsscanf.o   -m64 -mtune=core2 -Wl,-soname
>> -Wl, -o .libs/
>> .libs/compat.o: In function `feof_unlocked':
>> compat.c:(.text+0x0): multiple definition of `feof_unlocked'
>> .libs/assert.o:assert.c:(.text+0x0): first defined here
> Your system is broken (gcc and glibc disagree on the meaning of inline).
> If both come from the distribution, you can complain to your vendor.
> Installing a recent version of gcc may help, or not.
> Removing -std=gnu99 may also help (I can't remember if anything really
> needs it).
Thank you Mark.

That is correct.  I had a local gcc installation that was conflicting with
the system-wide.  Once that was fixed, the compilation proceeded OK.


More information about the gmp-discuss mailing list