Two problems in the Quickstart Guide
Closed this issue · 2 comments
yttriumzz commented
-
mbedtls builds static libraries by default, which will cause an opentee build error.
build fail:
/usr/bin/ld: //usr/local/lib/libmbedcrypto.a(bignum.o): relocation R_X86_64_PC32 against symbol `mbedtls_mpi_free' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status Makefile:815: recipe for target 'libInternalApi.la' failed make[1]: *** [libInternalApi.la] Error 1 make[1]: Leaving directory '/home/code/VirtualTEE/build/emulator' Makefile:327: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1
solution:
wget https://github.com/ARMmbed/mbedtls/archive/refs/tags/v3.1.0.tar.gz tar -xf v3.1.0.tar.gz && cd mbedtls-3.1.0 cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On . # <-- this command causes mbedtls to build a dynamic library. make -j4 && make install
-
opentee/TAs/example_conversion/sign_ecdsa_256.c
encoding errorbuild fail:
../../opentee/TAs/example_conversion/sign_ecdsa_256.c: In function ‘TA_InvokeCommandEntryPoint’: ../../opentee/TAs/example_conversion/sign_ecdsa_256.c:137:2: error: case label does not reduce to an integer constant case SIGN_ECDSA_256_SIGN: ^~~~ Makefile:949: recipe for target 'example_conversion/libsign_ecdsa_256_la-sign_ecdsa_256.lo' failed make[1]: *** [example_conversion/libsign_ecdsa_256_la-sign_ecdsa_256.lo] Error 1
solution:
opentee/TAs/example_conversion/sign_ecdsa_256_ctrl.h, line26
- const uint32_t SIGN_ECDSA_256_SIGN = 1234; + #define SIGN_ECDSA_256_SIGN 1234
Finally, thanks for the recent update ! 😘
TanelDettenborn commented
Thank you and it is a good catch! I will update a quickstart guide as soon as possible and fixing compile error.
Still processing recent update and therefore documentation might not yet be fully up to date.
TanelDettenborn commented
sign_ecdsa_256_ctrl.h
Open-TEE/TAs@e0cd4a2
Quickstart guide
079544f