Topic: Linking Error in Xcode

Hello,

I have built wolfSSL with the default "user_settings.h" (wolfs/IDE/XCODE).
But I compile my app with Xcode12 and see the following error messages in logs.

Undefined symbols for architecture arm64:
"_poly1305_blocks", referenced from: _wc_Poly1305Update in libwolfSSL.a (poly1305.o)
"_wc_Chacha_SetKey" referenced from: _SetKeysSide in libwolfSSL.a (keys.o)
........

If I undefined "WOLFSSL_ARMASM" in the user_settings.h, I can compile my app.
Could you tell me why this occurs? I just want to know why and the better solution for this.

Share

Re: Linking Error in Xcode

Hi sEdwards,

You will find those missing functions in wolfcrypt/port/arm/armv8-poly1305.c. Make sure you are including this file in your project.

Thanks,
David Garske, wolfSSL

Share

Re: Linking Error in Xcode

Hi David,

Thank you for your reply.

After including missing files, those errors are gone. But I have some new error messages now.


Undefined symbols for architecture arm64:
"_wc_AesSetKey", referenced from:
_SetKeysSide in libwolfssl.a (keys.o)
"_wc_AesGcmSetKey", referenced from:
_SetKeysSide in libwolfssl.a (keys.o)
_wc_Gmac in libwolfssl.a (aes.o)
_wc_GmacVerify in libwolfssl.a (aes.o)
_wc_GmacSetKey in libwolfssl.a (aes.o)
"_wc_AesGcmDecrypt", referenced from:
_ProcessReply in libwolfssl.a (internal.o)
_DecrptTls13 in libwolfssl.a(tls13.o)
_wc_GmacVerify in libwolfssl.a (aes.o)
"_wc_Chacha_SetKey", referenced from:
_SetKeysSide in libwolfssl.a (keys.o)
"_wc_AesCbcDecrpt", referenced from:
_ProcessReply in libwolfssl.a (internal.o)
"_wc_AesGcmEncrypt", referenced from:
_BuildMessage in libwolfssl.a (internal.o)
_wc_AesGcmEncrypt_ex in libwolfssl.a (aes.o)
_wc_GmacUpdate in libwolfssl.a (aes.o)
"_wc_AesCbcEncrypt", referenced from:
_BuildMessage in libwolfssl.a (internal.o)
"_wc_Chacha_SetIV", referenced from:
_BuildMessage in libwolfssl.a (internal.o)
_ProcessReply in libwolfssl.a (internal.o)
_DecryptTls13 in libwolfssl.a (tls13.o)
_BuildTls13Message in libwolfssl.a (tls13.o)
"_wc_Chacha_Process", referenced from:
_BuildMessage in libwolfssl.a (internal.o)
_ProcessReply in libwolfssl.a (internal.o)
_DecryptTls13 in libwolfssl.a (tls13.o)
_BuildTls13Message in libwolfssl.a (tls13.o)

Share

Re: Linking Error in Xcode

Hi sEdwards,

Look in wolfcrypt/src/port/arm and you will see addition algorithm specific .c files you will need to include for Aarch64.


Thanks,
David Garske, wolfSSL

Share

Re: Linking Error in Xcode

Hi David,

I added the files, but unfortunately I still get an error message.

No member named 'over' in 'struct ChaCha'
armv8-chacha.c

Share