[Bug bootstrap/55784] [4.8 regression] declaration of C function 'const char* strsignal(int)' conflicts with /usr/include/string.h:112: error: previous declaration

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Sat Dec 22 12:00:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55784

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at libertysurf
                   |                            |dot fr, rguenther at suse
                   |                            |dot de

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-12-22 12:00:12 UTC ---
I think this failure plagues all the builds which don't have a gmp dev package
installed and rely on --with-gmp. The following patch

--- ../_clean/gcc/configure    2012-12-20 17:19:54.000000000 +0100
+++ ../p_work/gcc/configure    2012-12-21 23:44:46.000000000 +0100
@@ -10321,9 +10321,9 @@ $as_echo "#define HAVE_LANGINFO_CODESET 

 # We will need to find libiberty.h and ansidecl.h
 saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
+CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
 saved_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include"
+CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
 for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
     strsignal strstr stpcpy strverscmp \
     errno snprintf vsnprintf vasprintf malloc realloc calloc \

fixes it for languages c,c++,lto,fortran,objc,obj-c++, but not for libada (I
did not test libjava, nor go).
With the above patch libada fails with

make -C ../gcc/ada/tools -f ../Makefile \
      "CC=../../xgcc -B../../" "CFLAGS=-g -O2 -W -Wall"
"LDFLAGS=-static-libstdc++ -static-libgcc " "ADAFLAGS=-gnatpg -gnata"
"ADA_CFLAGS=" "INCLUDES=-I. -I.. -I../.. -I/opt/gcc/p_work/gcc/ada
-I/opt/gcc/p_work/gcc/config -I/opt/gcc/p_work/gcc/../include
-I/opt/gcc/p_work/gcc" "ADA_INCLUDES=-I- -I../rts -I.
-I/opt/gcc/p_work/gcc/ada" "exeext=" "fsrcdir=/opt/gcc/p_work/gcc"
"srcdir=/opt/gcc/p_work/gcc" "GNATMAKE=../../gnatmake"
"GNATLINK=../../gnatlink" "GNATBIND=../../gnatbind" "TOOLSCASE=native" \
      ../../gnatmake ../../gnatlink
../../xgcc -B../../ -c -DIN_GCC  -g -O2 -W -Wall  \
        -iquote /opt/gcc/p_work/gcc \
         -iquote . -iquote .. -iquote ../.. -iquote /opt/gcc/p_work/gcc/ada
-iquote /opt/gcc/p_work/gcc -I/opt/gcc/p_work/gcc/../include \
        ../rts/targext.c -o targext.o
In file included from ../rts/targext.c:43:0:
/opt/gcc/p_work/gcc/system.h:641:17: fatal error: gmp.h: No such file or
directory
 #include <gmp.h>
                 ^



More information about the Gcc-bugs mailing list