Bug 56752

Summary: GCC fails to bootstrap on Debian GNU/Linux 7.0 (wheezy) when 32-bit libraries aren't installed
Product: gcc Reporter: David Starner <prosfilaes>
Component: bootstrapAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gerald
Priority: P3 Keywords: documentation
Version: 4.8.0   
Target Milestone: 4.9.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2013-03-27 00:00:00
Attachments: Last lines of compilation

Description David Starner 2013-03-27 10:32:47 UTC
Created attachment 29737 [details]
Last lines of compilation

I ran CC=gcc-4.6 ../gcc-4.8.0/configure --prefix=/home/prosfilaes/bin/gcc-4.8.0/ --enable-languages=ada,c,c++,java,fortran
and then
make bootstrap
It fails with 
In file included from /usr/include/stdio.h:28:0,
                 from ../../../../gcc-4.8.0/libgcc/../gcc/tsystem.h:87,
                 from ../../../../gcc-4.8.0/libgcc/libgcc2.c:27:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
 #include <bits/predefs.h>
                          ^
compilation terminated.
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory `/home/prosfilaes/Program_Source/gcc-480-objdir/x86_64-unknown-linux-gnu/32/libgcc'
(fuller log attached)
Poking at it, this seems to be telling me that I don't have a 32-bit development package installed, which is true, but shouldn't it stop at configure and tell me that instead of erring out in the middle of compilation with an unhelpful error message?
Comment 1 Richard Biener 2013-03-27 10:42:24 UTC
No, that's the way it always has been.
Comment 2 David Starner 2013-03-27 10:55:02 UTC
I don't understand how "that's the way it always has been" is an answer. If there's a library missing (especially one the installation instructions don't mention), it should tell you that, not fail in the middle with an obscure error message. That it has done in it in the past doesn't justify the behavior.
Comment 3 Jonathan Wakely 2013-03-27 11:00:16 UTC
How do you propose to check that?

You might not have a 32-bit compiler with which to test those headers during configuration, so it's not easy to test them until after we've bootstrapped a multilib compiler.
Comment 4 Jonathan Wakely 2013-03-27 11:08:20 UTC
Also this is nothing to do with x32, which is a different ABI, you just mean 32-bit.

Confirming as a dcoumentation bug, http://gcc.gnu.org/install/specific.html#x86-64-x-x could mention that building a bi-arch compiler requires both 32-bit and 64-bit libc
Comment 5 David Starner 2013-03-29 10:00:04 UTC
You could check that right after building the multilib compiler before trying to compile real code. That would at least give an error message that said what was wrong, instead of one that's opaque to the causal installer.
Comment 6 Andrew Pinski 2021-07-19 06:10:32 UTC
Been fixed since r0-127201 .
Comment 7 Andrew Pinski 2021-07-19 06:12:40 UTC
*** Bug 54444 has been marked as a duplicate of this bug. ***