Re: Third Party lib.so
| From: | Garry Taylor | Date: | Mon, 09 May 2011 08:38:18 +0000 |
| Subject: | Re: Third Party lib.so | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8238@lists.php.net to get a copy of this message | ||
On 07/05/2011 20:08, Ángel González wrote:
Garry Taylor wrote:/make /bin/sh /home/gizard/PHP/php-5.3.6/ext/hello/libtool --mode=compile cc -I. -I/home/gizard/PHP/php-5.3.6/ext/hello -DPHP_ATOM_INC -I/home/gizard/PHP/php-5.3.6/ext/hello/include -I/home/gizard/PHP/php-5.3.6/ext/hello/main -I/home/gizard/PHP/php-5.3.6/ext/hello -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O0 -c /home/gizard/PHP/php-5.3.6/ext/hello/hello.c -o hello.lo cc -I. -I/home/gizard/PHP/php-5.3.6/ext/hello -DPHP_ATOM_INC -I/home/gizard/PHP/php-5.3.6/ext/hello/include -I/home/gizard/PHP/php-5.3.6/ext/hello/main -I/home/gizard/PHP/php-5.3.6/ext/hello -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O0 -c /home/gizard/PHP/php-5.3.6/ext/hello/hello.c -fPIC -DPIC -o .libs/hello.o /bin/sh /home/gizard/PHP/php-5.3.6/ext/hello/libtool --mode=link cc -DPHP_ATOM_INC -I/home/gizard/PHP/php-5.3.6/ext/hello/include -I/home/gizard/PHP/php-5.3.6/ext/hello/main -I/home/gizard/PHP/php-5.3.6/ext/hello -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O0 -o hello.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/gizard/PHP/php-5.3.6/ext/hello/modules hello.lo pcplib.lo libtool: link: `pcplib.lo' is not a valid libtool object make: *** [hello.la] Error 1 / Here is my M4 Config /PHP_ARG_ENABLE(hello, whether to enable Hello World support, [ --enable-hello Enable Hello World support]) if test "$PHP_HELLO" = "yes"; then PHP_ADD_LIBPATH("/home/gizard/paf-pcpplus/pcplus/lib", PCPLIB_SHARED_LIBADD) AC_DEFINE(HAVE_HELLO, 1, [Whether you have Hello World]) PHP_NEW_EXTENSION(hello, hello.c pcplib.o, $ext_shared) PHP_SUBST(PCPLIB_SHARED_LIBADD) fi/ / /To compile I am running/ phpize && ./configure && make clean && make && cp modules/hello.so /usr/local/lib/php/extensions/debug-non-zts-20090626/hello.so && /etc/init.d/apache2 force-reload && tail -f /var/log/apache2/error.log// /I appears that the pcplib.lo file is not created and therefore error's when libtool tries to link them. Any help you can give... GizHi thanx for the info.. I have just realised that the lib is a pcplib.o and not a shared object pcplib.so (uuppps :D). Can you give any pointers as to how I can include the "LSB relocatable" pcplib.o file. Ps I have done the above and got the following error: debian:/home/gizard/PHP/php-5.3.6/ext/hello# make /bin/sh /home/gizard/PHP/php-5.3.6/ext/hello/libtool --mode=link cc -DPHP_ATOM_INC -I/home/gizard/PHP/php-5.3.6/ext/hello/include -I/home/gizard/PHP/php-5.3.6/ext/hello/main -I/home/gizard/PHP/php-5.3.6/ext/hello -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/home/gizard/paf-pcpplus/pcplus/lib/ -DHAVE_CONFIG_H -g -O0 -o hello.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/gizard/PHP/php-5.3.6/ext/hello/modules hello.lo -lpcplib cc -shared .libs/hello.o -lpcplib -Wl,-soname -Wl,hello.so -o .libs/hello.so */usr/bin/ld: cannot find -lpcplib* collect2: ld returned 1 exit status make: *** [hello.la] Error 1Listing it with the source files should do the trick, although it's a strange way of providing a library. Don't you have the corresponding .c file? PHP_NEW_EXTENSION(hello, hello.c pcplib.o, $ext_shared) Hi González, thanx for the feedback. I have updated but I am now getting the following error.