User account creation filtered due to spam.

Bug 13334

Summary: Bootstrap failure: libiberty/fibheap.c: LONG_MIN undeclared
Product: gcc Reporter: Giovanni Bajo <giovannibajo>
Component: bootstrapAssignee: Andrew Pinski <pinskia>
Severity: normal CC: gcc-bugs, gerald, jackie.rosen, pj
Priority: P2 Keywords: documentation, patch
Version: 3.4.0   
Target Milestone: 4.0.0   
Host: i686-pc-linux-gnu Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu Known to work:
Known to fail: Last reconfirmed: 2004-05-21 20:18:31

Description Giovanni Bajo 2003-12-06 13:56:57 UTC

I see this if I try to bootstrap with --disable-threads:

 /home/rasky/gcc/mainline/out/gcc/xgcc -B/home/rasky/gcc/mainline/out/gcc/ -
B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/bin/ -
B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/lib/ -
isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/include -
isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/sys-include -c -
DHAVE_CONFIG_H -O2 -O2 -fomit-frame-pointer -fstrict-aliasing -march=athlon-
tbird -mcpu=athlon-tbird -DNDEBUG -pipe -I. -
I../../../gcc/libiberty/../include  -W -Wall -Wtraditional -pedantic -
fpic ../../../gcc/libiberty/fibheap.c -o pic/fibheap.o; \
else true; fi
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
../../../gcc/libiberty/fibheap.c: In function `fibheap_delete_node':

../../../gcc/libiberty/fibheap.c:285: error: `LONG_MIN' undeclared (first use 
in this function)
../../../gcc/libiberty/fibheap.c:285: error: (Each undeclared identifier is 
reported only once
../../../gcc/libiberty/fibheap.c:285: error: for each function it appears in.)

rasky@trinity:~/gcc/mainline/out$ /home/rasky/gcc/mainline/out/gcc/xgcc -v
Reading specs from /home/rasky/gcc/mainline/install//lib/gcc/i686-pc-linux-
Configured with: ../gcc/configure --prefix=/home/rasky/gcc/mainline/install/ --
enable-languages=c,c++,java --enable-shared --disable-threads --with-system-
zlib --enable-__cxa_atexit --disable-multilib
Thread model: single
gcc version 3.4 20031206 (experimental)

My binutils *IS* new:
rasky@trinity:~/gcc/mainline/out$ ld -v
GNU ld version 20030820

This bug has been reported a few times, on different systems, without 
satisfatory answers: (powerpc-eabisim) (on the cs-branch) (!)
PR/12708 (which was incorrectly closed as duplicate of this, but the user DID 
have a new binutils).

This system is RH9, btw.
Comment 1 Giovanni Bajo 2003-12-06 13:57:56 UTC
*** Bug 12708 has been marked as a duplicate of this bug. ***
Comment 2 Giovanni Bajo 2003-12-06 13:59:16 UTC
Sorry, I oviously meant that PR12708 is a duplicate of *this* bug, and was 
incorrectly closed as "you need new binutils".
Comment 3 Andrew Pinski 2003-12-06 21:17:18 UTC
Can you provide the preprocessed source file for fibheap.c?
Comment 4 Giovanni Bajo 2003-12-07 01:36:25 UTC
It turned out to be a problem with non-standard CFLAGS/CXXFLAGS set.

I think the website ( does not document 
properly that CFLAGS/CXXFLAGS are used for bootstrap of target components 
(libiberty, v3, libjava, etc.). I think it should be updated to include 
something like:

"Notice that CFLAGS and CXXFLAGS are used during the last part of GCC bootstrap 
(for target libraries like libjava or libstdc++). If bootstrap fails at that 
point, you might try to remove those variables from your environment and try 
again. In this case, remove your builddir and restart from scratch."

The last sentence has been added because I tried a 'make cleanstrap' after 
having removed the flags and it was not sufficient (the makefiles were already 
generated probably). Maybe there is a better and faster to accomplish this.
Comment 5 Andrew Pinski 2003-12-07 01:44:43 UTC
Not web but bootstrap and add documentation keyword.
I will make a patch tommorrow unless someone beats me to it.
Comment 6 Andrew Pinski 2003-12-07 01:55:39 UTC
*** Bug 13330 has been marked as a duplicate of this bug. ***
Comment 7 meapague 2004-01-29 21:37:02 UTC
You're missing kernel-headers, I installed it and solved my problem
Comment 8 Giovanni Bajo 2004-02-19 12:00:59 UTC
Andrew said he was going to take care of this.
Comment 9 Andrew Pinski 2004-05-28 13:19:32 UTC
Patch here: <>.  Hopefully I did not have 
any typos in there.
Comment 10 Giovanni Bajo 2004-06-18 16:19:24 UTC
Gerald, would you please review and possibly approve this patch? Thanks.
Comment 11 Gerald Pfeifer 2004-06-20 15:11:34 UTC
The patch looks fine, Andrew.  I just suggest two minor changes:

+Note that using non-standard @code{CFLAGS} can cause bootstrap to fail in
+@file{libiberty}, if these trigger a warning with the new compiler.  For
+example using @samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will
+cause bootstrap failure as @code{-mcpu=} is deprecated in 3.4.0 and above.
Comment 12 CVS Commits 2004-06-26 20:40:40 UTC
Subject: Bug 13334

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	2004-06-26 20:40:31

Modified files:
	gcc            : ChangeLog 
	gcc/doc        : install.texi 

Log message:
	2004-06-26  Andrew Pinski  <>
	PR 13334
	* doc/install.texi: Document non-standard CFLAGS and bootstrap
	failures and warnings.


Comment 13 Andrew Pinski 2004-06-26 20:42:13 UTC
Fixed, Thanks Gerald for reviewing and sugessting some changes.
Comment 14 Jackie Rosen 2014-02-16 13:17:21 UTC Comment hidden (spam)