ID:               31256
 Updated by:       [EMAIL PROTECTED]
 Reported By:      caelian at gmail dot com
 Status:           Open
 Bug Type:         Compile Failure
 Operating System: FreeBSD
 PHP Version:      5.0.3
 New Comment:

-pthread is not: a) library b) libpath
As such, it will not be handled by PHP_EVAL_LIBLINE.




Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to