Summary: | PHP Ebuild incorrectly detects GCC 2 as cross-compiler | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matthew Walker <utoxin> |
Component: | New packages | Assignee: | PHP Bugs <php-bugs> |
Status: | VERIFIED INVALID | ||
Severity: | critical | CC: | azarah, contigab, jjk3, kevwil, robbat2, sebgarden |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
please paste #emerge info arsenic php-4.3.0 # emerge info Portage 2.0.46-r9 (default-1.0, gcc-2.95.3, glibc-2.2.5-r2,2.2.5-r7) ================================================================= System uname: 2.4.19-gentoo-r10 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi g /usr/kde/3/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 mysql ssl crypt imap tcpd pam perl python gif jpeg png flash truetype xml xml2 libwww gd gdbm" COMPILER="" CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686" CXXFLAGS="-march=i686" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache" Any progress yet? Matthew are you running the newest gcc-config? arsenic root # emerge -s gcc-config Searching... [ Results for search key : gcc-config ] [ Applications found : 1 ] * sys-devel/gcc-config Latest version available: 1.2.7 Latest version installed: 1.2.7 Size of downloaded files: 0 kB Homepage: http://www.gentoo.org/ Description: Utility to change the gcc compiler being used. arsenic root # Just in case you ask: arsenic root # gcc-config --get-current-profile i686-pc-linux-gnu-2.95.3 Matthew: Try the latest masked gcc config. ACCEPT_KEYWORDS="~x86" emerge gcc-config. I cannot recreate the error. I'm using gcc-config 1.3.1 Okay, just installed gcc-config 1.3.1, and I'm getting exactly the same behavior. Just a note: I just had to restart my Apache server, which forced me to figure out a way to get PHP to rebuild. (My old PHP was linked against a library that no longer exists on my system...) I managed to get it to work by executing the ebuild one step at a time except for the configure step. I forced the ebuild to just output the configure line it would have run, and ran it myself on the portage working directory. It worked properly, and I was able to continue with the step-by-step ebuild. Just in case, I'm going to re-emerge Python and Portage and see if that fixes the problem, since it's apparently some kind of issue with the Portage build environment. Works fine here with gcc-2.95.3 ------------------------------ nosferatu php-4.3.0 # epm -q gcc gcc-config gcc-3.2.1-r7 gcc-2.95.3-r8 gcc-config-1.3.1 nosferatu php-4.3.0 # I'm willing to let Ryan in to take a look at my box firsthand, if you want. As I said, I've found a workaround, but it's a pain in the butt to do, so I'd like to get this solved. Matthew: email me at rphillips@gentoo.org Include output of 'gcc -v' please. arsenic root # gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs gcc version 2.95.3 20010315 (release) Also, Ryan logged in and did a lot of poking around. The problem is somehow related to the 'xml' use flag, and the portage environment. I'm not sure what all he discovered, so you'll have to get the details from him. But, for the time being, I've got a working system. I unmasked mysql-4.0.10 to install it on my box, and trying to rebuild PHP (4.3.1) afterwards, I get the same error about cross-compiling. I also tried the latest PHP-4.3.1-r1, with the same result. Removing -O3/-pipe from the CFLAGS has no effect. I'm busy rebuilding glibc on a hunch at the moment. emerge info: Portage 2.0.46-r12 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r3) ================================================================= System uname: 2.4.20-gentoo-r1 i686 Pentium III (Katmai) GENTOO_MIRRORS="http://gentoo.oregonstate.edu " CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/afs/C /etc/afs/afsws /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 libg++ -3dfx -3dnow aalib acl acpi afs alsa apache2 apm arts avi berkdb bonobo canna cdr cjk crypt cups dga directfb doc dvd encode esd ethereal evo fbcon flash freewnn gb gd ggi gif -gnome gphoto2 gps gtk gtk2 gtkhtml guile imap imlib innodb ipv6 java jikes jpeg junit kde -kerberos lcms ldap leim libgda libwww maildir -matrox mbox mikmod motif mozilla mpeg -mule mysql nas nls oav -oci8 oggvorbis opengl oss -pcmcia -pda pdflib plotutils png pnp -postgres qt -qtmt quicktime ruby samba sasl scanner sdl slp snmp socks5 spell sse svga tcltk tcpd tetex tiff truetype trusted usb -voodoo3 wavelan wmf X xface xml xml2 xmms xv gdbm gpm mmx ncurses pam perl pic python readline slang ssl zlib mozsvg mozcalender mozaccess mozinterfaceinfo mozp3p mozxmlterm" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O3 -pipe" CXXFLAGS="-march=pentium3 -O3 -pipe" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j4" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache buildpkg distcc" gcc-config --get-current-profile: i686-pc-linux-gnu-3.2.2 gcc-config --list-profiles: i586-pc-linux-gnu-3.2.2 i686-pc-linux-gnu-3.2.2 server1 emerge # epm -q gcc gcc-config binutils gcc-3.2.2-r1 gcc-config-1.3.1 binutils-2.13.90.0.18 gcc -v: Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/specs Configured with: /var/tmp/portage/gcc-3.2.2-r1/work/gcc-3.2.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext Thread model: posix gcc version 3.2.2 solution found! it's because of net-libs/libwww and >=mysql-4 net-libs/libwww contains: /usr/lib/libxmlparse.so /usr/lib/libxmltok.so which both link against libmysqlclient.so.10 ... I had mysql-3 installed, but upgraded to mysql-4 because i needed some advanced features only in the 4 line. then, going to build my php, it was failing with that error. when the PHP configure tries to build it's conftest for cross complining it links against xmltok and xmlparse. since then link to libmysqlclient.so.10 and that file no longer exists (it became libmysqlclient.so.12 with mysql-4) the conftest wouldn't run, and the way the script was set up, it detected this as a cross-compiler. the ebuilds for net-libs/libwww all contain: !>=mysql-4 the change to exclude mysql-4 was made because of bug 15099 I'm going to write up some fixes to libwww and submit them to w3c for this. I've temporarily done: USE="-mysql" emerge net-libs/libwww so that I can get to rebuilding my PHP Great! Thanks for all the info. I'll keep this in mind in the future. *** Bug 16426 has been marked as a duplicate of this bug. *** glad you guys found the answer :) I haven't got to writing any patches for libwww yet so it can compile, but can something more sensible be done with the libwww ebuild so that it only compiles in support for MySQL if the version is less than 4 ? and DOESN'T give a warning otherwise. *** Bug 16954 has been marked as a duplicate of this bug. *** I didn't found anything about php cross compiling error during my search and didn't notice this bug report before posting the bug 16954. Sorry and thank you to you all. Closing bug properly. *** Bug 27461 has been marked as a duplicate of this bug. *** *** Bug 34937 has been marked as a duplicate of this bug. *** |
When installing PHP 4.3 on my system running GCC 2.95.3, I get the following output. This is obviously incorrect. If you need any further info, please ask. I have tested the PHP configure script outside the ebuild system, and it worked just fine, properly detecting that GCC was not a cross compiler. I also tried removing the -pipe and -O3 flags from the build options, and it still had the same problem. arsenic root # emerge php Calculating dependencies ...done! >>> emerge (1 of 1) dev-php/php-4.3.0-r2 to / >>> md5 ;-) php-4.3.0.tar.bz2 >>> Unpacking source... >>> Unpacking php-4.3.0.tar.bz2 >>> Source unpacked. ssl gdbm mysql truetype jpeg Compiling imap with SSL support libwww flash xml2 crypt creating cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for working sed... sed checking host system type... i686-pc-linux-gnu Updated php_version.h checking for gcc... gcc checking whether the C compiler (gcc -march=i686 -O3 -pipe ) works... yes checking whether the C compiler (gcc -march=i686 -O3 -pipe ) is a cross-compiler... yes checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking for ranlib... ranlib checking whether ln -s works... yes checking for gawk... gawk checking for bison... bison -y checking bison version... 1.35 (ok) checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for working const... yes checking flex version... 2.5.4 (ok) checking for pthreads_cflags... checking for pthreads_lib... Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking for mod_charset compatibility option... no checking for Apache 2.0 module support via DSO through APXS... no checking for Caudium support... no checking for CLI build... yes checking for embedded SAPI library support... no checking for Zeus ISAPI support... no checking for NSAPI support... no checking for PHTTPD support... no checking for Pi3Web support... no checking for Roxen/Pike support... no checking for Servlet support... no checking for thttpd... no checking for TUX... no checking for webjames... no checking for CGI build... no checking for chosen SAPI module... cli Running system checks checking for missing declarations of reentrant functions... done checking for sendmail... /usr/sbin/sendmail checking whether system uses EBCDIC... no checking for socket... yes checking for htonl... yes checking for gethostname... yes checking for gethostbyaddr... yes checking for yp_get_default_domain... no checking for __yp_get_default_domain... no checking for yp_get_default_domain in -lnsl... yes checking for dlopen... yes checking for sin in -lm... yes checking for res_search... no checking for __res_search... no checking for res_search in -lresolv... yes checking for res_search in -lbind... no checking for __res_search in -lbind... no checking for res_search in -lsocket... no checking for __res_search in -lsocket... no checking for inet_aton... yes checking for dn_skipname... no checking for __dn_skipname... no checking for dn_skipname in -lresolv... no checking for __dn_skipname in -lresolv... yes checking for dn_skipname in -lbind... no checking for __dn_skipname in -lbind... no checking for ANSI C header files... yes checking for dirent.h that defines DIR... yes checking for opendir in -ldir... no checking for fclose declaration... ok checking for ApplicationServices/ApplicationServices.h... no checking for sys/types.h... yes checking for sys/time.h... yes checking for netinet/in.h... yes checking for alloca.h... yes checking for arpa/inet.h... yes checking for arpa/nameser.h... yes checking for assert.h... yes checking for crypt.h... yes checking for fcntl.h... yes checking for grp.h... yes checking for ieeefp.h... no checking for langinfo.h... yes checking for limits.h... yes checking for locale.h... yes checking for monetary.h... yes checking for mach-o/dyld.h... no checking for netdb.h... yes checking for pwd.h... yes checking for resolv.h... yes checking for signal.h... yes checking for stdarg.h... yes checking for stdlib.h... yes checking for string.h... yes checking for syslog.h... yes checking for sysexits.h... yes checking for sys/file.h... yes checking for sys/mman.h... yes checking for sys/mount.h... yes checking for sys/poll.h... yes checking for sys/resource.h... yes checking for sys/select.h... yes checking for sys/socket.h... yes checking for sys/statfs.h... yes checking for sys/statvfs.h... yes checking for sys/vfs.h... yes checking for sys/sysexits.h... no checking for sys/varargs.h... no checking for sys/wait.h... yes checking for unistd.h... yes checking for unix.h... no checking for utime.h... yes checking for sys/utsname.h... yes checking for sys/ipc.h... yes checking for fopencookie... yes configure: error: can not run test program while cross compiling !!! ERROR: dev-php/php-4.3.0-r2 failed. !!! Function src_compile, Line 137, Exitcode 1 !!! bad ./configure