[lfs-support] Fwd: Second gcc run fails (chapter 5.9. GCC-4.7.1 - Pass 2)

Hans Fonteyn fonteyn.hans at gmail.com
Sat Oct 27 14:18:31 PDT 2012

Hi all,

Here is the scenario:

Executed all previous steps succesfully.

Arriving at chapter 5.9. GCC-4.7.1 - Pass 2.

I re-extract the gcc tarball.
cd into extracted gcc folder.
run following commands:
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
  `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h

cp -v gcc/Makefile.in{,.tmp}

sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \
  > gcc/Makefile.in

for file in \
 $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
  cp -uv $file{,.orig}
  sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
  -e 's@/usr@/tools at g' $file.orig > $file
  echo '
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
  touch $file.orig

tar -Jxf ../mpfr-3.1.1.tar.xz
mv -v mpfr-3.1.1 mpfr

tar -Jxf ../gmp-5.0.5.tar.xz
mv -v gmp-5.0.5 gmp

tar -zxf ../mpc-1.0.tar.gz
mv -v mpc-1.0 mpc

mkdir -v ../gcc-build
cd ../gcc-build

CC=$LFS_TGT-gcc \
AR=$LFS_TGT-ar                  \
RANLIB=$LFS_TGT-ranlib          \
../gcc-4.7.1/configure          \
    --prefix=/tools             \
    --with-local-prefix=/tools \
    --with-native-system-header-dir=/tools/include \
    --enable-clocale=gnu        \
    --enable-shared             \
    --enable-threads=posix      \
    --enable-__cxa_atexit       \
    --enable-languages=c,c++    \
    --disable-libstdcxx-pch     \
    --disable-multilib          \
    --disable-bootstrap         \
    --disable-libgomp           \
    --with-mpfr-include=$(pwd)/../gcc-4.7.1/mpfr/src \

/* everthing seems to be going fine up until now            */
/* But running make results in abortion with next error:
lfs at hbox:/mnt/lfs/sources/gcc-build$ make
.          .         .         .
.          .         .         .
.          .         .         .
../../gcc-4.7.1/gcc/config/host-linux.c: In function
../../gcc-4.7.1/gcc/config/host-linux.c:213:32: error: 'SSIZE_MAX'
undeclared (first use in this function)
../../gcc-4.7.1/gcc/config/host-linux.c:213:32: note: each undeclared
identifier is reported only once for each function it appears in
make[2]: *** [host-linux.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2


I'm very new here so anyone who could help me in the right direction in a
gentle way is welcome!
I tried to google the error but without result...
I hope my post is clear and not to stupid!


Mr. Fonteyn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20121027/d71d5c3b/attachment.html>

More information about the lfs-support mailing list