astral-sh / astral-sh/python-build-standalone
Undefined symbols when linking against libpython static library
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 314
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 27
Description
I'm trying to embed Python interpreter in a C++ application with no external dependencies and found this project.
I downloaded latest install-only prebuilt assets for arm64 macOS but when trying to compile my app against `libpython3.11d.a` I receive a lot of errors about undefined symbols (mostly from OpenSSL):
```
Undefined symbols for architecture arm64:
"_ASN1_OBJECT_free", referenced from:
__ssl_txt2obj in libpython3.11d.a(_ssl.o)
__ssl_nid2obj in libpython3.11d.a(_ssl.o)
"_ASN1_OCTET_STRING_free", referenced from:
_newPySSLSocket in libpython3.11d.a(_ssl.o)
"_ASN1_STRING_get0_data", referenced from:
__create_tuple_for_X509_NAME in libpython3.11d.a(_ssl.o)
__get_peer_alt_names in libpython3.11d.a(_ssl.o)
_newPySSLSocket in libpython3.11d.a(_ssl.o)
"_ASN1_STRING_length", referenced from:
__create_tuple_for_X509_NAME in libpython3.11d.a(_ssl.o)
__get_peer_alt_names in libpython3.11d.a(_ssl.o)
_newPySSLSocket in libpython3.11d.a(_ssl.o)
"_ASN1_STRING_to_UTF8", referenced from:
__create_tuple_for_X509_NAME in libpython3.11d.a(_ssl.o)
"_ASN1_STRING_type", referenced from:
__create_tuple_for_X509_NAME in libpython3.11d.a(_ssl.o)
"_ASN1_TIME_print", referenced from:
__decode_certificate in libpython3.11d.a(_ssl.o)
"_AUTHORITY_INFO_ACCESS_free", referenced from:
__get_aia_uri in libpython3.11d.a(_ssl.o)
"_BIO_clear_flags", referenced from:
__ssl_MemoryBIO_write_eof in libpython3.11d.a(_ssl.o)
"_BIO_ctrl", referenced from:
__ssl__test_decode_cert in libpython3.11d.a(_ssl.o)
__decode_certificate in libpython3.11d.a(_ssl.o)
__get_peer_alt_names in libpython3.11d.a(_ssl.o)
_newPySSLSocket in libpython3.11d.a(_ssl.o)
__PySSLContext_set_keylog_filename in libpython3.11d.a(_ssl.o)
__PySSL_keylog_callback in libpython3.11d.a(_ssl.o)
__ssl__SSLSocket_do_handshake in libpython3.11d.a(_ssl.o)
...
```
Is this supposed to be intended behaviour?
If yes, where can I found the prebuilt assets for OpenSSL (and other required dependencies) so that I can link against those as well?
Contributor guide
Assessment
This issue has not been assessed yet.