[squid-users] Squid with custom openssl path is using the openssl installed in default path

Amos Jeffries squid3 at treenet.co.nz
Wed Feb 27 13:28:39 UTC 2019


On 27/02/19 9:59 pm, Stilyan Georgiev wrote:
> Hi,
> 
> Trying to build squid using custom path for openssl and related
> libraries. My goal is to use openssl 1.1.1 which is installed in /usr/local
> 
> -- 
> /usr/local/bin/openssl version
> OpenSSL 1.1.1b  26 Feb 2019
> -- 
> 
> I did install it like that:
> 
> -- 
>  ./config --prefix=/usr/local --openssldir=/usr/local/lib/ssl
> --libdir=lib 


The build instructions for OpenSSL indicate that unless one is an expert
with the library those --prefix and --openssldir paths should be set to
exactly the same value, *and* avoid setting them to any default system
paths (eg. /usr).

Once you have both built and *installed* the library files. You should
use *exactly* the same path for Squids ./configure --with-openssl=PATH
value.


>  --with-openssl=/usr/local

Notice how your paths are all different at each of those three places.
This is causing a very mixed up installation.

When Squid goes looking for the headers + binaries the only consistent
thing it can fine is the default system library. So of course that is
what gets linked to.


I suggest using /usr/local/openssl-1.1.1 as your custom library path.

Build openssl with --prefix=/usr/local/openssl-1.1.1
--openssldir=/usr/local/openssl-1.1.1

Build Squid with --with-openssl=/usr/local/openssl-1.1.1

That should work a lot better without needing any edits of the build system.


Amos


More information about the squid-users mailing list