From: Lars Hecking (lhecking@nmrc.ucc.ie)
Date: Thu Aug 15 2002 - 11:07:12 EDT
Came across this while trying to compile php-latest, and I can't get a grip
on the problem.
Environment: Solaris 8 02/02, 13/08/02 patches
Compiler: gcc 2.95.3, Sun Forte 6 update 2
/usr/ccs/bin tools. i.e. not GNU binutils
OpenSSL: 0.9.6g; libs installed in /usr/lib, successful "make test"
Take the following minimum code. This is basically the openssl test from
php's configure:
$ cat ssltest.c
char SSL_CTX_set_ssl_version();
int main() {
SSL_CTX_set_ssl_version()
; return 0; }
$ gcc -o ssltest ssltest.c -lssl
Undefined first referenced
symbol in file
SSL_CTX_set_ssl_version /var/tmp/ccUVZq9B.o
ld: fatal: Symbol referencing errors. No output written to ssltest
collect2: ld returned 1 exit status
The same happens with cc instead of gcc. The same happens regardless
whether I compile openssl with gcc or cc. SSL_CTX_set_ssl_version is
present in both the static and the shared library, so it's not a
matter of missing/symbol symbol tables:
$ cd /usr/lib
$ /usr/ccs/bin/nm libssl.a |grep SSL_CTX_set_ssl_version
[30] | 572| 128|FUNC |GLOB |0 |2 |SSL_CTX_set_ssl_version
$ /usr/ccs/bin/nm libssl.so.0.9.6 | grep SSL_CTX_set_ssl_version
[853] | 121396| 128|FUNC |GLOB |0 |11 |SSL_CTX_set_ssl_version
Now the icing on the cake: this works flawlessly on a Solaris 7 system.
Same compilers, same openssl version.
More icing: when I copy the openssl libs from the Solaris 7 system (where
it all works) to the Solaris 8 system, the compile still fails.
It's driving me nuts. I am absolutely unable to establish where exactly
the problem is: compilers, linker, openssl, auxiliary tools (ar etc.).
It would be beneficial to have a verbose flag for the linker, but there
doesn't seem to be one (GNU ld OTOH has one).
Any ideas?
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:47 EDT