[SOLVED] Re: 5.5 GCC-4.5.1 - Pass 1 - c99 mode compilation error - openSUSE (host)

gnu2007-lfs at yahoo.co.in gnu2007-lfs at yahoo.co.in
Wed Nov 17 08:25:25 PST 2010

Thank-you Bruce for your responses & time.
It is fixed, after installing all development packages even remotely associated to all stuff that is checked up at configure time. I also installed all the packages mentioned at http://gcc.gnu.org/install/prerequisites.html.
I wonder why the configure was showing no errors when a crucial package is not available.
--- On Tue, 16/11/10, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:

From: Bruce Dubbs <bruce.dubbs at gmail.com>
Subject: Re: 5.5 GCC-4.5.1 - Pass 1 - c99 mode compilation error - openSUSE (host)
To: gnu2007-lfs at yahoo.co.in
Date: Tuesday, 16 November, 2010, 10:08 PM

gnu2007-lfs at yahoo.co.in wrote:

> My Gcc tar ball is gcc-4.5.1.tar.bz2, i used 'tar -jxf
gcc-4.5.1.tar.bz2', to extract it.And, I have made sure that mpc, gmp,
mpfr are extracted in the gcc-4.5.1 source folder and not in gcc-build
folder. If it was messed up it would show up at configure time, but
configure was successful. I am getting this error while executing 'make'

That seems right.

> I used the host system requirement script provided in LFS book, and
> it  turned out OK.

The packages seem OK.

>> Sun, 14/11/10, gnu2007-lfs at yahoo.co.in <gnu2007-lfs at yahoo.co.in>
>> wrote:
>> From: gnu2007-lfs at yahoo.co.in <gnu2007-lfs at yahoo.co.in> Subject: 5.5
>> GCC-4.5.1 - Pass 1 - c99 mode compilation error - openSUSE (host) To:
>> lfs-support at linuxfromscratch.org Date: Sunday, 14 November, 2010,
>> 7:26 PM
>> Can anyone please suggest any fix for the following compilation
>> error. I am at the 5.5 GCC-4.5.1 Pass 1 section of LFS book. Host is
>> openSUSE 11.3 

>> gcc -DHAVE_CONFIG_H -I. -I../../gcc-4.5.1/mpc  -DNDEBUG
>> -Wall -Wextra -Wno-deprecated-declarations -Wmissing-prototypes
>> -Wdeclaration-after-statement -Wshadow -Wpointer-arith
>> -Wstrict-prototypes -Wcast-qual -Wwrite-strings -g -O2 -MT
>> src_mpc-main.o -MD -MP -MF .deps/src_mpc-main.Tpo -c -o
>> src_mpc-main.o `test -f 'src/main.c' || echo '../../gcc-4.5.1/mpc/'`
>> src/main.c ../../gcc-4.5.1/mpc/src/main.c:

I'm at a loss here.  In my reference build logs, there is no reference to 'src_mpc' at all.  About the only thing I can say is to check the md5sum of all the packages.  If they are OK, then there is something wrong with the setup.

You may want to try jhalfs which automates the book's commands.

  -- Bruce

>> In function 'find_command':
>> ../../gcc-4.5.1/mpc/src/main.c:199:2: error:
>> 'for' loop initial declarations are only allowed in C99 mode ../../gcc-4.5.1/mpc/src/main.c:199:2: note: use option -std=c99 or
>> -std=gnu99 to compile your code 
>> make[3]: *** [src_mpc-main.o] Error 1
>> make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc' 
>> make[2]: *** [all] Error 2
>> make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc'
>> make[1]: *** [all-mpc] Error 2 
>> make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
>> make: *** [all] Error 2

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20101117/5fae10a3/attachment.html>

More information about the lfs-support mailing list