On Tue, Oct 31, 2023 at 09:39:36AM -0400, Wietse Venema via Postfix-users wrote:

> > make makefiles \
> >          CC="/usr/bin/gcc" \
> >          CCARGS="-m64 -DHAS_DB -DNO_NIS -DUSE_TLS -I/usr/openssl/3/include" 
> > \
> >          AUXLIBS="-R/usr/openssl/3/lib -L/usr/openssl/3/lib -ldb -lssl 
> > -lcrypto" \
> >          openssl_path="/usr/openssl/3/bin/openssl"
> > 
> > Getting the following compilation errors:
> > =========================================================================
> > Undefined                       first referenced
> >   symbol                             in file
> > SSL_in_init ../../lib/libtls.a(tls_session.o)
> [many more libssl functions missing]
> 
> Such errors are symptomatic of an include file / library file
> mismatch. You appear to be compiling with the OpenSSL 3.x include
> file, but linking with an older libssl version. The SSL_in_init()
> function does not exist in OpenSSL 1.0.1 libssl, but it does exist
> in OpenSSL 1.1.0 and later libssl.
> 
> Maybe twiddle the linker options:
> 
> AUXLIBS="-ldb -R/usr/openssl/3/lib -L/usr/openssl/3/lib -lssl ..."

I agree that the evidence points to use of older OpenSSL libraries, but
IIRC the relative of order of "-l" and "-L" options is not significant
in the linker, only the internal order within each of the two sets
matters.  All the "-L" options are taken together to form a search path,
that is then used to find all the "-l" libraries.

The issue may be related to presence or absence of the right type (
shared vs. static perhaps) on the search path, with the preferred
type found in the default locations?

Perhaps "/usr/openssl/3/lib" contains only static OpenSSL libraries?  Or
only "runtime" libraries (.so.3*).  Or the wrong machine architecture?

My advice by the way is to use dynamic not static linking.  The latter
is not recommended, especially on Solaris.  Dynamic linking is much
more adept at avoiding symbol conflics, and is better "supported" on
Solaris.

    make -f Makefile.init dynamicmaps=yes shared=yes ...

Make sure that /usr/openssl/3/lib contains usable dynamic OpenSSL
libraries, not just "runtime" (.so.3*), but also "devel" (.so).

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to