[exim] Re: undefined reference to `SSL_get0_chain_certs' err…

Top Pagina
Delete this message
Reply to this message
Auteur: Viktor Dukhovni via Exim-users
Datum:  
Aan: exim-users
Onderwerp: [exim] Re: undefined reference to `SSL_get0_chain_certs' error on compile
On Sat, Dec 16, 2023 at 09:44:59AM +0000, Ian B via Exim-users wrote:

> In the meantime I think I've just got it working ok with exporting
> LD_LIBRARY_PATH and CC=gcc -std=gnu99 -lrt -I/usr/local/ssl/
> -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/ssl/lib (not even sure those are
> correct just atm)


When building the custom OpenSSL, I don't find it necessary to do
anything with CC, LD_LIBRARY_PATH, ... just:

    $ dstpath=...             # whatever
    $ libpath=$dstpath/lib    # or $dstpath/lib64, ...
    $ Configure --prefix=$dstpath -Wl,-rpath,$libpath linux-x86_64-rpk
    $ make            # -j<pick-a-number-cpus>
    $ make test
    $ sudo make install_sw


When building other software against the non-default OpenSSL, you may
need to tweak CFLAGS and LDFLAGS in various ways to make sure that:

    * CFLAGS has -I$dstpath/include
    * LDFLAGS has -L$libpath -Wl,-rpath,$libpath


For example, my Fedora shell script for configuring a Postfix build
is essentially:

    OSSL=/opt/openssl/3.2


    CCARGS="-I${OSSL}/include -DUSE_TLS -DHAS_PCRE=2 -DHAS_CDB -DNO_NIS"
    AUXLIBS="$AUXLIBS -L${OSSL}/lib64 -Wl,-rpath,${OSSL}/lib64 -lssl -lcrypto -ldb"
    AUXLIBS_PCRE="-lpcre2-8"
    AUXLIBS_CDB="-lcdb"


    make -f Makefile.init \
        "CCARGS=$CCARGS" "OPT=-O -g" \
        AUXLIBS="$AUXLIBS" \
        AUXLIBS_PCRE="$AUXLIBS_PCRE" \
        AUXLIBS_CDB="$AUXLIBS_CDB" \
        makefiles


The details will be different for Exim, but the basic principles should
be the same.

-- 
    Viktor.


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/