Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78109 - sys-devel/gcc-3.4.3 configure error: cannot run C compiled programs
Summary: sys-devel/gcc-3.4.3 configure error: cannot run C compiled programs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 All
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-15 10:26 UTC by Hans-Christian Armingeon
Modified: 2005-01-16 01:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config log from /var/tmp/portage/gcc-3.4.3/work/build/ (config.log,1.74 KB, text/x-log)
2005-01-16 00:28 UTC, Hans-Christian Armingeon
Details
config log from /var/tmp/portage/gcc-3.4.3/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/ (config.log,13.19 KB, text/x-log)
2005-01-16 00:34 UTC, Hans-Christian Armingeon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Christian Armingeon 2005-01-15 10:26:07 UTC
checking for sys/resource.h... yes
checking for testsuite resource limits support... yes
checking for setenv declaration... yes
checking for setenv... yes
updating cache ./config.cache
checking for gxx-include-dir... /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3
checking for --enable-version-specific-runtime-libs... yes
checking for install location... /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating libmath/Makefile
config.status: creating libsupc++/Makefile
config.status: creating src/Makefile
config.status: creating po/Makefile
config.status: creating testsuite/Makefile
config.status: creating scripts/check_survey
config.status: creating scripts/testsuite_flags
config.status: creating config.h
config.status: executing default-1 commands
Adding multilib support to Makefile in /var/tmp/portage/gcc-3.4.3/work/gcc-3.4.3/libstdc++-v3
multidirs=32
with_multisubdir=
Running configure in multilib subdirs 32
pwd: /var/tmp/portage/gcc-3.4.3/work/build/x86_64-pc-linux-gnu/libstdc++-v3
Running configure in multilib subdir 32
pwd: /var/tmp/portage/gcc-3.4.3/work/build/x86_64-pc-linux-gnu
mkdir 32
configure: creating cache ./config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.3/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-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: *** [configure-target-libstdc++-v3] Error 1

!!! ERROR: sys-devel/gcc-3.4.3 failed.
!!! Function gcc_do_make, Line 1047, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

I think that this issue is multilib related. But that's all I can say. I'm not an gcc expert.


Johnny


Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r9 x86_64 AMD Opteron(tm) Processor 242
Gentoo Base System version 1.4.16
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/fax /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp6.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 apache2 arts berkdb bitmap-fonts cdr crypt cscope cups dvd dvdr emul-linux-x86 esd extensions f77 fam flac font-server foomaticdb fortran gd gdbm gif gphoto2 gpm gtk imap imlib ipv6 java jp2 jpeg jpeg2k junit kde kerberos ldap libclamav libwww lm_sensors lzw lzw-tiff maildir mailwrapper mbox memlimit mikmod motif multilib mysql ncurses nls oav obdc objc odbc oggvorbis opengl oss pam pdflib perl png pnp postgres povray ppds prelude python qt quotas readline samba sasl scanner sdl slang slp snmp socks5 sqlite ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales winbind wmf xinerama xml2 xmms xpm xrandr xv zlib"
Comment 1 SpanKY gentoo-dev 2005-01-15 16:34:07 UTC
you'll have to attach some config.log's from the build dir
Comment 2 Hans-Christian Armingeon 2005-01-16 00:26:36 UTC
What config logs do you want?
Comment 3 Hans-Christian Armingeon 2005-01-16 00:28:03 UTC
Created attachment 48631 [details]
config log from /var/tmp/portage/gcc-3.4.3/work/build/
Comment 4 Hans-Christian Armingeon 2005-01-16 00:34:43 UTC
Created attachment 48632 [details]
config log from /var/tmp/portage/gcc-3.4.3/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/
Comment 5 Hans-Christian Armingeon 2005-01-16 00:36:38 UTC
Hi,

i think, I found the interesting part:

configure:2357: $? = 0
configure:2359: /var/tmp/portage/gcc-3.4.3/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32 -v </dev/null >&5
Reading specs from /var/tmp/portage/gcc-3.4.3/work/build/gcc/specs
Configured with: /var/tmp/portage/gcc-3.4.3/work/gcc-3.4.3/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3 --host=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-shared --enable-threads=posix --disable-libgcj --enable-languages=c,c++,f77,objc
Thread model: posix
gcc version 3.4.3  (Gentoo Linux 3.4.3, ssp-3.4.3-0, pie-8.7.6.6)
configure:2362: $? = 0
configure:2364: /var/tmp/portage/gcc-3.4.3/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32 -V </dev/null >&5
xgcc: `-V' must come at the start of the command line
configure:2367: $? = 1
configure:2390: checking for C compiler default output file name
configure:2393: /var/tmp/portage/gcc-3.4.3/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32 -O2 -O2 -O2 -O2  conftest.c  >&5
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: warning: i386:x86-64 architecture of input file `/usr/lib/../lib/crt1.o' is incompatible with i386 output
/usr/x86_64-pc-linux-gnu/bin/ld: warning: i386:x86-64 architecture of input file `/usr/lib/../lib/crti.o' is incompatible with i386 output
/usr/x86_64-pc-linux-gnu/bin/ld: warning: i386:x86-64 architecture of input file `/usr/lib/../lib/crtn.o' is incompatible with i386 output
configure:2396: $? = 0
configure:2442: result: a.out
configure:2447: checking whether the C compiler works
configure:2453: ./a.out
./a.out: error while loading shared libraries: /lib/libsandbox.so: cannot open shared object file: No such file or directory
configure:2456: $? = 127
configure:2465: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-16 00:43:43 UTC
god, this looks like another hellish bad multilib bug...

ok... so why is it looking in /lib for your 32bit libc?  Can you do the following:
# gcc -print-multi-directory
# gcc -print-multi-os-directory
# gcc -m32 -print-multi-directory
# gcc -m32 -print-multi-os-directory
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-16 00:47:39 UTC
As gcc is unpacking, there is an einfo line that says 'updating multilib directories to be: ...' what is the ...?
Comment 8 Hans-Christian Armingeon 2005-01-16 00:54:41 UTC
root # gcc -print-multi-directory
.
root # gcc -print-multi-os-directory
../lib64
root # gcc -m32 -print-multi-directory
32
root # gcc -m32 -print-multi-os-directory
../lib32


I am currently rebuilding gcc, and logging the complete output.
Comment 9 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-16 01:01:19 UTC
Ok, I see the problem... it's actually in finding sandbox '/lib/libsandbox.so' implies that you don't have a smart multilib sandbox as it should always be 'libsandbox.so' on amd64 (no explicit directory location).

Use FEATURES=-sandbox emerge -v gcc, and youu should be fine.  They re-emerge portage as well to make sure it doesn't happen again.

I added a check for this in toolchain.eclass, so closing now.  Thanks.
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-16 01:22:12 UTC
Actually, that was just ONE of your problems... the other seems to stem from the fact that $(tc-arch) is returning "wtf"...
Comment 11 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-16 01:31:29 UTC
Ok, fixed now... resync and try again in a few hours.  toolchain.eclass should be version 1.84 and toolchain-funcs 1.25