Dhruv Matani | 26 Jul 2012 02:06
Picon
Gravatar

Trouble building latest svn head

Command used to build gcc: ../gcc/configure --enable-languages=c,c++
--prefix=/opt/gcc-latest; make

I get the following error:

make[4]: Leaving directory
`/home/dhruvbird/projects/gcc-build/i686-pc-linux-gnu/libgcc'
DEFINES='' HEADERS='../../../gcc/libgcc/config/i386/value-unwind.h' \
		../../../gcc/libgcc/mkheader.sh > tmp-libgcc_tm.h
/bin/bash ../../../gcc/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
echo timestamp > libgcc_tm.stamp
/home/dhruvbird/projects/gcc-build/./gcc/xgcc
-B/home/dhruvbird/projects/gcc-build/./gcc/
-B/opt/gcc-latest/i686-pc-linux-gnu/bin/
-B/opt/gcc-latest/i686-pc-linux-gnu/lib/ -isystem
/opt/gcc-latest/i686-pc-linux-gnu/include -isystem
/opt/gcc-latest/i686-pc-linux-gnu/sys-include    -g -O2 -O2  -g -O2
-DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include
-fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic
-I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/.
-I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include
-I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
-DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF
_muldi3.dep -DL_muldi3 -c ../../../gcc/libgcc/libgcc2.c
-fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/stdio.h:28:0,
                 from ../../../gcc/libgcc/../gcc/tsystem.h:88,
                 from ../../../gcc/libgcc/libgcc2.c:29:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such
(Continue reading)

Ian Lance Taylor | 26 Jul 2012 02:09
Picon
Favicon
Gravatar

Re: Trouble building latest svn head

On Wed, Jul 25, 2012 at 5:06 PM, Dhruv Matani <dhruvbird <at> gmail.com> wrote:
> Command used to build gcc: ../gcc/configure --enable-languages=c,c++
> --prefix=/opt/gcc-latest; make
>
> I get the following error:
>
> make[4]: Leaving directory
> `/home/dhruvbird/projects/gcc-build/i686-pc-linux-gnu/libgcc'
> DEFINES='' HEADERS='../../../gcc/libgcc/config/i386/value-unwind.h' \
>                 ../../../gcc/libgcc/mkheader.sh > tmp-libgcc_tm.h
> /bin/bash ../../../gcc/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
> echo timestamp > libgcc_tm.stamp
> /home/dhruvbird/projects/gcc-build/./gcc/xgcc
> -B/home/dhruvbird/projects/gcc-build/./gcc/
> -B/opt/gcc-latest/i686-pc-linux-gnu/bin/
> -B/opt/gcc-latest/i686-pc-linux-gnu/lib/ -isystem
> /opt/gcc-latest/i686-pc-linux-gnu/include -isystem
> /opt/gcc-latest/i686-pc-linux-gnu/sys-include    -g -O2 -O2  -g -O2
> -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition  -isystem ./include
> -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic
> -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/.
> -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include
> -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
> -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF
> _muldi3.dep -DL_muldi3 -c ../../../gcc/libgcc/libgcc2.c
> -fvisibility=hidden -DHIDE_EXPORTS
> In file included from /usr/include/stdio.h:28:0,
>                  from ../../../gcc/libgcc/../gcc/tsystem.h:88,
>                  from ../../../gcc/libgcc/libgcc2.c:29:
(Continue reading)

Dhruv Matani | 26 Jul 2012 02:37
Picon
Gravatar

Re: Trouble building latest svn head

Hello Ian,

On Wed, Jul 25, 2012 at 5:09 PM, Ian Lance Taylor <iant <at> google.com> wrote:

> This appears to be a problem with your C library.  On your system
> /usr/include/features.h does #include <bits/predefs.h>, but
> bits/predefs.h does not exist.  There isn't much GCC can do to help
> there.
>
> If you look at /usr/include/features.h you may find some other ideas.

It seems that predefs.h does exist, but it resides at:
/usr/include/i386-linux-gnu/bits/ and not /usr/include/bits/

Is there some hack that I can do (set some env. vars. maybe) to let
gcc search that path as well for includes?

Ian Lance Taylor | 26 Jul 2012 04:16
Picon
Favicon
Gravatar

Re: Trouble building latest svn head

On Wed, Jul 25, 2012 at 5:37 PM, Dhruv Matani <dhruvbird <at> gmail.com> wrote:
> Hello Ian,
>
> On Wed, Jul 25, 2012 at 5:09 PM, Ian Lance Taylor <iant <at> google.com> wrote:
>
>> This appears to be a problem with your C library.  On your system
>> /usr/include/features.h does #include <bits/predefs.h>, but
>> bits/predefs.h does not exist.  There isn't much GCC can do to help
>> there.
>>
>> If you look at /usr/include/features.h you may find some other ideas.
>
> It seems that predefs.h does exist, but it resides at:
> /usr/include/i386-linux-gnu/bits/ and not /usr/include/bits/
>
> Is there some hack that I can do (set some env. vars. maybe) to let
> gcc search that path as well for includes?

Oh, sorry, you are running a new version of Debian or Ubuntu.  They
choose to move header files and libraries around in a way that breaks
all existing GCC release.  Please complain to them.

In the meantime, setting these environment variables may help:

LIBRARY_PATH=/usr/lib/i386-linux-gnu
C_INCLUDE_PATH=/usr/include/i386-linux-gnu
CPLUS_INCLUDE_PATH=/usr/include/i386-linux-gnu

Ian

(Continue reading)

Dhruv Matani | 26 Jul 2012 06:04
Picon
Gravatar

Re: Trouble building latest svn head

On Wed, Jul 25, 2012 at 7:16 PM, Ian Lance Taylor <iant <at> google.com> wrote:
> On Wed, Jul 25, 2012 at 5:37 PM, Dhruv Matani <dhruvbird <at> gmail.com> wrote:
>> Hello Ian,
>>
>> On Wed, Jul 25, 2012 at 5:09 PM, Ian Lance Taylor <iant <at> google.com> wrote:
>>
>>> This appears to be a problem with your C library.  On your system
>>> /usr/include/features.h does #include <bits/predefs.h>, but
>>> bits/predefs.h does not exist.  There isn't much GCC can do to help
>>> there.

yes, I'm in ubuntu 12.04.

>>>
>>> If you look at /usr/include/features.h you may find some other ideas.
>>
>> It seems that predefs.h does exist, but it resides at:
>> /usr/include/i386-linux-gnu/bits/ and not /usr/include/bits/
>>
>> Is there some hack that I can do (set some env. vars. maybe) to let
>> gcc search that path as well for includes?
>
> Oh, sorry, you are running a new version of Debian or Ubuntu.  They
> choose to move header files and libraries around in a way that breaks
> all existing GCC release.  Please complain to them.
>
> In the meantime, setting these environment variables may help:
>
> LIBRARY_PATH=/usr/lib/i386-linux-gnu
> C_INCLUDE_PATH=/usr/include/i386-linux-gnu
(Continue reading)

Ian Lance Taylor | 26 Jul 2012 07:36
Picon
Favicon
Gravatar

Re: Trouble building latest svn head

On Wed, Jul 25, 2012 at 9:04 PM, Dhruv Matani <dhruvbird <at> gmail.com> wrote:
>
> Thanks! This worked. I've come a long way - and since, the stage 2 & 3
> comparison is failing for me.
>
> Comparing stages 2 and 3
> warning: gcc/cc1plus-checksum.o differs
> warning: gcc/cc1-checksum.o differs
> Bootstrap comparison failure!
> gcc/gcc.o differs
> gcc/plugin.o differs

A typical cause for this is that you started a build, and the build
failed after starting stage 2, and you restarted the build in the same
build directory, and rebuilding stage 2 caused the gcc/configure
script to be run again.

Ian


Gmane