You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building a Python binary with the _ssl module. Python creates shared libraries which wrap functions of other libraries. With the _ssl module, the python script is building _ssl.cpython-313-x86_64-linux-gnu.so. When this shared library is created, it needs to be linked with libcrypto.a static library.
I use the environment from /hbb_shlib. The static libraries there should be compiled with -fPIC, but libcrypto.a is not.
I looked what is the cause and here is what I found:
image/variants/shlib.sh does not provide -fPIC for EXTRA_SHLIB_CFLAGS which in turn is used for SHLIB_CFLAGS.
When building the openSSL library inside image/build.sh:175 install_openssl(), the LIB_CFLAGS variable is set to SHLIB_CFLAGS (this variable does not contain -fPIC flag), which results in the libcrypto.a static library to not be usable in shared libraries.
I am building a Python binary with the _ssl module. Python creates shared libraries which wrap functions of other libraries. With the _ssl module, the python script is building _ssl.cpython-313-x86_64-linux-gnu.so. When this shared library is created, it needs to be linked with libcrypto.a static library.
I use the environment from /hbb_shlib. The static libraries there should be compiled with -fPIC, but libcrypto.a is not.
I looked what is the cause and here is what I found:
image/variants/shlib.sh does not provide -fPIC for EXTRA_SHLIB_CFLAGS which in turn is used for SHLIB_CFLAGS.
When building the openSSL library inside image/build.sh:175 install_openssl(), the LIB_CFLAGS variable is set to SHLIB_CFLAGS (this variable does not contain -fPIC flag), which results in the libcrypto.a static library to not be usable in shared libraries.
Possible solutions:
Here is the build script that will trigger the error.
Let me know what you think :)
The text was updated successfully, but these errors were encountered: