[xmlsec] Building xmlsec for iOs
84.le0n
84.le0n at gmail.com
Wed Sep 7 23:40:46 PDT 2011
Hi aleksey,
I'm trying again to compile for iOS but I need a check about a symbol I've found.
I'm trying to concentrate and resolve the problem on _xmlSecOpenSSLAppInit that is undefined in apps/crypto.c (as many other in this file) but I've found that this symbol is defined in another header.
In fact I've noticed that _xmlSecOpenSSLAppInit is undefined inside
src/openssl/libxmlsec1_openssl_la-crypto.o
and is undefined in
apps/crypto.o (that stops building)
but is defined inside
src/openssl/libxmlsec1_openssl_la-apps.o !
Can you check if this is the normal state of symbols definition in your correct builds ?
Maybe makefile rules doesn't have the needed -l ? Could it depend on configure switch?
Thank you!
Il giorno 18/ago/2011, alle ore 16:50, Aleksey Sanin <aleksey at aleksey.com> ha scritto:
> Sorry, I am not familiar with iOS compilation so it is hard for me to say
> something definite but it looks like you there is a problem with function
> name mangling.
> Aleksey
>
> On 8/18/11 5:34 AM, 84.le0n wrote:
>>
>>
>> Hi all,
>> after some test now I get another error, during make phase.
>>
>> These are the steps I've done, configuring for "build i386-apple-darwin10" and "host i686-apple-darwin10" (for iOs simulator included in SDK) :
>> 1) make of static libxml2.a (not using original libxml2.dylib because xmlsec requires newer version that that offered by Apple )
>> 2) using this libxml2.a static lib I've built a static libxslt.a , version 1.1.26
>> 3) then I've builded openssl libs (libcrypto.a and libssl.a), version 1.0.0.d
>> 4) the last is xmlsec version 1.2.18, configured as follow
>>
>> ------------------ from here ------------------------
>>
>> ./configure \
>> --prefix=<destination_path> \
>> --build=i386-apple-darwin10 \
>> --host=i686-apple-darwin10 \
>> --enable-static \
>> --enable-static-linking \
>> --disable-shared \
>> --disable-crypto-dl \
>> --disable-apps-crypto-dl \
>> --disable-mscrypto \
>> --without-nspr \
>> --without-nss \
>> --without-seamonkey-ver \
>> --without-mozilla-ver \
>> --without-gcrypt \
>> --without-gnutls \
>> --with-default-crypto=openssl \
>> --with-libxml=<path_of_my_libxml2> \
>> --with-libxslt=<path_of_my_libxslt> \
>> --with-openssl=<path_of_my_openssl>
>>
>> ------------------ to here ------------------------
>>
>> The configuration runs without problems and finds my libs correctly, but doing make I get this error
>>
>> ------------------ from here ------------------------
>>
>> Undefined symbols:
>> "_xmlSecOpenSSLAppDefaultKeysMngrInit", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrInit in crypto.o
>> "_xmlSecOpenSSLTransformDes3CbcGetKlass", referenced from:
>> _xmlSecAppEncryptTmpl in xmlsec.o
>> "_xmlSecOpenSSLAppKeysMngrCertLoad", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrCertLoad in crypto.o
>> "_xmlSecOpenSSLAppDefaultKeysMngrLoad", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrLoad in crypto.o
>> "_xmlSecOpenSSLAppDefaultKeysMngrSave", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrSave in crypto.o
>> "_xmlSecOpenSSLAppKeyLoad", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrPkcs12KeyLoad in crypto.o
>> _xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad in crypto.o
>> "_xmlSecOpenSSLShutdown", referenced from:
>> _xmlSecAppCryptoShutdown in crypto.o
>> "_xmlSecOpenSSLAppKeyCertLoad", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad in crypto.o
>> "_xmlCheckVersion", referenced from:
>> _main in xmlsec.o
>> "_xmlSecOpenSSLAppDefaultKeysMngrAdoptKey", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrKeyGenerate in crypto.o
>> _xmlSecAppCryptoSimpleKeysMngrBinaryKeyLoad in crypto.o
>> _xmlSecAppCryptoSimpleKeysMngrPkcs12KeyLoad in crypto.o
>> _xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad in crypto.o
>> "_xmlSecOpenSSLAppInit", referenced from:
>> _xmlSecAppCryptoInit in crypto.o
>> "_xmlSecOpenSSLTransformHmacSha1GetKlass", referenced from:
>> _xmlSecAppSignTmpl in xmlsec.o
>> "_xmlSecOpenSSLTransformSha1GetKlass", referenced from:
>> _xmlSecAppSignTmpl in xmlsec.o
>> "_xmlSecOpenSSLInit", referenced from:
>> _xmlSecAppCryptoInit in crypto.o
>> "_xmlSecOpenSSLAppGetDefaultPwdCallback", referenced from:
>> _xmlSecAppCryptoSimpleKeysMngrPkcs12KeyLoad in crypto.o
>> _xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad in crypto.o
>> "_xmlSecOpenSSLAppShutdown", referenced from:
>> _xmlSecAppCryptoShutdown in crypto.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> make[2]: *** [xmlsec1] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>>
>>
>> ------------------ to here ------------------------
>>
>>
>> The strange thing is that I can't find these symbols with the underscore, but without initial underscore I can find many results, an example :
>>
>> ------------------ from here ------------------------
>> -------------- without underscore -------------
>> $ grep -Rin xmlSecOpenSSLAppGetDefaultPwdCallback ./
>> Binary file ./xmlsec1-1.2.18/apps/crypto.o matches
>> ./xmlsec1-1.2.18/include/xmlsec/openssl/app.h:119:XMLSEC_CRYPTO_EXPORT void* xmlSecOpenSSLAppGetDefaultPwdCallback(void);
>> ./xmlsec1-1.2.18/include/xmlsec/openssl/symbols.h:109:#define xmlSecCryptoAppGetDefaultPwdCallback xmlSecOpenSSLAppGetDefaultPwdCallback
>> Binary file ./xmlsec1-1.2.18/src/openssl/.libs/libxmlsec1-openssl.a matches
>> ./xmlsec1-1.2.18/src/openssl/app.c:1531: * xmlSecOpenSSLAppGetDefaultPwdCallback:
>> ./xmlsec1-1.2.18/src/openssl/app.c:1538:xmlSecOpenSSLAppGetDefaultPwdCallback(void) {
>> ./xmlsec1-1.2.18/src/openssl/crypto.c:250: gXmlSecOpenSSLFunctions->cryptoAppDefaultPwdCallback = (void*)xmlSecOpenSSLAppGetDefaultPwdCallback();
>> Binary file ./xmlsec1-1.2.18/src/openssl/libxmlsec1_openssl_la-app.o matches
>> Binary file ./xmlsec1-1.2.18/src/openssl/libxmlsec1_openssl_la-crypto.o matches
>>
>>
>> -------------- with underscore -------------
>> $ grep -Rin _xmlsecopensslappgetdefault ./
>> Binary file ./xmlsec1-1.2.18/apps/crypto.o matches
>> Binary file ./xmlsec1-1.2.18/src/openssl/.libs/libxmlsec1-openssl.a matches
>> Binary file ./xmlsec1-1.2.18/src/openssl/libxmlsec1_openssl_la-app.o matches
>> Binary file ./xmlsec1-1.2.18/src/openssl/libxmlsec1_openssl_la-crypto.o matches
>>
>> ------------------ to here ------------------------
>>
>> Why I obtain this error ?
>> Where are defined that symbols with underscore ?
>> What can I do to correct this error ?
>>
>>
>> Thank you for your help!
>>
>>
>>
>> _______________________________________________
>> xmlsec mailing list
>> xmlsec at aleksey.com
>> http://www.aleksey.com/mailman/listinfo/xmlsec
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20110908/38b33ad0/attachment-0001.html>
More information about the xmlsec
mailing list