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

Aleksey Sanin aleksey at aleksey.com
Tue Apr 20 16:50:51 PDT 2010


Thanks a lot for the bug report, investigation and the patch.
I confirmed the problem on my machine and also confirmed
that the patch fixes it. I've added also similar changes
for xmlsec command line tool as well :)

The patch is in gnome git.

Thanks again!

Aleksey

On 4/16/2010 2:25 PM, Roumen Petrov wrote:
> Hi ,
>
> Now I'm testing xmlsec with openssl 1.0.0 in following linux build
> environment:
> - 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=-Rpaths_to_openssl
>
> 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
> modules.
> 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
> xmlsec-origin-library-order-issue.diff
> 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.
>
>
> Roumen
>
>
>
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec


More information about the xmlsec mailing list