Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135403 - PHP 5.1.4 fails to build on PowerPC under some conditions
Summary: PHP 5.1.4 fails to build on PowerPC under some conditions
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-03 09:32 UTC by Pieter Van den Abeele (RETIRED)
Modified: 2006-06-05 08:17 UTC (History)
1 user (show)

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 Pieter Van den Abeele (RETIRED) gentoo-dev 2006-06-03 09:32:18 UTC
I've been struggling with this bug for a while now. I am able to reproduce this issue on various systems. 

I am trying to emerge php with the following use flags:

USE="apache2 bcmath berkdb bzip2 calendar cdb cgi cjk cli crypt ctype curl dbase discard-path exif flatfile gd gdbm hash iconv imap iodbc ipv6 kerberos ldap mcve mhash mysql ncurses nls odbc pcre pic posix postgres readline reflection sapdb sasl session snmp spell spl sqlite ssl sysvipc threads tidy truetype unicode xml xmlreader xmlrpc xpm yaz zip zlib -apache -curlwrappers -debug -doc -fastbuild -force-cgi-redirect -ftp -gd-external -gmp -hardenedphp -hyperwave-api -inifile -java-external -libedit -memlimit -ming -mysqli -msql -mssql -pcntl -pdo -pdo-external -qdbm -recode -sharedext -sharedmem -simplexml -soap -sockets -tokenizer -vm-goto -vm-switch -wddx -xmlwriter -xsl"

The first issue that pops up is the following: 

checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... /var/run/mysqld/mysqld.sock
checking for MySQL UNIX socket location... /var/run/mysqld/mysqld.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.

I have mysql-5.0.22 installed. After removing mysql from the use flags, I get the following: 

checking for ncurses support... yes
checking for initscr in -lncurses... no
configure: error: Wrong ncurses lib version or lib not found

I have sys-libs/ncurses-5.5-r2 installed. After removing ncurses from the use flags, I get the following:

checking for readline in -lreadline... no
configure: error: readline library not found

I've got sys-libs/readline-5.1_p4  installed. After removing readline from the use flags I get the following: 

checking for SNMP support... yes
checking OpenSSL dir for SNMP... /usr
checking for net-snmp-config... /usr/bin/net-snmp-config
checking for snmp_parse_oid in -lnetsnmp... no
checking for init_snmp in -lnetsnmp... no
configure: error: SNMP sanity check failed. Please check config.log for more information.

I've got net-snmp-5.2.2-r3 installed. After disabling the snmp use flag I get:

checking for sqlite support... yes
checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)... yes
checking for lemon... lemon
checking for lemon version... 1.0 (ok)
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof (char *), 77
See `config.log' for more details.

After disabling the xml use flags, php gets through the configure but during compilation it aborts trying to link to odbc and failing ( I have odbc installed ). 

In file included from /var/tmp/portage/php-5.1.4-r1/work/php-5.1.4/ext/odbc/php_odbc.c:37:
/var/tmp/portage/php-5.1.4-r1/work/php-5.1.4/ext/odbc/php_odbc_includes.h:85:21: error: WINDOWS.H: No such file or directory
/var/tmp/portage/php-5.1.4-r1/work/php-5.1.4/ext/odbc/php_odbc.c: In function 'zm_startup_odbc':
/var/tmp/portage/php-5.1.4-r1/work/php-5.1.4/ext/odbc/php_odbc.c:422: warning: passing argument 3 of 'ts_allocate_id' from incompatible pointer type
make: *** [ext/odbc/php_odbc.lo] Error 1
make: *** Waiting for unfinished jobs....

Without ODBC in the use flags, it still fails on that error. 

The only way I have succeeded in building php is if I use USE="-*"

I have reproduced this issue with gcc3 and gcc4, with different CFLAGS, in different chroots on the same machine ( a 603e, 750, 7450 and 970 chroot ). Others have reported no problems at all installing PPC. My setup differs from the others because I am running a ppc64 kernel with 32bit userland. uname -a reports architecture as ppc64, while userland is 32bit. 

I am not using confcache and have been able to consistently reproduce these issues with php-5.*
Is php that picky about its dependencies or is there something else going on?
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-06-03 11:22:55 UTC
We need to config.log for each of the failures. Also, looking at this, you should really run revdep-rebuild first.
Comment 2 Pieter Van den Abeele (RETIRED) gentoo-dev 2006-06-05 08:12:59 UTC
revdep-rebuild reports that everything is consistent.

I dug into this and it looks like the configure for readline, snmp etc failed because it tried to link to -lsqlod (a library which is provided by sapdb). After removing sapdb from USE flags php got through configure and compile just fine with the USE flags I mentioned earlier. 

Thanks for your help.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-06-05 08:17:43 UTC
Thanks for reporting back, closing this bug then. Reopen if you have a fix for sapdb, we can't really test this at all.