Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84703 - gcc / portage / etc fail with "cannot run c compiled programs"
Summary: gcc / portage / etc fail with "cannot run c compiled programs"
Status: RESOLVED DUPLICATE of bug 82911
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-09 22:44 UTC by P Nienaber
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description P Nienaber 2005-03-09 22:44:57 UTC
x86_64-pc-linux-gnu-gcc -O1 -pipe -DSB_HAVE_64BIT_ARCH  -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall -c libsandbox.c
In file included from libsandbox.c:78:
localdecls.h:9: error: parse error before '.' token
localdecls.h:9: error: missing terminating " character
make: *** [libsandbox.o] Error 1

!!! ERROR: sys-apps/portage-2.0.51.19 failed.
!!! Function src_compile, Line 70, Exitcode 2


Note that it built fine before I went through most (all but completing emerge -u system, which is currently dying on gcc, hence trying to re-merge portage) of the 2005.0 migration guide.

Reproducible: Always
Steps to Reproduce:
1. emerge portage
2.
3.




Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3,
glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.10-gentoo-r6 x86_64 AMD Opteron(tm) Processor 246
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Sep  1 2004, 23:34:52)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r2, 1.6.3, 1.7.9, 1.4_p6, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r5
sys-devel/libtool:   1.5.10-r2
virtual/os-headers:  2.6.10
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/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/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig distlocks sandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac aalib acpi aim alsa berkdb bitmap-fonts cddb cdr crypt cups
curl dvd dvdr f77 fam fbcon flac font-server foomaticdb fortran gdbm gif
gimpprint gpm gtk gtk2 imagemagick imap imlib java javascript joystick jp2 jpeg
kerberos lzw lzw-tiff mad mikmod mp3 mysql ncurses nptl nptlonly nvidia objc
oggvorbis opengl oss pam pdflib perl png postgres ppds python quicktime readline
real samba sdl slang spell ssl tcltk tcpd threads tiff truetype truetype-fonts
type1-fonts usb userlocales v4l2 xine xml xml2 xmms xpm xprint xrandr xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 P Nienaber 2005-03-10 00:52:18 UTC
from header file:

#define LIBC_VERSION "libc.so.6
libc.so.6"

I'm assuming this is a broken diff file somewhere or something?
Comment 2 P Nienaber 2005-03-10 01:05:12 UTC
More:

Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.51.19 to /
>>> md5 src_uri ;-) portage-2.0.51.19.tar.bz2
>>> Unpacking source...
>>> Unpacking portage-2.0.51.19.tar.bz2 to /var/tmp/portage/portage-2.0.51.19/work
>>> Source unpacked.
rm -f libsandbox.so sandbox
rm -f *.o *~ core
rm -f localdecls.h
./create-localdecls
Checking truncate argument type... off_t
Checking libc version... libc.so.6 libc.so.6

x86_64-pc-linux-gnu-gcc -O1 -pipe -DSB_HAVE_64BIT_ARCH  -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall -c libsandbox.c
In file included from libsandbox.c:78:
localdecls.h:9: error: parse error before '.' token
localdecls.h:9: error: missing terminating " character
make: *** [libsandbox.o] Error 1

!!! ERROR: sys-apps/portage-2.0.51.19 failed.
!!! Function src_compile, Line 70, Exitcode 2
Comment 3 P Nienaber 2005-03-10 01:33:20 UTC
output of `ldd libctest` as found in the create-localdecls script WHEN run via portage:

        libsandbox.so => /emul/linux/x86/lib/libsandbox.so (0x55583000)
        linux-gate.so.1 => (0xffffe000)
        libc.so.6 => not found
        libdl.so.2 => not found
        libc.so.6 => not found


Whereas:

box sandbox-1.1 # gcc -Wall -o libctest libctest.c box sandbox-1.1 # /usr/lib/portage/bin/sandbox
box sandbox-1.1 # ldd libctest
        libsandbox.so => /lib/libsandbox.so (0x0000002a9566c000)
        libc.so.6 => /lib/libc.so.6 (0x0000002a95774000)
        libdl.so.2 => /lib/libdl.so.2 (0x0000002a9599b000)
        /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)


Assuming this is being run 32-bit, then...
Comment 4 P Nienaber 2005-03-10 01:45:49 UTC
Not sure what kind of timestamp-checking mechanisms portage has in place, but the following code provided in the AMD64 2005.0 migration guide strikes me as suspect:

# emerge -v --oneshot '>=sys-libs/glibc-2.3.4.20041102'
# emerge unmerge emul-linux-x86-glibc
Comment 5 P Nienaber 2005-03-10 01:46:59 UTC
From trying to re-merge glibc to fix this:

checking size of long double... configure: error: cannot compute sizeof (long double), 77
See `config.log' for more details.

!!! ERROR: sys-libs/glibc-2.3.4.20050125 failed.
!!! Function glibc_do_configure, Line 782, Exitcode 1
!!! failed to configure glibc

From associated config.log:

configure:7092: checking size of long double
configure:7411: x86_64-pc-linux-gnu-gcc -o conftest -march=k8 -O2 -pipe -O2   conftest.c  >&5
configure:7414: $? = 0
configure:7416: ./conftest
./conftest: error while loading shared libraries: libc.so.6: cannot open shared
object file: No such file or directory
Comment 6 P Nienaber 2005-03-10 02:05:41 UTC
Yay for keeping quickpkg's around.  Here's where it gets somewhat interesting:

using portage-2.0.51.18, I get the above error ONLY when trying to merge .19

using portage-2.0.51.19, I get the above error when trying to merge EITHER .18 or .19
Comment 7 P Nienaber 2005-03-10 02:36:13 UTC
and the winner is:

$ gcc -m32 -o foo test.c
$ ./foo
./foo: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

yet:

box ~ # ls -l /lib32/libc.so.6
lrwxrwxrwx  1 root root 13 Mar  9 21:38 /lib32/libc.so.6 -> libc-2.3.4.so
box ~ # file /lib32/libc-2.3.4.so
/lib32/libc-2.3.4.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
Comment 8 Herbie Hopkins (RETIRED) gentoo-dev 2005-03-10 03:14:47 UTC
Does /etc/env.d/04multilib exist on your system? If not try to re-emerge baselayout.
Comment 9 P Nienaber 2005-03-10 10:28:48 UTC
It wasn't there; re-merging baselayout did create the file.

This appears to have at least allowed me to build portage 2.0.51.19 (using .18).  Will try re-merging it using itself, then I'll have a go at gcc and others.  Thanks!
Comment 10 Herbie Hopkins (RETIRED) gentoo-dev 2005-03-10 10:40:22 UTC
Marking as INVALID since re-emerging baselayout is a step in the 2005.0 upgrade guide. Reopen if you still have probs.
Comment 11 P Nienaber 2005-03-10 11:04:36 UTC
I did that step, though.
Comment 12 Danny van Dyk (RETIRED) gentoo-dev 2005-03-10 15:54:14 UTC
I'll close this as INVALID as well.
From my p.o.v, you didn't _re_merge baselayout or remerged it not in the right
order regarding the upgrade guide.
Comment 13 P Nienaber 2005-03-10 16:05:15 UTC
The merge (and everything else in the [manual, not scripted] migration process) was performed in the exact order specified in the upgrade guide.
Comment 14 Mike Doty (RETIRED) gentoo-dev 2005-03-10 16:19:00 UTC
Everyone-

The discussion can be continued without reopening the bug.  Reopening the bug will make it re-appear in our list and make our jobs harder.  Thanks for your cooperation.
Comment 15 P Nienaber 2005-03-11 20:02:33 UTC
reopening so I can dupe it
Comment 16 P Nienaber 2005-03-11 20:02:42 UTC

*** This bug has been marked as a duplicate of 82911 ***