ID:               26969
 User updated by:  liamr at umich dot edu
 Reported By:      liamr at umich dot edu
-Status:           Bogus
+Status:           Open
 Bug Type:         Compile Failure
 Operating System: Solaris 8
 PHP Version:      4.3.5RC1
 New Comment:

It fails here regardless of whether I set LDFLAGS (or any of the other
environment variables that effect the compiler).  My configure line is
currently:

./configure --disable-all --with-openssl=shared,/usr/local/openssl

generating a makefile with..

OPENSSL_SHARED_LIBADD = -lssl -lcrypto -R/usr/local/openssl/lib
-L/usr/local/openssl/lib

and causing the following compilation error..

/bin/sh /usr/local/src/php-4.3.5RC1/libtool --silent
--preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC
-I/usr/local/src/php-4.3.5RC1/include
-I/usr/local/src/php-4.3.5RC1/main -I/usr/local/src/php-4.3.5RC1
-I/usr/local/src/php-4.3.5RC1/Zend -I/usr/local/openssl/include 
-D_POSIX_PTHREAD_SEMANTICS -I/usr/local/src/php-4.3.5RC1/TSRM  -g -O2  
-o ext/openssl/openssl.la -export-dynamic -avoid-version -prefer-pic
-module -rpath /usr/local/src/php-4.3.5RC1/modules -L/usr/ucblib
-L/usr/local/gcc/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.2.1
ext/openssl/openssl.lo -lssl -lcrypto -R/usr/local/openssl/lib
-L/usr/local/openssl/lib
ld: fatal: library -lssl: not found
ld: fatal: library -lcrypto: not found
ld: fatal: File processing errors. No output written to
ext/openssl/.libs/openssl.so
make: *** [ext/openssl/openssl.la] Error 1

I've had the same problem on a Solaris 2.6 machine w/ PHP 4.3.4 and GCC
3.3.2.


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

[2004-01-19 18:48:21] [EMAIL PROTECTED]

Do NOT set LDFLAGS yourself. This works fine here.


------------------------------------------------------------------------

[2004-01-19 14:58:33] liamr at umich dot edu

Description:
------------
gcc 3.2.1, Sun's ld ( /usr/css/bin/ld ).

When building the openssl extension as a shared module, "configure"
doesn't populate OPENSSL_SHARED_LIBADD properly - the elements are
reversed, and the libraries can't be found when building.  From
"Makefile"..

OPENSSL_SHARED_LIBADD = -lssl -lcrypto -R/usr/local/openssl/lib
-L/usr/local/openssl/lib

Placing the "-lssl -lcrypto" after the link path seems to fix the
problem.  This effects 4.3.4, 4.3.5RC1. It works fine if openssl
extension is built statically into the php binary.

4.3.2 builds fine, in either case.  I haven't tried 4.3.3.  

env \
    CFLAGS="-I/usr/local/openssl/include" \
    CPPFLAGS="-I/usr/local/openssl/include" \
    CXXFLAGS="-I/usr/local/openssl/include" \
    LDFLAGS="-L/usr/local/openssl/lib" \
./configure \
    --disable-all \
    --with-openssl=shared,/usr/local/openssl



/bin/sh /usr/local/src/php-4.3.5RC1/libtool --silent
--preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC
-I/usr/local/src/php-4.3.5RC1/include
-I/usr/local/src/php-4.3.5RC1/main -I/usr/local/src/php-4.3.5RC1
-I/usr/local/src/php-4.3.5RC1/Zend -I/usr/local/openssl/include 
-I/usr/local/openssl/include -D_POSIX_PTHREAD_SEMANTICS
-I/usr/local/src/php-4.3.5RC1/TSRM  -I/usr/local/openssl/include   -o
ext/openssl/openssl.la -export-dynamic -avoid-version -prefer-pic
-module -rpath /usr/local/src/php-4.3.5RC1/modules -L/usr/ucblib
-L/usr/local/gcc/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.2.1
ext/openssl/openssl.lo -lssl -lcrypto -R/usr/local/openssl/lib
-L/usr/local/openssl/lib
ld: fatal: library -lssl: not found
ld: fatal: library -lcrypto: not found
ld: fatal: File processing errors. No output written to
ext/openssl/.libs/openssl.so
make: *** [ext/openssl/openssl.la] Error 1




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26969&edit=1

Reply via email to