link fails if xml-security-c library outside default link path
Basics
Technical
Logistics
Basics
Technical
Logistics
Description
The link step fails during compilation if the xml-security-c library was installed outside of ld's default search path, due to the ordering of link options on the libtool command line:
This occurs because XMLSEC_LIBS precedes LDFLAGS on the libtool link command line, and XMLSEC_LIBS includes -lxml-security-c but not the -L option needed to find the library.
Two possible solutions:
Move XMLSEC_LIBS after LDFLAGS on the libtool link command line in xmltooling/Makefile
Add the with_xmlsec -L option to XMLSEC_LIBS in configure
The link step fails during compilation if the xml-security-c library was installed outside of ld's default search path, due to the ordering of link options on the libtool command line:
make output
Making all in xmltooling
make all-am
/bin/bash ../libtool --silent --tag=CXX --mode=link CC -mt -D_REENTRANT -g -Qoption ccfe -stabs=no%dfltlit+no%dflthlp -L/usr/local/lib -lcurl -L/opt/openssl/lib -R/opt/openssl/lib -L/opt/openssl/lib -lz -lssl -lcrypto -ldl -lsocket -lnsl -lz -L/opt/openssl/lib -lcrypto -lssl -lxml-security-c -version-info 5:2:0 -L/opt/shibboleth-sp/lib -L/opt/shibboleth-sp/lib -L/opt/shibboleth-sp/lib -L/usr/local/lib -R/usr/local/lib -R/opt/openssl/lib -o libxmltooling.la -rpath /opt/shibboleth-sp/lib AbstractAttributeExtensibleXMLObject.lo AbstractComplexElement.lo AbstractDOMCachingXMLObject.lo AbstractSimpleElement.lo AbstractXMLObject.lo exceptions.lo Lockable.lo Namespace.lo QName.lo unicode.lo XMLObjectBuilder.lo XMLToolingConfig.lo AnyElement.lo UnknownElement.lo AbstractXMLObjectMarshaller.lo AbstractXMLObjectUnmarshaller.lo HTTPRequest.lo HTTPResponse.lo SOAPClient.lo SOAPImpl.lo SOAPSchemaValidators.lo DateTime.lo NDC.lo ParserPool.lo PathResolver.lo ReloadableXMLFile.lo TemplateEngine.lo URLEncoder.lo XMLConstants.lo XMLHelper.lo ValidatorSuite.lo PThreads.lo Decrypter.lo EncryptedKeyResolver.lo Encrypter.lo EncryptionImpl.lo EncryptionSchemaValidators.lo MemoryStorageService.lo AbstractPKIXTrustEngine.lo BasicX509Credential.lo ChainingCredentialResolver.lo ChainingTrustEngine.lo CredentialCriteria.lo CredentialResolver.lo ExplicitKeyTrustEngine.lo FilesystemCredentialResolver.lo InlineKeyResolver.lo KeyInfoResolver.lo OpenSSLCryptoX509CRL.lo SecurityHelper.lo StaticPKIXTrustEngine.lo TrustEngine.lo XSECCryptoX509CRL.lo KeyInfoImpl.lo KeyInfoSchemaValidators.lo SignatureValidator.lo XMLSecSignatureImpl.lo CURLSOAPTransport.lo CurlURLInputStream.lo ReplayCache.lo StorageService.lo -lxerces-c -L/opt/shibboleth-sp/lib -llog4shib -lpthread -lnsl -lsocket -lpthread -ldl
ld: fatal: library -lxml-security-c: not found
ld: fatal: File processing errors. No output written to .libs/libxmltooling.so.5.0.2
*** Error code 1
make: Fatal error: Command failed for target `libxmltooling.la'
Current working directory /home/src/objss9/xmltooling-1.4.2/xmltooling
This occurs because XMLSEC_LIBS precedes LDFLAGS on the libtool link command line, and XMLSEC_LIBS includes -lxml-security-c but not the -L option needed to find the library.
Two possible solutions:
Move XMLSEC_LIBS after LDFLAGS on the libtool link command line in xmltooling/Makefile
Add the with_xmlsec -L option to XMLSEC_LIBS in configure