For book Linux From Scratch - Version 6.4
and 
ALL in the /mnt/lfs/sources directory
do the following and you should have no problems. 

tar -jxf gcc-4.3.2.tar.bz2
cd gcc-4.3.2
 
tar -jxf ../mpfr-2.3.2.tar.bz2
mv mpfr-2.3.2 mpfr
tar -jxf ../gmp-4.2.4.tar.bz2
mv gmp-4.2.4 gmp

mkdir -v ../gcc-build
cd ../gcc-build
 
CC="gcc -B/usr/bin/" ../gcc-4.3.2/configure --prefix=/tools \
    --with-local-prefix=/tools --disable-nls --disable-shared --disable-libssp \
    --enable-languages=c
 
make
make install


...continue with the rest of steps 5.5.1


________________________________
From: Chris Staub <[email protected]>
To: [email protected]
Sent: Wednesday, August 19, 2009 3:20:08 PM
Subject: Re: gcc compile error pass 1

On 08/19/2009 06:10 PM, Justin Solarski wrote:
> I have been having an some trouble trying to compile gcc-4.3.2 on
> chapter 5.5.1
> i followed the directions but with this config
> CC="gcc -B/usr/bin/" ../gcc-4.3.2/configure \
>      --prefix=/tools --with-local-prefix=/tools --disable-nls \
>      --disable-shared --disable-libssp --enable-languages=c
> it could not find gmp or mpfr
> so i used
> CC="gcc -B/usr/bin/" ../gcc-4.3.2/configure --prefix=/tools
> --with-local-prefix=/tools --disable-nls \
>  --disable-shared --disable-libssp --enable-languages=c
> --with-gmp=/mnt/lfs/sources/gmp --with-mpfr=/mnt/lfs/sources/mpfr
> and it configured fine
> then when i run make i get this error
> /bin/bash ../../gcc-4.3.2/gcc/../move-if-change tmp-flags.h insn-flags.h
> echo timestamp > s-flags
> /mnt/lfs/sources/gcc-build/./prev-gcc/xgcc
> -B/mnt/lfs/sources/gcc-build/./prev-gcc/ -B/tools/i686-pc-linux-gnu/bin/
> -c  -g -O2 -fomit-frame-pointer -DIN_GCC  -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
> -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
>          -Wno-overlength-strings    -DHAVE_CONFIG_H -I. -I.
> -I../../gcc-4.3.2/gcc -I../../gcc-4.3.2/gcc/.
> -I../../gcc-4.3.2/gcc/../include -I../../gcc-4.3.2/gcc/../libcpp/include
> -I/mnt/lfs/sources/gmp/include -I/mnt/lfs/sources/mpfr/include
> -I../../gcc-4.3.2/gcc/../libdecnumber
> -I../../gcc-4.3.2/gcc/../libdecnumber/bid -I../libdecnumber
> ../../gcc-4.3.2/gcc/c-lang.c -o c-lang.o
> In file included from ../../gcc-4.3.2/gcc/tree.h:30,
>                  from ../../gcc-4.3.2/gcc/c-lang.c:26:
> ../../gcc-4.3.2/gcc/double-int.h:24:17: error: gmp.h: No such file or
> directory
> In file included from ../../gcc-4.3.2/gcc/tree.h:30,
>                  from ../../gcc-4.3.2/gcc/c-lang.c:26:
> ../../gcc-4.3.2/gcc/double-int.h:184: error: expected ')' before
> 'double_int'
> ../../gcc-4.3.2/gcc/double-int.h:185: error: expected declaration
> specifiers or '...' before 'mpz_t'
> In file included from ../../gcc-4.3.2/gcc/c-lang.c:26:
> ../../gcc-4.3.2/gcc/tree.h:4895: error: expected declaration specifiers
> or '...' before 'mpz_t'
> ../../gcc-4.3.2/gcc/tree.h:4895: error: expected declaration specifiers
> or '...' before 'mpz_t'
> make[3]: *** [c-lang.o] Error 1
> make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
> make[2]: *** [all-stage2-gcc] Error 2
> make[2]: Leaving directory `/mnt/lfs/sources/gcc-build'
> make[1]: *** [stage2-bubble] Error 2
> make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
> make: *** [all] Error 2
>
> What i have tried is install gmp and mpfr on the host system also tried
> googling the error with no luck on finding anything useful
> also redownloaded the packages just in case
> the only other deviation from the book that i am doing is instead of a
> seperate partition i am running off a 2GB usb drive
> any help would be appreciated
>
> Thanks
> Justin
>

You probably didn't unpack GMP and MPFR into the GCC source dir before 
building GCC. My guess is that you missed the note on page 5.3 that says 
you are expected to be in a package's source dir before following the 
instructions on that package's page. If you do as that says, and follow 
the instructions as given (don't add --with-gmp or any other configure 
switches not given in the book) it will work fine.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page



      
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to