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
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
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: ---

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

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:

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:
 *     , 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:

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

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 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, x86_64)
System uname: Linux-
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                                                                             
CFLAGS="-march=barcelona -O2 -pipe"                                                                        
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"
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"
LINGUAS="en en_US"
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"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/nerone /usr/local/portage/layman/xen"
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"
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

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}

cpp                                                     modules           rcscripts           security             udev

crt1.o      libBrokenLocale.a    libc_nonshared.a     libnsl_g.a         libpthread.a            librpcsvc_g.a    libutil_g.a
crti.o      libBrokenLocale_g.a  libcrypt.a        libg.a          libpthread_g.a          librt.a
crtn.o   libcrypt_g.a      libieee.a   libpthread_nonshared.a  librt_g.a        locale
gconv       libbsd.a          libm.a          Mcrt1.o
gcrt1.o     libbsd-compat.a           libmcheck.a    libresolv.a       misc
libanl.a    libc.a               libc_stubs.a      libm_g.a   libresolv_g.a     Scrt1.o
libanl_g.a  libc_g.a             libdl.a              libdl_g.a         libnsl.a      librpcsvc.a             libutil.a

apr-util-1             libexpat.a              
ConsoleKit                         libsvn_fs_util-1.a
cracklib_dict.pwd      libext2fs.a                
<BIG SNIP>                       terminfo
libevtlog.a            libgthread-2.0.a                    vlock                     libnsl.a                    libsvn_fs_fs-1.a            libnsl_g.a                 
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
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 ...