multiple definition error when compiling gcc-4.4.2

Andi Hellmund mail@andihellmund.com
Sat Nov 21 09:37:00 GMT 2009


xinsan Chen wrote:
>  hi, all
>     Now I meet new problem during compiling gcc-4.4.2.
>     after installing gmp and mpfr,
>     ./configure --prefix=/home/cj/gcc-4.4.2
> --enable_languages=c,c++,fortran --with-gmp=/usr/local
> --with-mpfr=/usr/local
>     make
>
>     .libs/compile_options.o: In function 'feof_unlocked'
>     /usr/include/bits/stdio.h:123: multiple definition of 'feof_unlocked'
>    .libs/backtrace.o:/usr/include/bits/stdio.h:123: first defined here
>    .libs/compile_options.o: In function 'ferror_unlocked':
>    /usr/include/bits/stdio.h:130: multiple definition of 'ferror_unlocked'
>    .libs/backtrace.o:/usr/include/bits/stdio.h:130: first defined here
>    ...
>
>     How to solve this? Thanks.
>
>   
Hey,

first of all, you should conform to the recommendations on 
http://gcc.gnu.org/install/configure.html

"First, we *highly* recommend that GCC be built into a separate
directory from the sources which does *not* reside within the source tree."

Andi



More information about the Gcc-help mailing list