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
Describe the bug
A clear and concise description of what the bug is.
OQS Provider static build fails when built against openssl configured with 'no-shared'. To Reproduce
Steps to reproduce the behavior:
cmake -DOPENSSL_ROOT_DIR=/home/ubuntu/openssl3.3/ossl-install/ -DOQS_PROVIDER_BUILD_STATIC=ON -DCMAKE_PREFIX_PATH=/home/ubuntu/openssl3.3/ossl-install/ -DCMAKE_INSTALL_PREFIX=/home/ubuntu/openssl3.3/ossl-install/ -DCMAKE_BUILD_TYPE=Debug -GNinja -S ..
5. See error FAILED: test/oqs_test_groups : && /usr/bin/cc -g test/CMakeFiles/oqs_test_groups.dir/oqs_test_groups.c.o test/CMakeFiles/oqs_test_groups.dir/test_common.c.o test/CMakeFiles/oqs_test_groups.dir/tlstest_helpers.c.o -o test/oqs_test_groups /home/ubuntu/openssl3.3/ossl-install/lib64/libssl.a /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a lib/liboqsprovider.a /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a && : /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_lock_new':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:688: undefined reference to pthread_rwlock_init' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_read_lock':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:727: undefined reference to pthread_rwlock_rdlock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_write_lock':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:742: undefined reference to pthread_rwlock_wrlock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_unlock':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:757: undefined reference to pthread_rwlock_unlock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_lock_free':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:775: undefined reference to pthread_rwlock_destroy' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_run_once':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:786: undefined reference to pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_init_local':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:794: undefined reference to pthread_key_create' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_get_local':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:802: undefined reference to pthread_getspecific' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_set_local':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:807: undefined reference to pthread_setspecific' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function CRYPTO_THREAD_cleanup_local':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:815: undefined reference to pthread_key_delete' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-thread_posix.o): in function ossl_crypto_thread_native_spawn':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/thread/arch/thread_posix.c:48: undefined reference to pthread_create' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-thread_posix.o): in function ossl_crypto_thread_native_perform_join':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/thread/arch/thread_posix.c:72: undefined reference to pthread_join' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-thread_posix.o): in function ossl_crypto_mutex_try_lock':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/thread/arch/thread_posix.c:115: undefined reference to pthread_mutex_trylock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function dlfcn_load':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:116: undefined reference to dlopen' /usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:118: undefined reference to dlerror'
/usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:138: undefined reference to dlclose' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function dlfcn_unload':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:161: undefined reference to dlclose' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function dlfcn_bind_func':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:186: undefined reference to dlsym' /usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:188: undefined reference to dlerror'
/usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function dlfcn_pathbyaddr': /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:416: undefined reference to dladdr'
/usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:434: undefined reference to dlerror' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function dlfcn_globallookup':
/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:441: undefined reference to dlopen' /usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:444: undefined reference to dlsym'
/usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:445: undefined reference to dlclose' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(common.c.o): in function OQS_CPU_has_extension':
/home/ubuntu/liboqs-main/build/../src/common/common.c:217: undefined reference to pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function oqs_ossl_destroy':
/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:89: undefined reference to pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function oqs_sha256':
/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:107: undefined reference to pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function oqs_sha384':
/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:124: undefined reference to pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function oqs_sha512':
/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:141: undefined reference to pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o):/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:158: more undefined references to pthread_once' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.` Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
OS: [e.g. Ubuntu 20]:- 5.4.0-126-generic [Windows] Running tests #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
oqsprovider version [e.g. 0.4.0]:- using liboqs version 0.11.1-dev,
Please run the following commands to obtain the version information:
For OpenSSL: openssl version
For oqsprovider: openssl list -providers
If oqsprovider is not listed as active, be sure to first follow all USAGE guidance.
If reporting bugs triggered by OpenSSL API integrations, e.g. running
a provider build statically
or directly invoking any OpenSSL API, be sure to retrieve and report all errors
reported by using the OpenSSL ERR_get_error_all
function.
Bug reports generated from Debug builds
wth the debug environment variable "OQSPROV=1" set will be particularly helpful to find underlying
problems.
Additional context
Add any other context about the problem here.
Hints
To exclude a build/setup error, please consider running your test
commands to reproduce the problem in our pre-build docker image,
e.g. as such: docker run -it openquantumsafe/oqs-ossl3 and
provide full command input and output traces in the bug report.
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
OQS Provider static build fails when built against openssl configured with 'no-shared'.
To Reproduce
Steps to reproduce the behavior:
/usr/bin/perl ./Configure no-shared --prefix=/home/ubuntu/openssl3.3/ossl-install enable-trace --debug
cmake -DOPENSSL_ROOT_DIR=/home/ubuntu/openssl3.3/ossl-install/ -DOPENSSL_CRYPTO_LIBRARY=/home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a -DCMAKE_PREFIX_PATH=/home/ubuntu/openssl3.3/ossl-install/ -DCMAKE_INSTALL_PREFIX=/home/ubuntu/openssl3.3/ossl-install/ -DCMAKE_BUILD_TYPE=Debug -GNinja -S ..
cmake -DOPENSSL_ROOT_DIR=/home/ubuntu/openssl3.3/ossl-install/ -DOQS_PROVIDER_BUILD_STATIC=ON -DCMAKE_PREFIX_PATH=/home/ubuntu/openssl3.3/ossl-install/ -DCMAKE_INSTALL_PREFIX=/home/ubuntu/openssl3.3/ossl-install/ -DCMAKE_BUILD_TYPE=Debug -GNinja -S ..
5. See error
FAILED: test/oqs_test_groups : && /usr/bin/cc -g test/CMakeFiles/oqs_test_groups.dir/oqs_test_groups.c.o test/CMakeFiles/oqs_test_groups.dir/test_common.c.o test/CMakeFiles/oqs_test_groups.dir/tlstest_helpers.c.o -o test/oqs_test_groups /home/ubuntu/openssl3.3/ossl-install/lib64/libssl.a /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a lib/liboqsprovider.a /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a && : /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_lock_new':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:688: undefined reference to
pthread_rwlock_init' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_read_lock':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:727: undefined reference to
pthread_rwlock_rdlock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_write_lock':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:742: undefined reference to
pthread_rwlock_wrlock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_unlock':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:757: undefined reference to
pthread_rwlock_unlock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_lock_free':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:775: undefined reference to
pthread_rwlock_destroy' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_run_once':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:786: undefined reference to
pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_init_local':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:794: undefined reference to
pthread_key_create' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_get_local':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:802: undefined reference to
pthread_getspecific' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_set_local':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:807: undefined reference to
pthread_setspecific' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-threads_pthread.o): in function
CRYPTO_THREAD_cleanup_local':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/threads_pthread.c:815: undefined reference to
pthread_key_delete' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-thread_posix.o): in function
ossl_crypto_thread_native_spawn':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/thread/arch/thread_posix.c:48: undefined reference to
pthread_create' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-thread_posix.o): in function
ossl_crypto_thread_native_perform_join':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/thread/arch/thread_posix.c:72: undefined reference to
pthread_join' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-thread_posix.o): in function
ossl_crypto_mutex_try_lock':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/thread/arch/thread_posix.c:115: undefined reference to
pthread_mutex_trylock' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function
dlfcn_load':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:116: undefined reference to
dlopen' /usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:118: undefined reference to
dlerror'/usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:138: undefined reference to
dlclose' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function
dlfcn_unload':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:161: undefined reference to
dlclose' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function
dlfcn_bind_func':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:186: undefined reference to
dlsym' /usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:188: undefined reference to
dlerror'/usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function
dlfcn_pathbyaddr': /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:416: undefined reference to
dladdr'/usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:434: undefined reference to
dlerror' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function
dlfcn_globallookup':/home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:441: undefined reference to
dlopen' /usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:444: undefined reference to
dlsym'/usr/bin/ld: /home/ubuntu/openssl3.3/openssl-openssl-3.3/crypto/dso/dso_dlfcn.c:445: undefined reference to
dlclose' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(common.c.o): in function
OQS_CPU_has_extension':/home/ubuntu/liboqs-main/build/../src/common/common.c:217: undefined reference to
pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function
oqs_ossl_destroy':/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:89: undefined reference to
pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function
oqs_sha256':/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:107: undefined reference to
pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function
oqs_sha384':/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:124: undefined reference to
pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o): in function
oqs_sha512':/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:141: undefined reference to
pthread_once' /usr/bin/ld: /home/ubuntu/openssl3.3/ossl-install/lib/liboqs.a(ossl_helpers.c.o):/home/ubuntu/liboqs-main/build/../src/common/ossl_helpers.c:158: more undefined references to
pthread_once' followcollect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.`
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
OS: [e.g. Ubuntu 20]:- 5.4.0-126-generic [Windows] Running tests #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
OpenSSL version [e.g., 3.2.0-dev]:- OpenSSL 3.3.3-dev (Library: OpenSSL 3.3.3-dev ), 0.7.1-dev
oqsprovider version [e.g. 0.4.0]:- using liboqs version 0.11.1-dev,
Please run the following commands to obtain the version information:
openssl version
openssl list -providers
If
oqsprovider
is not listed as active, be sure to first follow allUSAGE guidance.
If reporting bugs triggered by OpenSSL API integrations, e.g. running
a provider build statically
or directly invoking any OpenSSL API, be sure to retrieve and report all errors
reported by using the OpenSSL ERR_get_error_all
function.
Bug reports generated from Debug builds
wth the debug environment variable "OQSPROV=1" set will be particularly helpful to find underlying
problems.
Additional context
Add any other context about the problem here.
Hints
To exclude a build/setup error, please consider running your test
commands to reproduce the problem in our pre-build docker image,
e.g. as such:
docker run -it openquantumsafe/oqs-ossl3
andprovide full command input and output traces in the bug report.
The text was updated successfully, but these errors were encountered: