[Clfs-support] Build Error for GCC-4.8.1 (chpt 6.9 )

Daniel King dking888 at columbus.rr.com
Mon Jun 10 20:56:04 PDT 2013


Hello All,

I am currently working through the x86_64 multilib clfsbook 
(GIT-20130607). I am currently in section 6.9 GCC-4.8.1. The build 
failed with the following error.

make[2]: Leaving directory `/mnt/clfs/sources/gcc-build/libdecnumber'
make[2]: Entering directory `/mnt/clfs/sources/gcc-build/gcc'
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="" \
     /bin/sh ../../gcc-4.8.1/gcc/mkconfig.sh config.h
TARGET_CPU_DEFAULT="" \
     HEADERS="options.h insn-constants.h config/vxworks-dummy.h 
config/i386/biarch64.h config/i386/i386.h config/linux-android.h 
config/i386/unix.h config/i386/att.h config/dbxelf.h config/elfos.h 
config/gnu-user.h config/glibc-stdint.h config/i386/x86-64.h 
config/i386/gnu-user-common.h config/i386/gnu-user64.h config/linux.h 
config/i386/linux-common.h config/i386/linux64.h config/initfini-array.h 
defaults.h" DEFINES="LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 
DEFAULT_LIBC=LIBC_GLIBC ANDROID_DEFAULT=0" \
     /bin/sh ../../gcc-4.8.1/gcc/mkconfig.sh tm.h
gawk -f ../../gcc-4.8.1/gcc/opt-gather.awk 
../../gcc-4.8.1/gcc/ada/gcc-interface/lang.opt 
../../gcc-4.8.1/gcc/fortran/lang.opt ../../gcc-4.8.1/gcc/go/lang.opt 
../../gcc-4.8.1/gcc/java/lang.opt ../../gcc-4.8.1/gcc/lto/lang.opt 
../../gcc-4.8.1/gcc/c-family/c.opt ../../gcc-4.8.1/gcc/common.opt 
../../gcc-4.8.1/gcc/config/fused-madd.opt 
../../gcc-4.8.1/gcc/config/i386/i386.opt 
../../gcc-4.8.1/gcc/config/gnu-user.opt 
../../gcc-4.8.1/gcc/config/linux.opt 
../../gcc-4.8.1/gcc/config/linux-android.opt > tmp-optionlist
/bin/sh ../../gcc-4.8.1/gcc/../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
gawk -f ../../gcc-4.8.1/gcc/opt-functions.awk -f 
../../gcc-4.8.1/gcc/opt-read.awk \
            -f ../../gcc-4.8.1/gcc/opth-gen.awk \
            < optionlist > tmp-options.h
/bin/sh ../../gcc-4.8.1/gcc/../move-if-change tmp-options.h options.h
echo timestamp > s-options-h
TARGET_CPU_DEFAULT="" \
HEADERS="auto-build.h ansidecl.h" DEFINES="" \
     /bin/sh ../../gcc-4.8.1/gcc/mkconfig.sh bconfig.h
g++ -c   -g -O2 -DIN_GCC -fno-exceptions -fno-rtti 
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H 
-DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.8.1/gcc 
-I../../gcc-4.8.1/gcc/build -I../../gcc-4.8.1/gcc/../include 
-I../../gcc-4.8.1/gcc/../libcpp/include 
-I../../gcc-4.8.1/gcc/../libdecnumber 
-I../../gcc-4.8.1/gcc/../libdecnumber/bid -I../libdecnumber 
-I../../gcc-4.8.1/gcc/../libbacktrace -DCLOOG_INT_GMP    \
         -o build/genconstants.o ../../gcc-4.8.1/gcc/genconstants.c
In file included from /usr/include/x86_64-linux-gnu/sys/resource.h:25:0,
                  from ../../gcc-4.8.1/gcc/system.h:395,
                  from ../../gcc-4.8.1/gcc/genconstants.c:28:
/usr/include/x86_64-linux-gnu/bits/resource.h:131:18: error: declaration 
does not declare anything [-fpermissive]
In file included from ../../gcc-4.8.1/gcc/genconstants.c:28:0:
../../gcc-4.8.1/gcc/system.h:444:23: error: declaration of C function 
'void* sbrk(int)' conflicts with
In file included from ../../gcc-4.8.1/gcc/system.h:254:0,
                  from ../../gcc-4.8.1/gcc/genconstants.c:28:
/usr/include/unistd.h:1065:14: error: previous declaration 'void* 
sbrk(intptr_t)' here
In file included from ../../gcc-4.8.1/gcc/genconstants.c:28:0:
../../gcc-4.8.1/gcc/system.h:448:48: error: new declaration 'char* 
strstr(const char*, const char*)'
In file included from /usr/include/c++/4.7/cstring:44:0,
                  from ../../gcc-4.8.1/gcc/system.h:205,
                  from ../../gcc-4.8.1/gcc/genconstants.c:28:
/usr/include/string.h:331:1: error: ambiguates old declaration 'const 
char* strstr(const char*, const char*)'
In file included from ../../gcc-4.8.1/gcc/genconstants.c:28:0:
../../gcc-4.8.1/gcc/system.h:500:34: error: declaration of C function 
'const char* strsignal(int)' conflicts with
In file included from /usr/include/c++/4.7/cstring:44:0,
                  from ../../gcc-4.8.1/gcc/system.h:205,
                  from ../../gcc-4.8.1/gcc/genconstants.c:28:
/usr/include/string.h:562:14: error: previous declaration 'char* 
strsignal(int)' here
In file included from ../../gcc-4.8.1/gcc/system.h:645:0,
                  from ../../gcc-4.8.1/gcc/genconstants.c:28:
../../gcc-4.8.1/gcc/../include/libiberty.h:110:36: error: new 
declaration 'char* basename(const char*)'
In file included from /usr/include/c++/4.7/cstring:44:0,
                  from ../../gcc-4.8.1/gcc/system.h:205,
                  from ../../gcc-4.8.1/gcc/genconstants.c:28:
/usr/include/string.h:599:26: error: ambiguates old declaration 'const 
char* basename(const char*)'
make[2]: *** [build/genconstants.o] Error 1
make[2]: Leaving directory `/mnt/clfs/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/clfs/sources/gcc-build'
make: *** [all] Error 2

Thanks for your help,

Daniel King




More information about the Clfs-support mailing list