Errors building with 2.9.4
Posted: Mon Feb 08, 2021 11:41 am
I installed v2.9.4, rebuilt all system files, created a project, and imported my existing MOD54415 project from v2.9.3. The project compiles without errors, but the linker throws a lot of "undefined reference" errors to functions in library cryptolib.a (see below).
The undefined functions below appear to be defined in a large #if defined...#elseif defined... macro in file c:\nburn\system\cryptolib\wolfcrypt\src\wc_port.c. I suspect that none of labels tested in the macro are #defined.
Eclipse output:
C:\nburn\lib\cryptolib.a(wc_port.o): In function `wc_InitAndAllocMutex':
C:\nburn\system\cryptolib/wolfcrypt/src/wc_port.c:613: undefined reference to `wc_InitMutex'
C:\nburn\lib\cryptolib.a(ecc.o): In function `ecc_mul2add':
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:8987: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:8984: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ecc.o):C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: more undefined references to `wc_UnLockMutex' follow
C:\nburn\lib\cryptolib.a(ecc.o): In function `wc_ecc_mulmod_ex':
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9116: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9112: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ecc.o):C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: more undefined references to `wc_UnLockMutex' follow
C:\nburn\lib\cryptolib.a(ecc.o): In function `wc_ecc_fp_free':
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9215: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9221: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9222: undefined reference to `wc_FreeMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9211: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9215: undefined reference to `wc_LockMutex'
C:\nburn\lib\cryptolib.a(random.o): In function `wc_GenerateSeed':
C:\nburn\system\cryptolib/wolfcrypt/src/random.c:1500: undefined reference to `my_rng_seed_gen'
C:\nburn\lib\cryptolib.a(asn.o): In function `ValidateDate':
C:\nburn\system\cryptolib/wolfcrypt/src/asn.c:5858: undefined reference to `my_time'
C:\nburn\lib\cryptolib.a(asn.o): In function `wc_GetTime':
C:\nburn\system\cryptolib/wolfcrypt/src/asn.c:5929: undefined reference to `my_time'
C:\nburn\lib\cryptolib.a(asn.o): In function `SetValidity':
C:\nburn\system\cryptolib/wolfcrypt/src/asn.c:11067: undefined reference to `my_time'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_CertManagerFree.part.0':
C:\nburn\system\cryptolib/src/ssl.c:3461: undefined reference to `wc_FreeMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `AlreadySigner.part.1':
C:\nburn\system\cryptolib/src/ssl.c:4398: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4417: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4417: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_CertManagerNew_ex':
C:\nburn\system\cryptolib/src/ssl.c:3406: undefined reference to `wc_InitMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_CertManagerUnloadCAs':
C:\nburn\system\cryptolib/src/ssl.c:3680: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:3685: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetCA':
C:\nburn\system\cryptolib/src/ssl.c:4540: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4557: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetCAByName':
C:\nburn\system\cryptolib/src/ssl.c:4575: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4588: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `AddCA':
C:\nburn\system\cryptolib/src/ssl.c:4875: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4878: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4875: undefined reference to `wc_LockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_Init':
C:\nburn\system\cryptolib/src/ssl.c:5023: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/src/ssl.c:5034: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:5040: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_Cleanup':
C:\nburn\system\cryptolib/src/ssl.c:12139: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12148: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12154: undefined reference to `wc_FreeMutex'
C:\nburn\system\cryptolib/src/ssl.c:12148: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetSessionClient':
C:\nburn\system\cryptolib/src/ssl.c:12273: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12298: undefined reference to `LowResTimer'
C:\nburn\system\cryptolib/src/ssl.c:12310: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12310: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetSession':
C:\nburn\system\cryptolib/src/ssl.c:12400: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12420: undefined reference to `LowResTimer'
C:\nburn\system\cryptolib/src/ssl.c:12433: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12433: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `SetSession':
C:\nburn\system\cryptolib/src/ssl.c:12582: undefined reference to `LowResTimer'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetDeepCopySession':
C:\nburn\system\cryptolib/src/ssl.c:12463: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12485: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `AddSession':
C:\nburn\system\cryptolib/src/ssl.c:12682: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12682: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12743: undefined reference to `LowResTimer'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `InitSSL_Ctx':
C:\nburn\system\cryptolib/src/internal.c:1641: undefined reference to `wc_InitMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `SSL_CTX_RefCount':
C:\nburn\system\cryptolib/src/internal.c:4827: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/internal.c:4839: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/internal.c:4839: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `FreeSSL_Ctx':
C:\nburn\system\cryptolib/src/internal.c:1925: undefined reference to `wc_FreeMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `CreateTicket':
C:\nburn\system\cryptolib/src/internal.c:26181: undefined reference to `LowResTimer'
collect2.exe: error: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 31649 ms.
The undefined functions below appear to be defined in a large #if defined...#elseif defined... macro in file c:\nburn\system\cryptolib\wolfcrypt\src\wc_port.c. I suspect that none of labels tested in the macro are #defined.
Eclipse output:
C:\nburn\lib\cryptolib.a(wc_port.o): In function `wc_InitAndAllocMutex':
C:\nburn\system\cryptolib/wolfcrypt/src/wc_port.c:613: undefined reference to `wc_InitMutex'
C:\nburn\lib\cryptolib.a(ecc.o): In function `ecc_mul2add':
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:8987: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:8984: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ecc.o):C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9075: more undefined references to `wc_UnLockMutex' follow
C:\nburn\lib\cryptolib.a(ecc.o): In function `wc_ecc_mulmod_ex':
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9116: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9112: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ecc.o):C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9169: more undefined references to `wc_UnLockMutex' follow
C:\nburn\lib\cryptolib.a(ecc.o): In function `wc_ecc_fp_free':
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9215: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9221: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9222: undefined reference to `wc_FreeMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9211: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/wolfcrypt/src/ecc.c:9215: undefined reference to `wc_LockMutex'
C:\nburn\lib\cryptolib.a(random.o): In function `wc_GenerateSeed':
C:\nburn\system\cryptolib/wolfcrypt/src/random.c:1500: undefined reference to `my_rng_seed_gen'
C:\nburn\lib\cryptolib.a(asn.o): In function `ValidateDate':
C:\nburn\system\cryptolib/wolfcrypt/src/asn.c:5858: undefined reference to `my_time'
C:\nburn\lib\cryptolib.a(asn.o): In function `wc_GetTime':
C:\nburn\system\cryptolib/wolfcrypt/src/asn.c:5929: undefined reference to `my_time'
C:\nburn\lib\cryptolib.a(asn.o): In function `SetValidity':
C:\nburn\system\cryptolib/wolfcrypt/src/asn.c:11067: undefined reference to `my_time'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_CertManagerFree.part.0':
C:\nburn\system\cryptolib/src/ssl.c:3461: undefined reference to `wc_FreeMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `AlreadySigner.part.1':
C:\nburn\system\cryptolib/src/ssl.c:4398: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4417: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4417: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_CertManagerNew_ex':
C:\nburn\system\cryptolib/src/ssl.c:3406: undefined reference to `wc_InitMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_CertManagerUnloadCAs':
C:\nburn\system\cryptolib/src/ssl.c:3680: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:3685: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetCA':
C:\nburn\system\cryptolib/src/ssl.c:4540: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4557: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetCAByName':
C:\nburn\system\cryptolib/src/ssl.c:4575: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4588: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `AddCA':
C:\nburn\system\cryptolib/src/ssl.c:4875: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4878: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:4875: undefined reference to `wc_LockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_Init':
C:\nburn\system\cryptolib/src/ssl.c:5023: undefined reference to `wc_InitMutex'
C:\nburn\system\cryptolib/src/ssl.c:5034: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:5040: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `wolfSSL_Cleanup':
C:\nburn\system\cryptolib/src/ssl.c:12139: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12148: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12154: undefined reference to `wc_FreeMutex'
C:\nburn\system\cryptolib/src/ssl.c:12148: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetSessionClient':
C:\nburn\system\cryptolib/src/ssl.c:12273: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12298: undefined reference to `LowResTimer'
C:\nburn\system\cryptolib/src/ssl.c:12310: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12310: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetSession':
C:\nburn\system\cryptolib/src/ssl.c:12400: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12420: undefined reference to `LowResTimer'
C:\nburn\system\cryptolib/src/ssl.c:12433: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12433: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `SetSession':
C:\nburn\system\cryptolib/src/ssl.c:12582: undefined reference to `LowResTimer'
C:\nburn\lib\cryptolib.a(ssl.o): In function `GetDeepCopySession':
C:\nburn\system\cryptolib/src/ssl.c:12463: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12485: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(ssl.o): In function `AddSession':
C:\nburn\system\cryptolib/src/ssl.c:12682: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12682: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12743: undefined reference to `LowResTimer'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/ssl.c:12897: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `InitSSL_Ctx':
C:\nburn\system\cryptolib/src/internal.c:1641: undefined reference to `wc_InitMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `SSL_CTX_RefCount':
C:\nburn\system\cryptolib/src/internal.c:4827: undefined reference to `wc_LockMutex'
C:\nburn\system\cryptolib/src/internal.c:4839: undefined reference to `wc_UnLockMutex'
C:\nburn\system\cryptolib/src/internal.c:4839: undefined reference to `wc_UnLockMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `FreeSSL_Ctx':
C:\nburn\system\cryptolib/src/internal.c:1925: undefined reference to `wc_FreeMutex'
C:\nburn\lib\cryptolib.a(internal.o): In function `CreateTicket':
C:\nburn\system\cryptolib/src/internal.c:26181: undefined reference to `LowResTimer'
collect2.exe: error: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 31649 ms.