'make fails to build squid with openssl (deprecated functions used)
I'm trying to build squid with openssl, but fail because make threats warnings as errors
An example: gadgets.h -> error 'void RSA_free(RSA*)' is deprecated; Since **Openssl 3.0.0** -Werror=deprecated-declarations ..
I assume that -Werror=deprecated-declarations
instructs make to threat these warnings as errors. But in which file is -Werror=deprecated-declarations
? How can I suppress this / avoid it?
I need squid with openssl.
Solution 1:[1]
These things are deprecated since Openssl 3.0.0. I just used Openssl 1.1.1 LTS - and it worked!
But lateron I noticed that there's a squid-openssl in the ubuntu 20.10 repository.. so I installed that.
Openssl 1.1.1l: https://www.openssl.org/source/openssl-1.1.1l.tar.gz
Solution 2:[2]
france1 answers correct. But maybe "step by step" commands will help to someone. I successfully built Squid 5.5 on Ubuntu 22.04 with Openssl 3.0.2.
Download openssl 1.1.1j:
cd /tmp/
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1j.zip
Extract and install openssl to /usr/local/openssl_1_1_1j from source
unzip openssl-OpenSSL_1_1_1j.zip
cd ./openssl-OpenSSL_1_1_1j/
./config --prefix=/usr/local/openssl_1_1_1j --openssldir=/usr/local/openssl_1_1_1j/ssl
make
sudo make install
Export vars
export PATH="/usr/local/openssl_1_1_1j/bin:$PATH" LD_LIBRARY_PATH="/usr/local/openssl_1_1_1j/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH=/usr/local/openssl_1_1_1j/lib/pkgconfig
Download squid and compile with custom openssl:
wget http://www.squid-cache.org/Versions/v5/squid-5.5.tar.gz
tar -xzvf ./squid-5.5.tar.gz
cd squid-5.5/
./configure --enable-ssl-crtd --with-openssl=/usr/local/openssl_1_1_1j/lib
make
sudo make install
Works!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Vsevolod Gromov |