Hello,
I've been trying for several days now to compile php with curl support. Below is a quick scenario of what I've been through so far.
I compiled and installed openssl into /usr/local/ssl/. /usr/local/ssl/lib contains the (static) libraries, crypto and ssl - good. This all worked dandy.
Now, I compiled cURL with the configure option: --with-ssl=/usr/local/ssl. This worked good. I did a make install, and found the curl binary in /usr/local/bin/curl. The (static and shared) curl libraries were in /usr/local/lib. I was able to connect-to and retrieve pages from a secure(https) server.
So far, very good.
Now I went to compile php with the configure option --with-curl. Configure decided to use the shared curl library, and returned errors:
gcc -o conftest -g -O2 <snip this line>
/usr/local/lib/libcurl.so: undefined reference to SSL_set_fd'
SSL_set_connect_state'
/usr/local/lib/libcurl.so: undefined reference to
/usr/local/lib/libcurl.so: undefined reference to SSL_CTX_free'
X509_free'
/usr/local/lib/libcurl.so: undefined reference to
That is a few, there are about 20 lines of SSL_* undefined references.
I deleted the shared curl library, and did a make distclean and a configure again on php. It seemed to work okay this time - no errors. It evern compiled and installed okay.
Now I go to compile apache. At the (I think) very end of the compile, when it goes to link the httpd binary, I get this:
gcc -I/usr/home/david/apache/php-4.0.2 -I/usr/home/david/apache/php-4.0.2/main -I/usr/home/david/apache/php-4.0.2/main -I/usr/home/david/apache/php-4.0.2/Zend -I/usr/home/david/apache/php-4.0.2/Zend -I/usr/home/david/apache/php-4.0.2 -DUSE_EXPAT -I./lib/expat-lite ./apaci
-rdynamic \
-o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php4/libphp4.a main/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -Wl,-rpath,/usr/local/lib -rdynamic -L/usr/local/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -ldl -lgd -L/usr/local/ssl/lib -lssl -lcrypto -lcurl -lresolv -lm -ldl -lresolv -ldl
/usr/local/lib/libcurl.a(getdate.o): In function gd_parse':
gd_parse'
/opt/TWWfsw/bison/share/bison.simple:249: multiple definition of
modules/php4/libphp4.a(parsedate.o):/usr/lib/bison.simple:249: first defined here
/usr/local/lib/libcurl.a(url.o): In function urlfree':
SSL_shutdown'
/usr/home/david/apache/curl-7.2.1/lib/url.c:149: undefined reference to
/usr/home/david/apache/curl-7.2.1/lib/url.c:150: undefined reference to SSL_set_connect_state'
SSL_free'
/usr/home/david/apache/curl-7.2.1/lib/url.c:152: undefined reference to
/usr/home/david/apache/curl-7.2.1/lib/url.c:156: undefined reference to `SSL_CTX_free'
There are a few more, but this should be enough.
Okie, dokie. I've done everything I can think of. Does anyone have any ideas on what is going on here?
If you need more info, please ask. I'll suply as much as I have.
PHP Version: 4.0.2
Apache version: 1.3.12
cURL Version: 7.2.1
OpenSSL Version: 0.9.6
OS Version: BSD/OS tech 4.0.1 BSDI BSD/OS 4.0.1
Thank you for your help,
David Newhall