Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: symbol(s) not found for architecture arm64 #9895

Open
teshua opened this issue Jan 11, 2025 · 1 comment
Open

ld: symbol(s) not found for architecture arm64 #9895

teshua opened this issue Jan 11, 2025 · 1 comment
Assignees

Comments

@teshua
Copy link

teshua commented Jan 11, 2025

System information

macos
Mbed TLS version (number or commit id): 3.6.2
Operating system and version: sequoia 15.1.1
Configuration (if not default, please attach mbedtls_config.h):
Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Additional environment information:
when i use
mkdir /path/to/build_dir && cd /path/to/build_dir
cmake /path/to/mbedtls_source
cmake --build .
it can build static library
but when i use
cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On /path/to/mbedtls_source
to build share library
[ 26%] Building C object tf-psa-crypto/drivers/builtin/CMakeFiles/builtin.dir/src/threading.c.o
[ 26%] Linking C shared library libbuiltin.dylib
Undefined symbols for architecture arm64:
"_mbedtls_to_psa_error", referenced from:
_mbedtls_psa_aead_encrypt in psa_crypto_aead.c.o
......
"_psa_verify_hash", referenced from:
_mbedtls_pk_verify_ext in pk.c.o
_rsa_verify_wrap in pk_wrap.c.o
_ecdsa_verify_psa in pk_wrap.c.o
ld: symbol(s) not found for architecture arm64
cc: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [tf-psa-crypto/drivers/builtin/libbuiltin.dylib] Error 1
make[1]: *** [tf-psa-crypto/drivers/builtin/CMakeFiles/builtin.dir/all] Error 2
make: *** [all] Error 2

how to fix it?

@teshua
Copy link
Author

teshua commented Jan 11, 2025

Python 3.9.20
cmake version 3.31.2
gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: arm64-apple-darwin24.1.0
Thread model: posix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants