CauldronDevelopmentLLC / cbang

C! (cbang) is a library for cross-platform C++ development.
GNU Lesser General Public License v2.1
56 stars 39 forks source link

OpenSSL 3.0 required #131

Closed marcosfrm closed 11 months ago

marcosfrm commented 11 months ago

Since https://github.com/CauldronDevelopmentLLC/cbang/commit/2a995745e0415560346e2a0a4f994a3db2a24b19, OpenSSL 3.0 is required for OSSL_PROVIDER_load() and <openssl/provider.h>:

g++ -o build/cbang/openssl/SSL.o -c -faligned-new -std=c++14 -fsigned-char -ffunction-sections -fdata-sections -O3 -funroll-loops -fno-pie -fPIC -DNDEBUG -D_REENTRANT -DUSING_CBANG -Iinclude -Isrc -Isrc/boost src/cbang/openssl/SSL.cpp
src/cbang/openssl/SSL.cpp:64:10: fatal error: openssl/provider.h: Arquivo ou diretório inexistente
 #include <openssl/provider.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [build/cbang/openssl/SSL.o] Error 1
scons: building terminated because of errors.

It will not compile on distributions with OpenSSL 1.1.1 like CentOS Stream 8.

jcoffland commented 11 months ago

I've added a version check.

Another option is to build and install OpenSSL 3.0 from source on CentOS.

curl https://www.openssl.org/source/openssl-3.0.12.tar.gz | tar xz
cd openssl-3.0.12
./config
make
sudo make install
kbernhagen commented 11 months ago

If building openssl 3, make sure the static libs are built.