[xmlsec] static linking on Linux

Floodeenjr, Thomas thomas_floodeenjr at mentor.com
Tue Oct 11 07:52:28 PDT 2011


After some searching...

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

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


Now it links.

Thomas Floodeen, Jr.
Mentor Graphics BSD
720.494.1133

From: Floodeenjr, Thomas 
Sent: Tuesday, October 11, 2011 8:26 AM
To: xmlsec at aleksey.com
Subject: static linking on Linux

I am having a problem linking statically on Linux:

g++ -o ../Linux_i686_optimized/xmlsec_test ../Linux_i686_optimized/xmlsec_test.o -L../Linux_i686_optimized -L/cob/eng_infra/SOD_rhel4/infra_oss/./lib -Wl,-Bstatic -lSDDinfrasec_xml -lxml2 -lxmlsec1 -lxmlsec1-openssl -lcrypto -lz -Wl,-Bdynamic -ldl
/cob/eng_infra/SOD_rhel4/infra_oss/./lib/libxmlsec1.a(c14n.o)(.text+0x950): In function `xmlSecTransformC14NExecute':
: undefined reference to `xmlC14NExecute'
/cob/eng_infra/SOD_rhel4/infra_oss/./lib/libxmlsec1-openssl.a(libxmlsec1_openssl_la-crypto.o)(.text+0x549): In function `xmlSecOpenSSLInit':
: undefined reference to `xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms'
/cob/eng_infra/SOD_rhel4/infra_oss/./lib/libxmlsec1-openssl.a(libxmlsec1_openssl_la-kw_aes.o)(.text+0x9e9): In function `xmlSecOpenSSLKWAesExecute':
: undefined reference to `xmlSecKWAesDecode'
/cob/eng_infra/SOD_rhel4/infra_oss/./lib/libxmlsec1-openssl.a(libxmlsec1_openssl_la-kw_aes.o)(.text+0xb55): In function `xmlSecOpenSSLKWAesExecute':
: undefined reference to `xmlSecKWAesEncode'
/cob/eng_infra/SOD_rhel4/infra_oss/./lib/libxmlsec1-openssl.a(libxmlsec1_openssl_la-kw_des.o)(.text+0x71b): In function `xmlSecOpenSSLKWDes3Execute':
: undefined reference to `xmlSecKWDes3Decode'
/cob/eng_infra/SOD_rhel4/infra_oss/./lib/libxmlsec1-openssl.a(libxmlsec1_openssl_la-kw_des.o)(.text+0x843): In function `xmlSecOpenSSLKWDes3Execute':
: undefined reference to `xmlSecKWDes3Encode'
/cob/eng_infra/SOD_rhel4/infra_oss/./lib/libxmlsec1-openssl.a(libxmlsec1_openssl_la-x509.o)(.text+0x2d11): In function `xmlSecOpenSSLKeyDataX509XmlWrite':
: undefined reference to `xmlSecX509DataGetNodeContent'
collect2: ld returned 1 exit status
gmake: *** [../Linux_i686_optimized/xmlsec_test] Error 1


Any help would be appreciated.


Thomas Floodeen, Jr.
Mentor Graphics BSD
720.494.1133



More information about the xmlsec mailing list