Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344089 - dev-lang/php-5.3.3-r3 fails to build with USE="cli"
Summary: dev-lang/php-5.3.3-r3 fails to build with USE="cli"
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 10:54 UTC by Rafal Kupiec
Modified: 2010-12-28 03:56 UTC (History)
1 user (show)

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


Attachments
build log from dev-lang/php with cli USE flag enabled (build.log,723.94 KB, text/plain)
2010-11-07 23:07 UTC, Kevinv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Kupiec 2010-11-04 10:54:35 UTC
PHP 5.3.3-r3 fails to build CLI SAPI on some systems due to not found POSIX readdir_r.

Looks like on some systems, PHP configure script is unable to find POSIX readdir_r and use old one instead, even when POSIX is available on the system.

From what i found on the net:
 * http://bugs.php.net/bug.php?id=34393
 * http://www.phpbuilder.com/board/archive/index.php/t-7109292.html


Seems like PHP cannot be build using OLD readdir_r and the only valid option is to use POSIX's readdir_r. I don't know why -r3 defines HAVE_OLD_READDIR_R 1 instead of HAVE_POSIX_READDIR_R 1, but it's working for -r1. Manually editing configure script and forcing to use POSIX function solved problem for me and that's what is recommended by php developers.


--------

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

Calculating dependencies... done!
[ebuild  NS   ] dev-lang/php-5.3.3-r3 [5.3.3-r1] USE="apache2 berkdb bzip2 cgi cli crypt ctype curl fileinfo filter ftp gd gdbm hash iconv ipv6 json ldap mysql mysqli nls pdo phar posix postgres readline session simplexml soap sockets sqlite sqlite3 ssl suhosin threads tokenizer truetype unicode xml xmlreader xmlrpc xmlwriter xsl zip zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cjk -curlwrappers -db2 (-dbmaker) -debug -doc -embed (-empress) (-empress-bcs) -enchant (-esoob) -exif (-firebird) -flatfile -fpm (-frontbase) -gd-external -gmp -imap -inifile -interbase -intl -iodbc -kerberos -kolab -ldap-sasl -libedit -mssql -mysqlnd -oci8 -oci8-instant-client -odbc -pcntl -pic -qdbm -recode -sapdb -sharedext -sharedmem -snmp (-solid) -spell (-sybase-ct) -sysvipc -tidy -wddx -xpm" 0 kB                                                  
[uninstall    ] dev-lang/php-5.3.3-r1  USE="apache2 berkdb bzip2 cgi cli crypt ctype curl fileinfo filter ftp gd gdbm hash iconv ipv6 json ldap mysql mysqli nls pdo phar posix postgres readline session simplexml soap sockets sqlite sqlite3 ssl suhosin threads tokenizer truetype unicode xml xmlreader xmlrpc xmlwriter xsl zip zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cjk -concurrentmodphp -curlwrappers -db2 (-dbmaker) -debug -doc -embed (-empress) (-empress-bcs) -enchant (-esoob) -exif (-firebird) -flatfile -fpm (-frontbase) -gd-external -gmp -imap -inifile -interbase -intl -iodbc -kerberos -kolab -ldap-sasl -libedit -mssql -mysqlnd -oci8 -oci8-instant-client -odbc -pcntl -pic -qdbm -recode -sapdb -sharedext -sharedmem -snmp (-solid) -spell (-sybase-ct) -sysvipc -tidy -wddx -xpm"                                               
[blocks b     ] dev-lang/php:5 ("dev-lang/php:5" is blocking dev-lang/php-5.3.3-r3)
[ebuild     U ] dev-php5/suhosin-0.9.32.1-r2 [0.9.32.1-r1] PHP_TARGETS="php5-3%* -php5-2%" 0 kB
[ebuild     U ] dev-php5/eaccelerator-0.9.6.1-r1 [0.9.6.1] USE="apache2 session -debug -disassembler -doccommentinclusion -inode" PHP_TARGETS="php5-3%* -php5-2%" 0 kB


Reproducible: Always

Steps to Reproduce:
1. USE="cli" emerge =php-5.3.3-r3

Actual Results:  
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/cli/ext/zip/lib/zip_dirent.c:460: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
In file included from /usr/include/string.h:640,
                 from /var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/cli/ext/zip/lib/zip_dirent.c:38:
In function 'memset',
    inlined from '_zip_dirent_read' at /var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/cli/ext/zip/lib/zip_dirent.c:478:
/usr/include/bits/string3.h:82: warning: call to '__warn_memset_zero_len' declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/cli/main/main.c: In function 'php_log_err':
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/cli/main/main.c:591: warning: ignoring return value of 'write', declared with attribute warn_unused_result
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/cli/main/reentrancy.c: In function 'php_readdir_r':
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/cli/main/reentrancy.c:139: error: too few arguments to function 'readdir_r'
make: *** [main/reentrancy.lo] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: dev-lang/php-5.3.3-r3 failed:
 *   emake failed
 * 
 * Call stack:
 *              ebuild.sh, line   47:  Called src_compile
 *            environment, line 4820:  Called eblit-run 'src_compile' 'v1'
 *            environment, line 1952:  Called eblit-php-src_compile
 *   src_compile-v1.eblit, line   14:  Called php_sapi_build 'cli'
 *   src_compile-v1.eblit, line   23:  Called die
 * The specific snippet of code:
 *      emake || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-lang/php-5.3.3-r3',
 * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.3.3-r3'.
 * The complete build log is located at '/var/log/portage/dev-lang:php-5.3.3-r3:20101104-090255.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.3.3-r3/temp/environment'.
 * S: '/var/tmp/portage/dev-lang/php-5.3.3-r3/work/php-5.3.3'

>>> Failed to emerge dev-lang/php-5.3.3-r3, Log file:

>>>  '/var/log/portage/dev-lang:php-5.3.3-r3:20101104-090255.log'

 * Messages for package dev-lang/php-5.3.3-r3:

 * ERROR: dev-lang/php-5.3.3-r3 failed:
 *   emake failed
 * 
 * Call stack:
 *              ebuild.sh, line   47:  Called src_compile
 *            environment, line 4820:  Called eblit-run 'src_compile' 'v1'
 *            environment, line 1952:  Called eblit-php-src_compile
 *   src_compile-v1.eblit, line   14:  Called php_sapi_build 'cli'
 *   src_compile-v1.eblit, line   23:  Called die
 * The specific snippet of code:
 *      emake || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-lang/php-5.3.3-r3',
 * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.3.3-r3'.
 * The complete build log is located at '/var/log/portage/dev-lang:php-5.3.3-r3:20101104-090255.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.3.3-r3/temp/environment'.
 * S: '/var/tmp/portage/dev-lang/php-5.3.3-r3/work/php-5.3.3'



Reproducible: On few systems when CLI SAPI enabled.
I have actually tried this on 2 computers and failed on one of them only.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-04 17:04:10 UTC
Please attach the entire build log.
Comment 2 Kevinv 2010-11-07 23:07:49 UTC
Created attachment 253565 [details]
build log from dev-lang/php with cli USE flag enabled
Comment 3 Wormo (RETIRED) gentoo-dev 2010-11-12 20:22:19 UTC
Thanks for the report, assigning to php maintainers
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-27 22:29:43 UTC
Can you reproduce this on php-5.3.4?
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-27 22:44:08 UTC
(In reply to comment #4)
> Can you reproduce this on php-5.3.4?
> 

Actually, This might be a duplicate of bug #341579

I suggest fixing your system, there are leftovers of the openssl upgrade on your machine:

"warning: libssl.so.0.9.8, needed by /usr/lib/libcurl.so, may conflict with libssl.so.1.0.0"

and so forth. For that, I will close this bug, you are free to reopen if you clean up your system and can reproduce without that warning. thx.
Comment 6 Kevinv 2010-12-28 03:56:52 UTC
(In reply to comment #4)
> Can you reproduce this on php-5.3.4?
> 

Even without cleaning the libcurl issue 5.3.4 did compile cleanly with cli use flag enabled