[xmlsec] trunk build with libraries from non-standard location

Roumen Petrov xmlsec at roumenpetrov.info
Fri Apr 16 14:25:53 PDT 2010

Hi ,

Now I'm testing xmlsec with openssl 1.0.0 in following linux build 
- libxml (trunk) build outside source tree;
- libxslt (trunk) build outside source tree;
- openssl (1.0.0, non patched source) installed in non-default path, 
i.e. linker search paths and not listed in /etc/ld.so.conf;
- xmlsec (trunk) build outside source tree

The xmlsec build system is regenerated with :
- libtool 2.2.6
- automake 1.11
- autoconf  2.65
FSF version fo GNU autotools, i.e. without patches.
Note that is above build system libxml, libxslt and xmlsec directories 
contains libtool la-files.The OS is with installed la-file for 
libltdl.la. Openssl and libz don't use libtool.

..../configure \
   --with-libxml-src=path_to_libxml_build_dir \
   --with-libxslt-src=path_to_libxml_build_dir \
   --with-openssl=/usr/local/openssl/1.0.0 \
   CPPFLAGS=paths_to_libxml&libxslt_sources \

LDFLAGS is my test to avoid issue without to update makefiles - don't help

After build expected is libxmlsec1-openssl.so to list in Dynamic Section:
   NEEDED               libcrypto.so.1.0.0
Instead this xmlsec openssl crypto is linked with library found in 
system default search path.

It seems to this is issue with order of dependent libraries for crypto 
To resolve issue (see attached file xmlsec-test-liborder.patch)
The original xxx_LIBADD list:
- ../libxmlsec1.la (first)
- crypto library (second)
- libxml and libxslt
The file libxmlsec1.la list as dependent library ltdl and libtool add to 
search path /usr/lib (!). Next is path for crypto library but as path 
/usr/lib is before xmlsec module is linked to system library. If 
../libxmlsec1.la is moved to the end of xxx_LIBADD list module is linked 
to correct openssl library.

The exact link commands are visible in attached file 
a) long lines are split for easy reading
b) XXX-before.txt is with non-patched Makefile.am
c) XXX-after.txt is with patched Makefile.am
d) the path /usr/local/lib : this path is not expected . May be is from 
libxslt.la as is listed in dependency_libs before -lxml2
e) the path /usr/lib : this break correct link and I cannot found why is 
in the list. May be from libltdl ?

d) and e) look like issue with libtool as /usr/local/lib is listed in 
/etc/ld.so.conf /usr/local/lib and /usr/lib is in compiler(linker) 
default search path.

It is very difficult to me to understand where is problem as all libtool 
2.2.6 regression tests pass.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlsec-test-liborder.patch
Type: text/x-diff
Size: 1628 bytes
Desc: not available
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20100417/2ec3b2a5/attachment.patch>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xmlsec-origin-library-order-issue.diff
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20100417/2ec3b2a5/attachment.ksh>

More information about the xmlsec mailing list