Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266862 - php-5.2.8-r2 build fails after upgrade to gcc-4.3.2-r3
Summary: php-5.2.8-r2 build fails after upgrade to gcc-4.3.2-r3
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-20 15:13 UTC by Jan Kohnert
Modified: 2009-05-29 22:15 UTC (History)
1 user (show)

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


Attachments
log from configure while trying to build php (config.log,381.18 KB, text/plain)
2009-04-20 15:22 UTC, Jan Kohnert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kohnert 2009-04-20 15:13:38 UTC
I recently upgraded my server to the last stable gcc version.

After doing so, I followed the gcc-upgrading guide and did:
1. gcc-config i686-pc-linux-gnu-4.3.2
2. env-update
3. source /etc/profile
4. emerge libtool
5. emerge -e system
6. emerge -e world
7. emerge -P gcc

Unfortunately to build hangs in step 6. I'm unable to build php. Doing emerge --resume --skipfirst successfully builds world, but php stays unbuildable. Even doing all the steps twice (just in case I forgot something in the first round) does not resolve the problem.

According to config.log, the configure script fails to resolve tgetent, throwing out a strange libstdc++ error. I will attach the file ASAP.

Here's some output:
# emerge -pv php

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-lang/php-5.2.8-r2  USE="apache2 berkdb bzip2 cli crypt ctype curl gd gdbm gmp iconv imap ipv6 ldap mhash ncurses nls pcre postgres readline reflection session snmp spell spl ssl threads truetype unicode xml zlib -adabas -bcmath -birdstep -calendar -cdb -cgi -cjk -concurrentmodphp -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd-external -hash -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap-sasl -libedit -mcve -msql -mssql -mysql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -soap -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip (-zip-external)" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

# emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-i686-AMD_Sempron-tm-_2600+-with-glibc2.0
Timestamp of tree: Thu, 16 Apr 2009 16:30:03 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/www/secure/htdocs/squirrelmail/config /var/www/secure/htdocs/squirrelmail/plugins/ldapuserdata /var/www/secure/htdocs/squirrelmail/plugins/retrieveuserdata /var/www/secure/htdocs/squirrelmail/plugins/secure_login /var/www/secure/htdocs/squirrelmail/plugins/show_ssl_link"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi apache2 bash-completion berkdb bzip2 clamav cli cracklib crypt ctype curl dovecot-sasl fpx gd gdbm gif gmp graphviz iconv idn imap ipv6 jbig jpeg lcms ldap managesieve mbox mhash mmx mpeg mudflap ncurses nls nptl nptlonly offensive openmp pam pcre perl perlsuid png pop3d postfix postgres python readline reflection sasl session sieve slang snmp spamassassin spell spl sse ssl sysfs tcpd threads tiff truetype unicode urandom usb vhosts wmf x86 xinetd xml zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so speling status unique_id userdir usertrack vhost_alias authn_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Reproducible: Always

Steps to Reproduce:
1. upgrade gcc
2. emerge php


Actual Results:  
Build fails.

Expected Results:  
Build should work fine.
Comment 1 Jan Kohnert 2009-04-20 15:22:39 UTC
Created attachment 188967 [details]
log from configure while trying to build php

Sorry, the file is a bit lenghty, but since I'm not too sure about possibly relevant parts, I just send it complete. The failure is documented at line 9228ff.
Comment 2 David Sveningsson 2009-04-20 15:47:51 UTC
Does it die during the configuration stage or does it start building? Can you paste the message from emerge and if possible attach the build log.

I've tried building php-5.2.8-r2 with gcc-4.3.3 and I didn't run into any issues. Perhaps your could try a later version (5.2.9-r2 is stable).
Comment 3 Jan Kohnert 2009-04-20 15:56:51 UTC
(In reply to comment #2)
> Does it die during the configuration stage or does it start building? Can you
> paste the message from emerge and if possible attach the build log.

Sorry, I probably should have hade that one more clear. It dies during configure, so it does not even start building. So the title of the bug is maybe a bit misleading.
 
> I've tried building php-5.2.8-r2 with gcc-4.3.3 and I didn't run into any
> issues. Perhaps your could try a later version (5.2.9-r2 is stable).

Well, I don't even have php-5.2.9-r2 on my system, the last sync is from Friday. Is it that new? OTOH, php-5.2.9 and php-5.2.9-r1, which I do have, are masked ~x86, as well as gcc-4.3.3 and later. If it is not *really* neccessary, I don't want to put ~x86 software on that system.

Best regards Jan

Comment 4 Jan Kohnert 2009-04-20 16:01:47 UTC
These are the last configure checks:

checking for libedit readline replacement... no
checking for readline support... yes
checking for tgetent in -lncurses... no
checking for tgetent in -ltermcap... no
checking for readline in -lreadline... no
configure: error: readline library not found
 *
 * ERROR: dev-lang/php-5.2.8-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4459:  Called src_compile_normal
 *             environment, line 4578:  Called php5_2-sapi_src_compile
 *             environment, line 3500:  Called die
 * The specific snippet of code:
 *       ./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed";
 *  The die message:
 *   configure failed
 *
Comment 5 David Sveningsson 2009-04-20 16:06:12 UTC
> Well, I don't even have php-5.2.9-r2 on my system, the last sync is from
> Friday. Is it that new? 

Yes, stable since 2009-04-18.

(In reply to comment #4)
> configure: error: readline library not found

Doesn't seem like it depends on readline, which I think it should. Is readline installed on your system?
Comment 6 Jan Kohnert 2009-04-20 16:42:40 UTC
OK, got the new version, but still the same error:
checking for readline support... yes
checking for tgetent in -lncurses... no
checking for tgetent in -ltermcap... no
checking for readline in -lreadline... no
configure: error: readline library not found
 *
 * ERROR: dev-lang/php-5.2.9-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4459:  Called src_compile_normal
 *             environment, line 4578:  Called php5_2-sapi_src_compile
 *             environment, line 3500:  Called die
 * The specific snippet of code:
 *       ./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed";
 *  The die message:
 *   configure failed
 *

And again the same message from configure:
configure:105692: checking for tgetent in -lncurses
configure:105727: i686-pc-linux-gnu-gcc -o conftest -I/usr/include -march=athlon-xp -O2 -pipe -fomit-frame-pointer -D_GNU_SOURCE -pthread  -D_REENTRANT -L/usr/lib -Wl,-O1 conftest.c -lncurses  -lpspell -lpq -lpanel -lncurses -lmhash -lmcrypt -lltdl -lldap -llber -lcrypt -lpam -lgmp -lt1 -lfreetype -lpng -lz -ljpeg -ldb-4.5 -lgdbm -lcurl -lbz2 -lz -lpcre -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lssl -lcrypto -ldl -lcurl -lidn -lssl -lcrypto -lldap -lrt -lssl -lcrypto -ldl -lz -lxml2 -lz -lm -lssl -lcrypto -ldl >&5
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libstdc++.so.6: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0'
collect2: ld returned 1 exit status
configure:105734: $? = 1

I really don't know whats going on here. One thing I know: I *never* had GCC-4.2.X on that machine, as it never went stable.
Comment 7 Jan Kohnert 2009-04-20 21:59:22 UTC
Some additional info:
Of course, readline is installed, just reinstalled it and getting the same error.
revdep-rebuild is also executed regulary, and does not give any broken libs.

Best regards Jan
Comment 8 Jan Kohnert 2009-04-20 22:20:55 UTC
Again me,

I just tested the conftest.c program created by configure and searched for the library creating the problem. It turns out to be -lpspell, coming from the aspell package. Unfortunately reinstalling aspell does not resolve the problem, too.

I'm pretty much stuck at the moment, any clues?

Many thanks Jan
Comment 9 Jan Kohnert 2009-04-21 11:12:45 UTC
OK, new day, new luck. I think I broke the error down to its origin. :-D

Building php with USE -spell resolves the failure (of course, then I don't have the spell checking functions...). But there is also another fix (which at least lets the configure test program compile fine): I have to add -lstdc++ if I use -lpspell enabled with USE spell.

Anyone out there how can confirm this behavior?
Comment 10 Sebastian Luther (few) 2009-04-27 11:54:44 UTC
(In reply to comment #9)

> Anyone out there how can confirm this behaviour? 

I tried it on amd64 and I can't confirm. I used the same useflags as you do except I had to disable the threads useflag because I was hit by bug 234762. 
Comment 11 Jan Kohnert 2009-04-28 14:21:26 UTC
Hey guys,

it was a hard way figuring out, what actually happend, but I'm finally done. :-D

I was hit by the fact, that some old gcc library files lay under /usr/lib/. Since gcc installes its lib-files in /usr/lib/gcc/$ARCH/$VERSION/ and /lib, but *not* /usr/lib, they never got updated. I don't know where this files came from, they were probably leftovers from the installation process (which the service provider did using an ancient Gentoo install medium).

So, the solution simply was:
# for file in $(find /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/ -name lib\*); do \ base=$(basename $file); find /usr/lib -maxdepth 1 -name $base -delete; done
(followed by revdep-rebuild, of course).

I'll close this one.

Thanks for all your patience and best regards,

Jan
Comment 12 Jerry Wallace 2009-05-29 22:15:58 UTC
(In reply to comment #11)
> Hey guys,
> 
> it was a hard way figuring out, what actually happend, but I'm finally done.
> :-D
> 
> I was hit by the fact, that some old gcc library files lay under /usr/lib/.
> Since gcc installes its lib-files in /usr/lib/gcc/$ARCH/$VERSION/ and /lib, but
> *not* /usr/lib, they never got updated. I don't know where this files came
> from, they were probably leftovers from the installation process (which the
> service provider did using an ancient Gentoo install medium).
> 
> So, the solution simply was:
> # for file in $(find /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/ -name lib\*); do \
> base=$(basename $file); find /usr/lib -maxdepth 1 -name $base -delete; done
> (followed by revdep-rebuild, of course).
> 
> I'll close this one.
> 
> Thanks for all your patience and best regards,
> 
> Jan
> 

This was my same problem. Thanks for the fix.