Hi All, I would really appreciate any help from you. Briefly, I need to build a C++ extension into libphp4.so(on Solaris 2.6), I manually built it but Apache failed to start. It core dumped, and logged "SIGTERM".
I have successfully built a very simple foo.c into libphp4.so, but when I changed the foo.c to another extension cppfoo.cpp and tried to add this new extension, I ran into troubles:
First problem is the "make" itself won't work, for a .cpp file, it skipped the compile part and only do the link. So I did it manually with CC:
/bin/sh /home/lwen/php-4.0.4/libtool --silent --mode=compile CC -I. -I/home/lwen/php-4.0.4/ext/foo -I/home/lwen/php-4.0.4/main -I/home/lwen/php-4.0.4 -I/usr/pdc/apache/include -I/home/lwen/php-4.0.4/Zend -I/home/lwen/php-4.0.4/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=260 -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -D_REENTRANT -DSSL_EXPERIMENTAL_PERDIRCA_IGNORE -DXML_BYTE_ORDER=21 -g -c foocpp.cpp
and then link:
/bin/sh /home/lwen/php-4.0.4/libtool --silent --mode=link cc -I. -I/home/lwen/php-4.0.4/ext/foo -I/home/lwen/php-4.0.4/main -I/home/lwen/php-4.0.4 -I/usr/pdc/apache/include -I/home/lwen/php-4.0.4/Zend -I/home/lwen/php-4.0.4/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=260 -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -D_REENTRANT -DSSL_EXPERIMENTAL_PERDIRCA_IGNORE -DXML_BYTE_ORDER=21 -g -o libfoocpp.la foocpp.lo
They all built without error. I then go to the php directory and do make, and make install.
Everything went through fine, but Apache just wouldn't start, with core dump and SIGTERM error.
If I take this foocpp extension out, it starts fine.
I also tried to build it as a individual dynamic module (foocpp.so) using apxs, it build successfully, but apache won't start either, and nothing was written to the log file (default level INFO).
Could anyone help me out? I really appreciate it!
Thanks,
- Leana