[xmlsec] Build errors with xmlsec-openssl.a under SPARC-Solaris

Rob Mandeville remande at alum.wpi.edu
Fri Sep 30 03:24:44 PDT 2005

I've been building xmlsec against openssl, and the library I get always 
comes out unusable.  When I build a program with it later, the linker 
complains about the library and I'm stuck with unfilled references.

Here's the setup:

uname -a = SunOS {machinename} 5.9 Generic_7171-07 sun4u sparc 
gcc version 3.3.6
xmlsec1 version 1.2.8
libxml2 version 2.6.19
openssl version 0.9.7g

options placed to ./configure on xmlsec1: --prefix={dir} 
--with-openssl={dir} --with-libxml={dir} --without-gnutls 
--without-libxslt --enable-static-linking=yes --enable-static=yes 

I've specifically been statically linking everything I can, so I can 
assume as little as possible about the machine I'm deploying this to.

Here's the relevant portion of the gmake -d output:

    Must remake target `libxmlsec1-openssl.la'.
/bin/bash ../../libtool --mode=link --tag=CC gcc  -g -O2   -o 
libxmlsec1-openssl.la -rpath /home/robm/devel/local/lib -version-info 
3:8:2  app.lo bn.lo ciphers.lo crypto.lo digests.lo evp.lo hmac.lo 
kw_aes.lo kw_des.lo kt_rsa.lo signatures.lo symkeys.lo x509.lo 
x509vfy.lo  ../libxmlsec1.la /home/robm/devel/local/lib/libcrypto.a  
-L/home/robm/devel/local/lib -R/home/robm/devel/local/lib -lxml2 -lz 
-lpthread -lm -lsocket -lnsl 
Putting child 0x00067498 (libxmlsec1-openssl.la) PID 8349 on the chain.
Live child 0x00067498 (libxmlsec1-openssl.la) PID 8349
mkdir .libs

*** Warning: Linking the shared library libxmlsec1-openssl.la against the
*** static library /home/robm/devel/local/lib/libcrypto.a is not portable!
ar cru .libs/libxmlsec1-openssl.a 
/home/robm/devel/local/lib/libcrypto.a  app.o bn.o ciphers.o crypto.o 
digests.o evp.o hmac.o kw_aes.o kw_des.o kt_rsa.o signatures.o symkeys.o 
x509.o x509vfy.o /home/robm/devel/local/lib/libcrypto.a
ar: /home/robm/devel/local/lib/libcrypto.a is in archive format - 
embedded archives are not allowed
ar: /home/robm/devel/local/lib/libcrypto.a is in archive format - 
embedded archives are not allowed
ranlib .libs/libxmlsec1-openssl.a
creating libxmlsec1-openssl.la
(cd .libs && rm -f libxmlsec1-openssl.la && ln -s 
../libxmlsec1-openssl.la libxmlsec1-openssl.la)
Got a SIGCHLD; 1 unreaped children.
Reaping winning child 0x00067498 PID 8349
Removing child 0x00067498 PID 8349 from chain.


So why is it tryng to link the entire libcrypto library to the 
libxml-openssl library?  Obviously, Sun's "ar" can't put archives into 
archives, which is causing the errors and the scrambled library.

I can fix this by removing all references to "libxmlsec1-openssl.a" from 
the Makefile, but is there a better way than hand-hacking?

Thanks in advance,


More information about the xmlsec mailing list