[xmlsec] 64-bit Linux link error

Floodeenjr, Thomas thomas_floodeenjr at mentor.com
Wed Oct 12 13:41:42 PDT 2011


Yes, this link order is from a custom dynamic library that is linking in xmlsec statically:

LINK_LIBS =  -Wl,-Bstatic -lSDDinfrasec_xml$(DBG) \
              -lxmlsec1 \
              -lxmlsec1-openssl \
              -lcrypto \
              -lxml2 \
              -lz \
              -Wl,-Bdynamic \
              -ldl


Thomas Floodeen, Jr.
Mentor Graphics BSD
720.494.1133


-----Original Message-----
From: Roumen Petrov [mailto:xmlsec at roumenpetrov.info] 
Sent: Wednesday, October 12, 2011 2:27 PM
To: Floodeenjr, Thomas
Cc: Aleksey Sanin; xmlsec at aleksey.com
Subject: Re: [xmlsec] 64-bit Linux link error

Floodeenjr, Thomas wrote:
> Aleksey,
>
> The problem was not a wrong library. The problem was that only the dynamic libraries in xmlsec are built with -fPIC. Once I added -fPIC to the CFLAGS, then the build worked.
>
> This appears to only be a problem on 64-bt Linux. 32-bit Linux and 32-bit Solaris worked for me without needed to add -fPIC or -pic.
>    
To me xmlsec build fine on 64-bit linux without to add explicitly -fFIC. 
By default configuration libtool will create static and shared libraries.
Technically  xmlsec-CRYTO objects must be before xmlsec libraries to resolve dependency and order is by example in openssl:
libxmlsec1_openssl_la_LIBADD = \
     $(OPENSSL_LIBS) \
     $(LIBXSLT_LIBS) \
     $(LIBXML_LIBS) \
     ../libxmlsec1.la \
     $(NULL)

I don't know what I miss in initial post . What is

.............
LINK_LIBS =  -Wl,-Bstatic -lSDDinfrasec_xml$(DBG) \
              -lxmlsec1 \
              -lxmlsec1-openssl \
              -lcrypto \
              -lxml2 \
              -lz \
              -Wl,-Bdynamic \
              -ldl

................
This is not related to xmlsec build process right ?
Is this post from an external build ?

> Thanks,
> -Tom
>    
[SNIP]

Roumen



More information about the xmlsec mailing list