Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51219 - PHP 4.3.6 build fails with libtool error referring to i386; I have i686
Summary: PHP 4.3.6 build fails with libtool error referring to i386; I have i686
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-16 10:55 UTC by John Robinson
Modified: 2004-05-16 22:18 UTC (History)
0 users

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 John Robinson 2004-05-16 10:55:07 UTC
When I try to `emerge dev-php/php` - the CLI version - I get a rather unlikely looking error when it's nearly done:

[...]
/bin/sh /var/tmp/portage/php-4.3.6/work/php-4.3.6/libtool --silent --preserve-dup-deps --mode=install cp ext/java/java.la /var/tmp/portage/php-4.3.6/work/php-4.3.6/modules
PATH="$PATH:/sbin" ldconfig -n /var/tmp/portage/php-4.3.6/work/php-4.3.6/modules----------------------------------------------------------------------
Libraries have been installed in:
   /var/tmp/portage/php-4.3.6/work/php-4.3.6/modules
 
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'
 
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/bin/sh /var/tmp/portage/php-4.3.6/work/php-4.3.6/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -march=pentium3 -O2 -pipe -fomit-frame-pointer -falign-functions  -L/usr/X11R6/lib -L/opt/blackdown-jdk-1.4.1/jre/lib/i386/server -L/opt/blackdown-jdk-1.4.1/jre/lib/i386/native_threads -L/opt/blackdown-jdk-1.4.1/jre/lib/i386  -R /usr/X11R6/lib -R /opt/blackdown-jdk-1.4.1/jre/lib/i386/server -R /opt/blackdown-jdk-1.4.1/jre/lib/i386/native_threads -R /opt/blackdown-jdk-1.4.1/jre/lib/i386 ext/openssl/openssl.lo ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/bcmath/bcmath.lo ext/bcmath/libbcmath/src/add.lo ext/bcmath/libbcmath/src/div.lo ext/bcmath/libbcmath/src/init.lo ext/bcmath/libbcmath/src/neg.lo ext/bcmath/libbcmath/src/outofmem.lo ext/bcmath/libbcmath/src/raisemod.lo ext/bcmath/libbcmath/src/rt.lo ext/bcmath/libbcmath/src/sub.lo ext/bcmath/libbcmath/src/compare.lo ext/bcmath/libbcmath/src/divmod.lo ext/bcmath/libbcmath/src/int2num.lo ext/bcmath/libbcmath/src/num2long.lo ext/bcmath/libbcmath/src/output.lo ext/bcmath/libbcmath/src/recmul.lo ext/bcmath/libbcmath/src/sqrt.lo ext/bcmath/libbcmath/src/zero.lo ext/bcmath/libbcmath/src/debug.lo ext/bcmath/libbcmath/src/doaddsub.lo ext/bcmath/libbcmath/src/nearzero.lo ext/bcmath/libbcmath/src/num2str.lo ext/bcmath/libbcmath/src/raise.lo ext/bcmath/libbcmath/src/rmzero.lo ext/bcmath/libbcmath/src/str2num.lo ext/bz2/bz2.lo ext/calendar/calendar.lo ext/calendar/dow.lo ext/calendar/french.lo ext/calendar/gregor.lo ext/calendar/jewish.lo ext/calendar/julian.lo ext/calendar/easter.lo ext/calendar/cal_unix.lo ext/crack/crack.lo ext/ctype/ctype.lo ext/dba/dba.lo ext/dba/dba_cdb.lo ext/dba/dba_db2.lo ext/dba/dba_dbm.lo ext/dba/dba_gdbm.lo ext/dba/dba_ndbm.lo ext/dba/dba_db3.lo ext/dba/dba_db4.lo ext/dba/dba_flatfile.lo ext/dba/dba_inifile.lo ext/dba/libcdb/cdb.lo ext/dba/libcdb/cdb_make.lo ext/dba/libcdb/uint32.lo ext/dba/libflatfile/flatfile.lo ext/dba/libinifile/inifile.lo ext/dbase/dbf_head.lo ext/dbase/dbf_rec.lo ext/dbase/dbf_misc.lo ext/dbase/dbf_ndx.lo ext/dbase/dbase.lo ext/dbx/dbx.lo ext/dbx/dbx_mysql.lo ext/dbx/dbx_odbc.lo ext/dbx/dbx_pgsql.lo ext/dbx/dbx_mssql.lo ext/dbx/dbx_fbsql.lo ext/dbx/dbx_oci8.lo ext/dbx/dbx_sybasect.lo ext/dio/dio.lo ext/domxml/php_domxml.lo ext/exif/exif.lo ext/filepro/filepro.lo ext/ftp/php_ftp.lo ext/ftp/ftp.lo ext/gd/gd.lo ext/gd/gdttf.lo ext/gd/libgd/gd.lo ext/gd/libgd/gd_gd.lo ext/gd/libgd/gd_gd2.lo ext/gd/libgd/gd_io.lo ext/gd/libgd/gd_io_dp.lo ext/gd/libgd/gd_io_file.lo ext/gd/libgd/gd_ss.lo ext/gd/libgd/gd_io_ss.lo ext/gd/libgd/gd_png.lo ext/gd/libgd/gd_jpeg.lo ext/gd/libgd/gdxpm.lo ext/gd/libgd/gdfontt.lo ext/gd/libgd/gdfonts.lo ext/gd/libgd/gdfontmb.lo ext/gd/libgd/gdfontl.lo ext/gd/libgd/gdfontg.lo ext/gd/libgd/gdtables.lo ext/gd/libgd/gdft.lo ext/gd/libgd/gdcache.lo ext/gd/libgd/gdkanji.lo ext/gd/libgd/wbmp.lo ext/gd/libgd/gd_wbmp.lo ext/gd/libgd/gdhelpers.lo ext/gd/libgd/gd_topal.lo ext/gd/libgd/gd_gif_in.lo ext/gd/libgd/xbm.lo ext/gettext/gettext.lo ext/iconv/iconv.lo ext/imap/php_imap.lo ext/ldap/ldap.lo ext/mbstring/mbstring.lo ext/mbstring/php_unicode.lo ext/mbstring/php_mbregex.lo ext/mbstring/mbregex/mbregex.lo ext/mbstring/libmbfl/filters/html_entities.lo ext/mbstring/libmbfl/filters/mbfilter_7bit.lo ext/mbstring/libmbfl/filters/mbfilter_ascii.lo ext/mbstring/libmbfl/filters/mbfilter_base64.lo ext/mbstring/libmbfl/filters/mbfilter_big5.lo ext/mbstring/libmbfl/filters/mbfilter_byte2.lo ext/mbstring/libmbfl/filters/mbfilter_byte4.lo ext/mbstring/libmbfl/filters/mbfilter_cp1251.lo ext/mbstring/libmbfl/filters/mbfilter_cp1252.lo ext/mbstring/libmbfl/filters/mbfilter_cp866.lo ext/mbstring/libmbfl/filters/mbfilter_cp932.lo ext/mbstring/libmbfl/filters/mbfilter_cp936.lo ext/mbstring/libmbfl/filters/mbfilter_euc_cn.lo ext/mbstring/libmbfl/filters/mbfilter_euc_jp.lo ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.lo ext/mbstring/libmbfl/filters/mbfilter_euc_kr.lo ext/mbstring/libmbfl/filters/mbfilter_euc_tw.lo ext/mbstring/libmbfl/filters/mbfilter_htmlent.lo ext/mbstring/libmbfl/filters/mbfilter_hz.lo ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_1.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_10.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_13.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_14.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_15.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_2.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_3.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_4.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_5.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_6.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_7.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_8.lo ext/mbstring/libmbfl/filters/mbfilter_iso8859_9.lo ext/mbstring/libmbfl/filters/mbfilter_jis.lo ext/mbstring/libmbfl/filters/mbfilter_koi8r.lo ext/mbstring/libmbfl/filters/mbfilter_qprint.lo ext/mbstring/libmbfl/filters/mbfilter_sjis.lo ext/mbstring/libmbfl/filters/mbfilter_ucs2.lo ext/mbstring/libmbfl/filters/mbfilter_ucs4.lo ext/mbstring/libmbfl/filters/mbfilter_uhc.lo ext/mbstring/libmbfl/filters/mbfilter_utf16.lo ext/mbstring/libmbfl/filters/mbfilter_utf32.lo ext/mbstring/libmbfl/filters/mbfilter_utf7.lo ext/mbstring/libmbfl/filters/mbfilter_utf7imap.lo ext/mbstring/libmbfl/filters/mbfilter_utf8.lo ext/mbstring/libmbfl/filters/mbfilter_uuencode.lo ext/mbstring/libmbfl/mbfl/mbfilter.lo ext/mbstring/libmbfl/mbfl/mbfilter_8bit.lo ext/mbstring/libmbfl/mbfl/mbfilter_pass.lo ext/mbstring/libmbfl/mbfl/mbfilter_wchar.lo ext/mbstring/libmbfl/mbfl/mbfl_convert.lo ext/mbstring/libmbfl/mbfl/mbfl_encoding.lo ext/mbstring/libmbfl/mbfl/mbfl_filter_output.lo ext/mbstring/libmbfl/mbfl/mbfl_ident.lo ext/mbstring/libmbfl/mbfl/mbfl_language.lo ext/mbstring/libmbfl/mbfl/mbfl_memory_device.lo ext/mbstring/libmbfl/mbfl/mbfl_string.lo ext/mbstring/libmbfl/mbfl/mbfl_allocators.lo ext/mbstring/libmbfl/nls/nls_de.lo ext/mbstring/libmbfl/nls/nls_en.lo ext/mbstring/libmbfl/nls/nls_ja.lo ext/mbstring/libmbfl/nls/nls_kr.lo ext/mbstring/libmbfl/nls/nls_neutral.lo ext/mbstring/libmbfl/nls/nls_ru.lo ext/mbstring/libmbfl/nls/nls_uni.lo ext/mbstring/libmbfl/nls/nls_zh.lo ext/mcrypt/mcrypt.lo ext/mhash/mhash.lo ext/mime_magic/mime_magic.lo ext/mysql/php_mysql.lo ext/overload/overload.lo ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo ext/pdf/pdf.lo ext/posix/posix.lo ext/pspell/pspell.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/shmop/shmop.lo ext/sockets/sockets.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo ext/sysvsem/sysvsem.lo ext/sysvshm/sysvshm.lo ext/tokenizer/tokenizer.lo ext/wddx/wddx.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo ext/xmlrpc/xmlrpc-epi-php.lo ext/xmlrpc/libxmlrpc/base64.lo ext/xmlrpc/libxmlrpc/simplestring.lo ext/xmlrpc/libxmlrpc/xml_to_dandarpc.lo ext/xmlrpc/libxmlrpc/xmlrpc_introspection.lo ext/xmlrpc/libxmlrpc/encodings.lo ext/xmlrpc/libxmlrpc/system_methods.lo ext/xmlrpc/libxmlrpc/xml_to_xmlrpc.lo ext/xmlrpc/libxmlrpc/queue.lo ext/xmlrpc/libxmlrpc/xml_element.lo ext/xmlrpc/libxmlrpc/xmlrpc.lo ext/xmlrpc/libxmlrpc/xml_to_soap.lo ext/xslt/xslt.lo ext/xslt/sablot.lo ext/yp/yp.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo ext/ncurses/ncurses.lo ext/ncurses/ncurses_fe.lo ext/ncurses/ncurses_functions.lo ext/pcntl/pcntl.lo ext/pcntl/php_signal.lo ext/readline/readline.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lc-client -lssl -lcrypto -lnsl -lsablot -lexpat -lexpat -lhistory -lreadline -lncurses -lpspell -lpdf -lz -ltiff -lpng -ljpeg -lpanel -lncurses -lmysqlclient -lmhash -lmcrypt -lltdl -lldap -llber -lcrypt -lpam -lt1 -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lexslt -lxml2 -lxslt -lz -ldb-4.1 -lndbm -lgdbm -lcrack -lbz2 -lz -lssl -lcrypto -lresolv -lm -lxmlparse -lxmltok -lxml2 -lz -lm -lcrypt  -o sapi/cli/php
libtool: link: cannot find the library `/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.la'
make: *** [sapi/cli/php] Error 1
 
!!! ERROR: dev-php/php-4.3.6 failed.
!!! Function php-sapi_src_compile, Line 483, Exitcode 2
!!! compile problem
 
pc root # 


As you can see it complains about my not having a gcc-lib/i386 item, which of course I don't; my system only has an equivalent gcc-lib/i686 file. My make.conf says i686 in the CHOST; is there a problem with the PHP bundled libtool? In fact even the libtool script PHP is using contains (presumably from having been auto-generated) the line "host=i686-pc-linux-gnu". All very bizarre and rather annoying.

This is on a newly installed box using the 2004.1 GRP CDs up to a point, then I ran `emerge sync` and have started installing the server parts I want. I haven't done an `emerge update world` yet, only an `emerge --deep --update portage`, but the list from `emerge --pretend update world` doesn't show any relevant development tools or libraries which have changed (except libxml). I don't know why the `emerge info` output shows 2004.0 but that's not the problem here, obviously.

Anyway I'll try an older PHP on this machine, and try to install this PHP on my other Gentoo machine, see if there's any differences which help.


Reproducible: Always
Steps to Reproduce:
1.emerge dev-php/php
2.
3.

Actual Results:  
Compile error as noted.

Expected Results:  
Successful PHP build.

Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.25-gentoo-r1)
=================================================================
System uname: 2.4.25-gentoo-r1 i686 VIA Nehemiah
Gentoo Base System version 1.4.10
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -falign-functions"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -falign-functions"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/mnt/cdrom"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="X alsa apache2 apm arts avi berkdb bonobo cdr crypt cups dga dvd emacs
encode esd foomaticdb gd gdbm gif gnome gpm gtk gtk2 imap imlib java jikes jpeg
ldap libg++ libwww mad mikmod mmx mozilla mpeg mysql ncurses nls oggvorbis
opengl oss pam pcmcia pdflib perl png python quicktime readline samba sasl sdl
slang spell sse ssl svga tcpd tiff truetype usb x86 xml xml2 xmms xosd zlib"
 
The distcc is to a Windows box, so I disabled distcc to see if that might be the
problem. It's exactly the same error either way.
Comment 1 John Robinson 2004-05-16 11:41:57 UTC
Well I have tried 4.3.4-r4 on the new box, and 4.3.4-r4 fails with that error too, and my other Gentoo box already has 4.3.4-r4 successfully installed, so I guess it's a system problem. Is something somewhere ignoring my CHOST and trying to work it out itself and getting it wrong (which it might as it's a VIA C3-2 Nehemiah processor; I am the proud owner of a mini-itx EPIA M-II system)?

Ah this could be it; the other box has CFLAGS in make.conf including "-march=k6-2" but PHP has built with "-march=i586". A little poking and /var/tmp/portage/php-4.3.6/work/php-4.3.6/config.log suggests PHP's configure was run with CFLAGS of -march=i586 which isn't what was in my CFLAGS, however on the Nehemiah box, there's "-march=pentium3" both in make.conf and in the config.log. The Nehemiah is Pentium 3 compatible in that it has SSE, and everything else is running nicely with this setting. I tried "-march=c3-2" which is in the RedHat/Fedora gcc 3.3.2 but it's not in the Gentoo gcc 3.3.2. I might now try the PHP build with -march=i686 and see if the build completes, but it'd be a shame if I can't have all the CPU optimisations I might have.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-05-16 22:18:17 UTC
something is borked with your installed libraries. one of them was compiled with an i386 CHOST.

as root, run:
/sbin/fix_libtool_files.sh `gcc -dumpversion` --oldarch i386-pc-linux-gnu
/sbin/fix_libtool_files.sh `gcc -dumpversion` --oldarch i486-pc-linux-gnu
/sbin/fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu

this is the brute force way of fixing it, but it works and makes sure your entire system is consistant.
if there has been a major gcc upgrade as well, then put the old gcc version in above as well instead of the gcc dumpversion expression.

As for -march=c3-2 it's because Redhat has been backporting GCC3.4 features.