[xmlsec] extra defines for static linking

Roumen Petrov xmlsec at roumenpetrov.info
Sat Jun 10 08:12:57 PDT 2017


Hi ,

Please find attahced patch 0002-extra-defines-for-static-linking.patch - 
it resolves build configuration with --enable-static-linking . Tested 
for x86_64-w64-mingw32 host.

For protocol build error is
   CCLD     xmlsec1.exe
xmlsec.o: In function `xmlSecAppSignFile':
.../apps/xmlsec.c:1172: undefined reference to `__imp_xmlSecDSigNs'
.../apps/xmlsec.c:1172: undefined reference to `__imp_xmlSecNodeSignature'

No idea why only -DXMLSEC_STATIC is enough to resolve issue.


Regression tests fail but tests fail even on native linux build :

strace shows
...
futex(0x7fc64a2ccc88, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, 
"func=xmlSecPtrListAdd:file=list.c:line=287:obj=unknown:subj=xmlSecPtrListIsValid(list):error=100:assertion: 
\n", 
109func=xmlSecPtrListAdd:file=list.c:line=287:obj=unknown:subj=xmlSecPtrListIsValid(list):error=100:assertion: 

) = 109
write(2, 
"func=xmlSecKeyDataIdsRegister:file=keysdata.c:line=103:obj=aes:subj=xmlSecPtrListAdd:error=1:xmlsec 
library function failed: \n", 
126func=xmlSecKeyDataIdsRegister:file=keysdata.c:line=103:obj=aes:subj=xmlSecPtrListAdd:error=1:xmlsec 
library function failed:
) = 126
write(2, 
"func=xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms:file=dl.c:line=540:obj=aes:subj=xmlSecKeyDataIdsRegister:error=1:xmlsec"..., 
155func=xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms:file=dl.c:line=540:obj=aes:subj=xmlSecKeyDataIdsRegister:error=1:xmlsec 
library function failed:
) = 155
write(2, 
"func=xmlSecOpenSSLInit:file=crypto.c:line=332:obj=unknown:subj=xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms:error=1:xmlse"..., 
156func=xmlSecOpenSSLInit:file=crypto.c:line=332:obj=unknown:subj=xmlSecCryptoDLFunctionsRegisterKeyDataAndTransforms:error=1:xmlsec 
library function failed:
) = 156
write(2, "Error: xmlSecCryptoInit failed\n", 31Error: xmlSecCryptoInit 
failed
) = 31
write(2, "Error: xmlsec crypto intialization failed.\n", 43Error: xmlsec 
crypto intialization failed.
) = 43
write(2, "Error: initialization failed\n", 29Error: initialization failed
) = 29
fstat(1, {st_mode=S_IFREG|0644, st_size=30364, ...}) = 0
...


Regards,
Roumen

P.S. It is more easy to post patch to mail list instead to open github 
pull request.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-extra-defines-for-static-linking.patch
Type: text/x-diff
Size: 744 bytes
Desc: not available
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20170610/0445e38a/attachment.patch>


More information about the xmlsec mailing list