Re: pthread building problem

From: Date: Fri, 14 Sep 2001 10:50:22 +0000
Subject: Re: pthread building problem
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65924@lists.php.net to get a copy of this message
> Hi, > > I am developing an external php module which uses the pthread on > FreeBsd. It works well when compiling a standalone php binary. But if I > use the --with-apxs option to build the libphp4.so, then I got the > following error: > > Syntax error on line 205 of /home/szhang/local/conf/httpd.conf: > Cannot load /home/szhang/local/libexec/libphp4.so into server: > /home/szhang/local/libexec/libphp4.so: Undefined symbol "pthread_gets > pecific" /home/szhang/local/bin/apachectl start: httpd could not be > started > > > Could anyone let me know where to modify in order for it to link to > pthread? I have added -pthread to nearly everywhere I can, but I am > still getting the same problem. My guess is that you have multiple versions of libpthread.so on your system. When you link your application, not all components are using the same libpthread. When compiled, your apache instance (or module being used by you apache instance) is using one pthread library, probably /usr/lib, and your extension is using another (/usr/local/lib/libpthread.so ?), and the symbols are different. This is a huge problem with UNIX shared libraries.

« previous php.dev (#65924) next »