I'm working with Tcl on a sparc solaris platform. Tcl was built with 64 bit and threads enabled.
Now I need to build OpenSSL for TLS. I have openssl 0.9.8e. I presume that I somehow need to build it for 64bit as well as for threads, so that it is compatible with TLS and Tcl.
When I try to do this, I get the error:
ld: fatal: file dhparam.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to openssl
$ ls -l *.a
-rw-r--r-- 1 lwv27 intranet 4757012 Mar 1 13:31 libcrypto.a
-rw-r--r-- 1 lwv27 intranet 730636 Mar 1 11:56 libssl.a
As you can see, the.a files are created. I then try to make tls.
Things seem to compile (though there are warnings about argument incompatibilities between some pointer to const unsigned char versus pointer to char in tls.c .
When we reach the tls link stage though, we get a long list of:
/usr/ccs/bin/ld -G -z text -o libtls1.5.1.so tls.o tlsIO.o tlsBIO.o tlsX509.o fi
xstrtod.o -L/projects/intranet/lib -lssl -lcrypto -lsocket -lnsl -L/vol/tclsrcs
ol/tcl85/tcl/unix -ltclstub8.5
Text relocation remains referenced
against symbol offset in file
<unknown> 0x8 /projects/intranet/lib/libssl.a(ssl_ciph.o)
with a long line of these followed by
ld: fatal: relocations remain against allocatable but non-writable sections
gmake: *** [libtls1.5.1.so] Error 1
Anyone have any ideas what might be going wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No. I get this problem on Solaris 10 as well when I try an build OpenSSL myself and link it in statically. I think I fixed it once but I'd need to check again. What I see in my Makefile is
CC = cc -fast -xarch=v8 -xnolibmopt
SHLIB_LD = /usr/ccs/bin/ld -G -z text -Bsymbolic
LIBS = -L/opt/openssl/lib -Bstatic -lssl -lcrypto -Bdynamic -lsocket -lnsl
The idea is to statically link the openssl libs but leave everything else. With this I was able to get a semi-static libtls1.5.0.so linked with OpenSSL 0.9.8b.
I'm working with Tcl on a sparc solaris platform. Tcl was built with 64 bit and threads enabled.
Now I need to build OpenSSL for TLS. I have openssl 0.9.8e. I presume that I somehow need to build it for 64bit as well as for threads, so that it is compatible with TLS and Tcl.
When I try to do this, I get the error:
ld: fatal: file dhparam.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to openssl
$ ls -l *.a
-rw-r--r-- 1 lwv27 intranet 4757012 Mar 1 13:31 libcrypto.a
-rw-r--r-- 1 lwv27 intranet 730636 Mar 1 11:56 libssl.a
As you can see, the.a files are created. I then try to make tls.
Things seem to compile (though there are warnings about argument incompatibilities between some pointer to const unsigned char versus pointer to char in tls.c .
When we reach the tls link stage though, we get a long list of:
/usr/ccs/bin/ld -G -z text -o libtls1.5.1.so tls.o tlsIO.o tlsBIO.o tlsX509.o fi
xstrtod.o -L/projects/intranet/lib -lssl -lcrypto -lsocket -lnsl -L/vol/tclsrcs
ol/tcl85/tcl/unix -ltclstub8.5
Text relocation remains referenced
against symbol offset in file
<unknown> 0x8 /projects/intranet/lib/libssl.a(ssl_ciph.o)
with a long line of these followed by
ld: fatal: relocations remain against allocatable but non-writable sections
gmake: *** [libtls1.5.1.so] Error 1
Anyone have any ideas what might be going wrong?
No. I get this problem on Solaris 10 as well when I try an build OpenSSL myself and link it in statically. I think I fixed it once but I'd need to check again. What I see in my Makefile is
CC = cc -fast -xarch=v8 -xnolibmopt
SHLIB_LD = /usr/ccs/bin/ld -G -z text -Bsymbolic
LIBS = -L/opt/openssl/lib -Bstatic -lssl -lcrypto -Bdynamic -lsocket -lnsl
The idea is to statically link the openssl libs but leave everything else. With this I was able to get a semi-static libtls1.5.0.so linked with OpenSSL 0.9.8b.
pat@badger:/opt/tcl/src/sparc-sun-solaris2.10/tls150% ldd libtls1.5.0.so
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
libc.so.1 => /lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd5.so.1 => /lib/libmd5.so.1
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
/platform/SUNW,Ultra-5_10/lib/libmd5_psr.so.1
pat@badger:/opt/tcl/src/sparc-sun-solaris2.10/tls150% tclsh
% load libtls1.5.0.so
% tls::version
OpenSSL 0.9.8b 04 May 2006