Closed sduyyy closed 3 months ago
The error message is tell-tale: The installation of OpenSSL is not clean, there is some version mismatch of the new code you built&installed with the system openssl
. Three recommendations then: 1) Use one of our pre-built docker images; or 2) a corresponding supported Dockerfiles for your use case or 3) Use the "build-from-scratch" build script of oqs-provider suitably setting the OPENSSL_BRANCH build config variable.
thanks a lot
Describe the bug I build on linux with manually installed openssl, when I run "ninja", this error ocures.
To Reproduce mkdir build && cd build cmake -GNinja .. ninja
Screenshots test@x1-carbon:~/liboqs/build$ ninja [4/1442] Building C object src/common/CMakeFiles/common.dir/sha2/sha2_ossl.c.o FAILED: src/common/CMakeFiles/common.dir/sha2/sha2_ossl.c.o /usr/bin/cc -DOQS_HAVE_ALIGNED_ALLOC -DOQS_HAVE_EXPLICIT_BZERO -DOQS_HAVE_MEMALIGN -DOQS_HAVE_POSIX_MEMALIGN -Iinclude -fPIC -fvisibility=hidden -Wa,--noexecstack -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -Wl,--gc-sections -Wbad-function-cast -pthread -std=gnu11 -MD -MT src/common/CMakeFiles/common.dir/sha2/sha2_ossl.c.o -MF src/common/CMakeFiles/common.dir/sha2/sha2_ossl.c.o.d -o src/common/CMakeFiles/common.dir/sha2/sha2_ossl.c.o -c ../src/common/sha2/sha2_ossl.c In file included from /usr/include/openssl/err.h:16, from ../src/common/sha2/../ossl_helpers.h:9, from ../src/common/sha2/sha2_ossl.c:14: /usr/include/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" 155 | # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" | ^~~~~ [6/1442] Building C object src/common/CMakeFiles/internal.dir/rand/rand_nist.c.o FAILED: src/common/CMakeFiles/internal.dir/rand/rand_nist.c.o /usr/bin/cc -DOQS_HAVE_ALIGNED_ALLOC -DOQS_HAVE_EXPLICIT_BZERO -DOQS_HAVE_MEMALIGN -DOQS_HAVE_POSIX_MEMALIGN -Iinclude -fPIC -fvisibility=default -Wa,--noexecstack -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -Wl,--gc-sections -Wbad-function-cast -pthread -std=gnu11 -MD -MT src/common/CMakeFiles/internal.dir/rand/rand_nist.c.o -MF src/common/CMakeFiles/internal.dir/rand/rand_nist.c.o.d -o src/common/CMakeFiles/internal.dir/rand/rand_nist.c.o -c ../src/common/rand/rand_nist.c In file included from /usr/include/openssl/err.h:16, from ../src/common/rand/../ossl_helpers.h:9, from ../src/common/rand/rand_nist.c:25: /usr/include/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" 155 | # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" | ^~~~~ [8/1442] Building C object src/common/CMakeFiles/internal.dir/ossl_helpers.c.o FAILED: src/common/CMakeFiles/internal.dir/ossl_helpers.c.o /usr/bin/cc -DOQS_HAVE_ALIGNED_ALLOC -DOQS_HAVE_EXPLICIT_BZERO -DOQS_HAVE_MEMALIGN -DOQS_HAVE_POSIX_MEMALIGN -Iinclude -fPIC -fvisibility=default -Wa,--noexecstack -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -Wl,--gc-sections -Wbad-function-cast -pthread -std=gnu11 -MD -MT src/common/CMakeFiles/internal.dir/ossl_helpers.c.o -MF src/common/CMakeFiles/internal.dir/ossl_helpers.c.o.d -o src/common/CMakeFiles/internal.dir/ossl_helpers.c.o -c ../src/common/ossl_helpers.c In file included from /usr/include/openssl/err.h:16, from ../src/common/ossl_helpers.h:9, from ../src/common/ossl_helpers.c:5: /usr/include/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" 155 | # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" | ^~~~~ [21/1442] Building C object src/kem/bike/CMakeFiles/bike_l5.dir/additional_r4/gf2x_mul_base_pclmul.c.o ninja: build stopped: subcommand failed.
Environment (please complete the following information):
Additional context I tried to manually adding args to cmake with paths to openssl libraries v3 set(OPENSSL_ROOT_DIR "/usr/local/openssl" it still doesn't work.