Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297972 - sys-libs/glibc-2.9_p20081201-r2 fails to compile
Summary: sys-libs/glibc-2.9_p20081201-r2 fails to compile
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-22 21:19 UTC by Mike Nerone
Modified: 2010-02-03 07:58 UTC (History)
1 user (show)

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


Attachments
Full build.log (build.log,16.23 KB, text/plain)
2009-12-29 21:03 UTC, Mike Nerone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Nerone 2009-12-22 21:19:39 UTC
I've been trying to figure this out for days with no luck. First off, I need to point out that this is happening in an amd64 Xen guest provided by slicehost. When attempting to build sys-libs/glibc-2.9_p20081201-r2, during ./configure, the following error occurs:

======================================================
<SNIP>
checking for unistd.h... yes
checking for long double... yes
checking size of long double... configure: error: cannot compute sizeof (long double)
See `config.log' for more details.
 *
 * ERROR: sys-libs/glibc-2.9_p20081201-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3747:  Called eblit-run 'src_compile'
 *             environment, line 1217:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  199:  Called src_compile
 *             environment, line 3747:  Called eblit-run 'src_compile'
 *             environment, line 1217:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  207:  Called toolchain-glibc_src_compile
 *       src_compile.eblit, line  121:  Called glibc_do_configure 'nptl'
 *       src_compile.eblit, line   98:  Called die
 * The specific snippet of code:
 *      "${S}"/configure ${myconf} || die "failed to configure glibc"
 *  The die message:
 *   failed to configure glibc
======================================================

config.log shows that sizeof causes a segmentation fault:

======================================================
<SNIP>
configure:7912: checking for long double
configure:7942: x86_64-pc-linux-gnu-gcc -c -O2 -fno-strict-aliasing -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE conftest.c >&5
configure:7948: $? = 0
configure:7963: result: yes
configure:7970: checking size of long double
configure:8272: x86_64-pc-linux-gnu-gcc -o conftest -O2 -fno-strict-aliasing -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -Wl,-O1 c
onftest.c  >&5
configure:8275: $? = 0
configure:8281: ./conftest
/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/glibc-2.9-20081201/configure: line 8282:  3721 Segmentation fault      ./conftest$ac_exeext
configure:8284: $? = 139
configure: program exited with status 139
<SNIP>
======================================================

A recent change is upgrading from kernel 2.6.24 to 2.6.31. Boot images are provided by slicehost, so the running kernel is not Gentoo compiled, but I don't see why the running kernel would affect compilation.

BTW, I'm also getting a different error when attempting to rebuild gcc-4.3.4. I don't know if it's related, so I won't add the clutter here unless someone thinks it might be.

=================================================================               # emerge --info
Portage 2.1.6.13 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31.6-rscloud x86_64)
=================================================================                                      
System uname: Linux-2.6.31.6-rscloud-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2350_HE-with-gentoo-1.12.13
Timestamp of tree: Tue, 22 Dec 2009 18:30:01 +0000                                                         
app-shells/bash:     4.0_p35                                                                               
dev-lang/python:     2.6.4                                                                                 
dev-python/pycrypto: 2.1.0_beta1                                                                           
sys-apps/baselayout: 1.12.13                                                                               
sys-apps/sandbox:    1.6-r2                                                                                
sys-devel/autoconf:  2.63-r1                                                                               
sys-devel/automake:  1.10.2                                                                                
sys-devel/binutils:  2.18-r3                                                                               
sys-devel/gcc-config: 1.4.1                                                                                
sys-devel/libtool:   2.2.6b                                                                                
virtual/os-headers:  2.6.23-r3                                                                             
ACCEPT_KEYWORDS="amd64"                                                                                    
CBUILD="x86_64-pc-linux-gnu"                                                                               
CFLAGS="-march=barcelona -O2 -pipe"                                                                        
CHOST="x86_64-pc-linux-gnu"                                                                                
CONFIG_PROTECT="/etc"                                                                                      
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=barcelona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --with-bdeps y"
FEATURES="buildpkg collision-protect distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv userpriv_fakeroot usersandbox verify-rdepend"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude /profiles/updates/1Q-1970"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/nerone /usr/local/portage/layman/xen"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="a52 aac acl amd64 amr bash-completion branding bzip2 cli cracklib crypt curl cxx dri encode expat faac faad ffmpeg flash ftp gd gif glib gmp gnutls hardened headless iconv idn imagemagick imap innodb ithreads jpeg lame mcal memlimit mmap mmx mmx2 mmxext modules mp4 mudflap multilib mysql ncurses netpbm network-cron nls nntp nptl nptlonly ogg openfire pam pch pcre php pic pie png postgres pppd python readline reflection sasl session slice spell spl sse sse2 sse4a ssl subversion symlink sysfs syslog taglib threads threadsafe tiff truetype unicode vhosts vim-syntax webdav wps x264 xattr xcb xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="alias auth_basic authn_alias authn_default authn_file authz_default authz_groupfile authz_host authz_user autoindex dav dav_fs dir env include info log_config mime mime_magic negotiation proxy proxy_http rewrite setenvif status unique_id" APACHE2_MPMS="event" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
=================================================================
Comment 1 Mike Nerone 2009-12-22 22:07:41 UTC
Oh, and let me anticipate some questions based on other somewhat similar bug reports I've seen:

1. 32-bit support is in the kernel:

# zcat /proc/config.gz | grep IA32
CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT=y

2. The system has always been multi-lib, and never used a no-multilib profile. It was originally built with default/linux/amd64/2008.0 and only switched to default/linux/amd64/10.0 when 2008.0 became deprecated.

3. I've never crazy and manually removed toolchain binaries or libraries as others have.

4. All of the expected lib dirs are present:

# ls -ld {/usr,}/lib{32,64,}
lrwxrwxrwx  1 root root     5 2009-10-02 20:39 /lib -> lib64
drwxr-xr-x  2 root root  4096 2009-12-16 10:56 /lib32
drwxr-xr-x  6 root root  4096 2009-12-16 12:31 /lib64
lrwxrwxrwx  1 root root     5 2009-10-02 20:40 /usr/lib -> lib64
drwxr-xr-x  4 root root  4096 2009-12-16 11:08 /usr/lib32
drwxr-xr-x 30 root root 20480 2009-12-22 04:58 /usr/lib64

5. ...and they *seem* properly populated to me, but I'm no expert:

# ls {/usr,}/lib{32,64}
/lib32:
ld-2.9.so               libcidn.so.1     libmemusage.so        libnss_files-2.9.so    libpcprofile.so    libthread_db-1.0.so
ld-linux.so.2           libcrypt-2.9.so  libm.so.6             libnss_files.so.2      libpthread-2.9.so  libthread_db.so.1
libanl-2.9.so           libcrypt.so.1    libnsl-2.9.so         libnss_hesiod-2.9.so   libpthread.so.0    libutil-2.9.so
libanl.so.1             libc.so.6        libnsl.so.1           libnss_hesiod.so.2     libresolv-2.9.so   libutil.so.1
libBrokenLocale-2.9.so  libdl-2.9.so     libnss_compat-2.9.so  libnss_nis-2.9.so      libresolv.so.2
libBrokenLocale.so.1    libdl.so.2       libnss_compat.so.2    libnss_nisplus-2.9.so  librt-2.9.so
libc-2.9.so             libgcc_s.so.1    libnss_dns-2.9.so     libnss_nisplus.so.2    librt.so.1
libcidn-2.9.so          libm-2.9.so      libnss_dns.so.2       libnss_nis.so.2        libSegFault.so

/lib64:
cpp                     libbz2.so.1.0      libext2fs.so.2        libnss_dns-2.9.so      libpam.so           libss.so.2.0
ld-2.9.so               libbz2.so.1.0.5    libext2fs.so.2.4      libnss_dns.so.2        libpam.so.0         libthread_db-1.0.so
ld-linux.so.2           libc-2.9.so        libgcc_s.so.1         libnss_files-2.9.so    libpam.so.0.82.1    libthread_db.so.1
ld-linux-x86-64.so.2    libcidn-2.9.so     libhistory.so.6       libnss_files.so.2      libpcprofile.so     libudev.so.0
libacl.so               libcidn.so.1       libhistory.so.6.0     libnss_hesiod-2.9.so   libpcre.so.0        libudev.so.0.5.0
libacl.so.1             libcom_err.so.2    libm-2.9.so           libnss_hesiod.so.2     libpcre.so.0.0.1    libusb-0.1.so.4
libacl.so.1.1.0         libcom_err.so.2.1  libmemusage.so        libnss_ldap-2.9.so     libproc-3.2.8.so    libusb-0.1.so.4.4.4
libanl-2.9.so           libcrack.so.2      libm.so.6             libnss_ldap.so.2       libproc.so          libutil-2.9.so
libanl.so.1             libcrack.so.2.8.0  libncurses.so         libnss_nis-2.9.so      libpthread-2.9.so   libutil.so.1
libattr.so              libcrypt-2.9.so    libncurses.so.5       libnss_nisplus-2.9.so  libpthread.so.0     libuuid.so.1
libattr.so.1            libcrypt.so.1      libncurses.so.5.6     libnss_nisplus.so.2    libreadline.so.6    libuuid.so.1.3.0
libattr.so.1.1.0        libc.so.6          libncursesw.so        libnss_nis.so.2        libreadline.so.6.0  libz.so
libblkid.so.1           libcurses.so       libncursesw.so.5      libpamc.so             libresolv-2.9.so    libz.so.1
libblkid.so.1.1.0       libcursesw.so      libncursesw.so.5.6    libpamc.so.0           libresolv.so.2      libz.so.1.2.3
libBrokenLocale-2.9.so  libdl-2.9.so       libnsl-2.9.so         libpamc.so.0.82.1      librt-2.9.so        modules
libBrokenLocale.so.1    libdl.so.2         libnsl.so.1           libpam_misc.so         librt.so.1          rcscripts
libbz2.so               libe2p.so.2        libnss_compat-2.9.so  libpam_misc.so.0       libSegFault.so      security
libbz2.so.1             libe2p.so.2.3      libnss_compat.so.2    libpam_misc.so.0.82.0  libss.so.2          udev

/usr/lib32:
crt1.o      libBrokenLocale.a    libc_nonshared.a  libdl.so     libnsl_g.a         libpthread.a            librpcsvc_g.a    libutil_g.a
crti.o      libBrokenLocale_g.a  libcrypt.a        libg.a       libnsl.so          libpthread_g.a          librt.a          libutil.so
crtn.o      libBrokenLocale.so   libcrypt_g.a      libieee.a    libnss_compat.so   libpthread_nonshared.a  librt_g.a        locale
gconv       libbsd.a             libcrypt.so       libm.a       libnss_dns.so      libpthread.so           librt.so         Mcrt1.o
gcrt1.o     libbsd-compat.a      libc.so           libmcheck.a  libnss_files.so    libresolv.a             libsandbox.la    misc
libanl.a    libc.a               libc_stubs.a      libm_g.a     libnss_hesiod.so   libresolv_g.a           libsandbox.so    Scrt1.o
libanl_g.a  libc_g.a             libdl.a           libm.so      libnss_nisplus.so  libresolv.so            libthread_db.so
libanl.so   libcidn.so           libdl_g.a         libnsl.a     libnss_nis.so      librpcsvc.a             libutil.a

/usr/lib64:
apr-util-1             libexpat.a                     libgudev-1.0.la             libnss_compat.so          libsvn_fs_fs-1.so.0
binutils               libexpat.la                    libgudev-1.0.so             libnss_dns.so             libsvn_fs_fs-1.so.0.0.0
ConsoleKit             libexpat.so                    libgudev-1.0.so.0           libnss_files.so           libsvn_fs_util-1.a
coreutils              libexpat.so.1                  libgudev-1.0.so.0.0.1       libnss_hesiod.so          libsvn_fs_util-1.la
cracklib_dict.hwm      libexpat.so.1.5.2              libheap.so                  libnss_ldap.so.2          libsvn_fs_util-1.so
cracklib_dict.pwd      libext2fs.a                    libheap.so.0                libnss_nisplus.so         libsvn_fs_util-1.so.0
cracklib_dict.pwi      libext2fs.so                   libheap.so.0.0              libnss_nis.so             libsvn_fs_util-1.so.0.0.0
<BIG SNIP>
libecpg.so             libgpg-error.so.0.5.0          libneon.so                  libsvn_fs-1.so            terminfo
libevtlog.a            libgthread-2.0.a               libneon.so.27               libsvn_fs-1.so.0          vlock
libevtlog.la           libgthread-2.0.la              libneon.so.27.2.0           libsvn_fs-1.so.0.0.0      xml2Conf.sh
libevtlog.so           libgthread-2.0.so              libnsl.a                    libsvn_fs_fs-1.a
libevtlog.so.0         libgthread-2.0.so.0            libnsl_g.a                  libsvn_fs_fs-1.la
libevtlog.so.0.0.0     libgthread-2.0.so.0.2000.5     libnsl.so                   libsvn_fs_fs-1.so
Comment 2 SpanKY gentoo-dev 2009-12-29 07:03:13 UTC
post the entire build log as an attachment

make sure a simple 32bit app works:
echo 'main(){return 0;}' > test.c
gcc -m32 test.c
./a.out
Comment 3 Mike Nerone 2009-12-29 21:03:48 UTC
Created attachment 214574 [details]
Full build.log

Simple 32-bit program works (no error output):

==================================
~/tmp # echo 'main(){return 0;}' > test.c; gcc -m32 test.c; ./a.out
~/tmp #
==================================
Comment 4 Mike Nerone 2010-01-09 23:02:26 UTC
BTW, if I try to compile glibc-2.10.1-r1, it gets past the configure without erroring, but determines the size of a long double to be 0, which is obviously incorrect unless some truly amazing compression is at work. :P

Any thoughts on this, yet?
Comment 5 SpanKY gentoo-dev 2010-01-11 09:14:56 UTC
sadly, you've seem to have covered all the basics and based on the output, there shouldnt be anything wrong

you can try things like FEATURES="-sandbox -userpriv -usersandbox", or go into the build dir and run configure yourself:
CFLAGS='-O2 -m32' ../glibc-*/configure <add all the flags from the log>

and see if that fails too
Comment 6 Mike Nerone 2010-01-14 07:16:52 UTC
Those attempts result in the same failure. Note: now that 2.10-r1 is stable, the failure I see is a zero result for the size of a long double. BTW, if I use CFLAGS='-O2 -m64', it works. Does that provide a hint in any way?
Comment 7 Mike Nerone 2010-02-02 07:30:35 UTC
So I ended up just kicking a new slice, and it does not exhibit the problem. I can only speculate as to what the cause of the issue was. For one thing, at the time I created the original slice, the Gentoo image they had was built from 2008.0 media, while the new slice started off the the newly-available 10.0 installation. That alone could account for the problem. It's also *possible* (again, pure conjecture here) that slicehost themselves had made a mistake when building the original 2008.0 image, perhaps inadvertently switching profiles between no-multilib and multilib. This possibility hadn't occurred to me previously, but I actually kinda doubt that this was the case, because they have been technical wizards in every other way.

Feel free to close this bug with whatever status you see fit.
Comment 8 SpanKY gentoo-dev 2010-02-03 07:58:23 UTC
it's a crappy situation to debug at any rate ...