multiple definition errors during gmp build

Marc Glisse marc.glisse at
Wed Jan 26 20:45:37 CET 2011

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

Marc Glisse

More information about the gmp-discuss mailing list