ID: 31256 Updated by: [EMAIL PROTECTED] Reported By: caelian at gmail dot com -Status: Open +Status: Closed Bug Type: Compile Failure Operating System: * PHP Version: 5CVS, 4CVS New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-01-14 05:30:57] [EMAIL PROTECTED] -pthread is not: a) library b) libpath As such, it will not be handled by PHP_EVAL_LIBLINE. ------------------------------------------------------------------------ [2004-12-22 20:10:06] caelian at gmail dot com Description: ------------ It looks like FreeBSD uses gcc's -pthread switch to specify whether or not something should be linked against a POSIX Threading Library (libpthread|libthr|libc_r) ... This is apparent e.g. when building libxml2 the generated xml2-config utility (which is used by PHPs build system) gives the following outputfor the --libs target -L/usr/local/lib -lxml2 -lz -pthread -L/usr/local/lib -liconv -lm As far as i can tell this data is processed in the PHP_EVAL_LIBLINE m4-macro contained in PHP's acinclude.m4 (passed from ext/xml/config.m4) And as far as i can tell from the generated configure script it seems to only handle the -l* and -L* entries. This causes the configure phase for every php-extension that uses -pthread in its library definitions to fail because of missing pthread_* symbols. Reproduce code: --------------- Simply try to build any php5-extension module that depends on libxml2 where libxml2 is build with threads-support. Expected result: ---------------- I expect the configure phase to complete successfully. Actual result: -------------- configure:2643: checking whether libxml build works configure:2672: cc -o conftest -O2 -fno-strict-aliasing -pipe -march=pentium2 conftest.c -R/usr/local/lib -L/usr/local/lib -R/usr/local/lib -L/usr/local/lib -lxml2 -lz -liconv -lm >&5 /usr/local/lib/libxml2.so: undefined reference to `pthread_equal' configure:2675: $? = 1 configure: program exited with status 1 configure: failed program was: #line 2660 "configure" #include "confdefs.h" char xmlInitParser(); int main() { xmlInitParser(); return 0; } configure:2696: result: no configure:2698: error: build test failed. Please check the config.log for details. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31256&edit=1
