Bug 34045 - gcc does not build on Debian etch AMD64
Summary: gcc does not build on Debian etch AMD64
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.2.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-09 19:26 UTC by Laurent Bonnaud
Modified: 2007-11-12 11:28 UTC (History)
2 users (show)

See Also:
Host: x86_64-linux-gnu
Target: x86_64-linux-gnu
Build: x86_64-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Bonnaud 2007-11-09 19:26:28 UTC
Hi,

I tried to compile gcc 4.2.2 from source on Debian etch AMD64 and failed.  I used the system compiler:

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Here is what I did and got in return:

$ ./configure --prefix=/usr/local/gcc-4.2
[No error]
$ make bootstrap
[...]
config.status: executing default-1 commands
Adding multilib support to Makefile in ../.././libmudflap
multidirs=32
with_multisubdir=
Running configure in multilib subdirs 32
pwd: /var/tmp/LB/gcc-4.2.2/x86_64-unknown-linux-gnu/libmudflap
Running configure in multilib subdir 32
pwd: /var/tmp/LB/gcc-4.2.2/x86_64-unknown-linux-gnu
configure: creating cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for --enable-version-specific-runtime-libs... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-unknown-linux-gnu-gcc... /var/tmp/LB/gcc-4.2.2/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/var/tmp/LB/gcc-4.2.2/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/gcc-4.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.2/x86_64-unknown-linux-gnu/sys-include  -m32
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-target-libmudflap] Error 1
make[1]: Leaving directory `/var/tmp/LB/gcc-4.2.2'
make: *** [bootstrap] Error 2
Comment 1 Andrew Pinski 2007-11-09 19:29:29 UTC
What happens if you don't build in the source directory?
Comment 2 Laurent Bonnaud 2007-11-10 08:30:26 UTC
I get exactly the same error:

$ ../gcc-4.2.2/configure --prefix=/usr/local/gcc-4.2
$ make bootstrap
[...]
checking for x86_64-unknown-linux-gnu-gcc... /var/tmp/LB/build/./gcc/xgcc -B/var/tmp/LB/build/./gcc/ -B/usr/local/gcc-4.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.2/x86_64-unknown-linux-gnu/sys-include  -m32
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-target-libmudflap] Error 1
make[1]: Leaving directory `/var/tmp/LB/build'
make: *** [bootstrap] Error 2
Comment 3 Andrew Pinski 2007-11-10 21:28:15 UTC
Use --disable-multilib as you don't have a full install of GNU/Linux glibc on x86_64 which includes the 32bits headers/libraries.
Comment 4 miles 2007-11-11 00:54:00 UTC
Wouldn't it be nice if the configure script caught this sort of thing automatically?

It's obviously going to be a very common problem.
Comment 5 Laurent Bonnaud 2007-11-12 11:28:48 UTC
The --disable-multilib options allowed me to build gcc.  Thank you for the tip!

However, it was my understanding that if "./configure" does not fail, "make bootstrap" should not fail.