Re: PG12.2 Configure cannot enalble SSL - Mailing list pgsql-general

From Gavan Schneider
Subject Re: PG12.2 Configure cannot enalble SSL
Date
Msg-id C7E6C4D9-EA6C-4464-BC82-BA6F0AEC76FC@pendari.net
Whole thread Raw
In response to Re: PG12.2 Configure cannot enalble SSL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PG12.2 Configure cannot enalble SSL  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: PG12.2 Configure cannot enalble SSL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 14 May 2020, at 23:26, Tom Lane wrote:

> "Gavan Schneider" <gavan-pg-list@pendari.net> writes:
>>     -bash-3.2$ ./configure --with-openssl \
>>     > --with-includes=/usr/local/opt/openssl/include/openssl \
>>     > --with-libraries=/usr/local/opt/openssl/lib
>>     ...
>>     checking openssl/ssl.h usability... no
>>     checking openssl/ssl.h presence... no
>>     checking for openssl/ssl.h... no
>>     configure: error: header file <openssl/ssl.h> is required for
>> OpenSSL
>
> Offhand, I'll guess that you need to shorten the --with-includes
> path to
>
>     --with-includes=/usr/local/opt/openssl/include
>
> What you are showing here would only work if the header file's full
> path
> is
>
> /usr/local/opt/openssl/include/openssl/openssl/ssl.h
>
> which doesn't seem likely.
>
My bad. I made an error in cobbling together a reduced example which
achieved the same error for the wrong reasons.
I’ll share the larger version but the problem remains. It does not
seem to be as simple as a bad path.

    -bash-3.2$
    -bash-3.2$ ./_Build_PostgeSQL.sh     > build.log 2>&1
    -bash-3.2$ ls -las
/usr/local/Cellar/openssl@1.1/1.1.1g/include/openssl/ssl.h
    224 -rw-r--r--  1 pendari  staff  111253 21 Apr 22:22
/usr/local/Cellar/openssl@1.1/1.1.1g/include/openssl/ssl.h
    -bash-3.2$

Where _Build_PostgeSQL.sh looks like:


    echo ===================================================
    echo ================= `date "+%Y-%m-%d %H:%M"` ================
    echo ===================================================

    PORT=65432

    ##### Working Base
    BASE="/usr/local/pgsql/v12"

    ##### Define basic tools == Homebrew versions (updated on a regular
basis)
    MAKE="/usr/local/bin/gmake"
    CC="/usr/bin/gcc" # alternate? "/usr/local/bin/gcc-9"

    LIBS=""
    HDRS=""
    ##### OPENSSL
    LIBS=${LIBS}:"/usr/local/Cellar/openssl@1.1/1.1.1g/lib"
    HDRS=${HDRS}:"/usr/local/Cellar/openssl@1.1/1.1.1g/include"
    #LIBS=${LIBS}:"/usr/local/Cellar/libressl/3.1.1/lib"
    #HDRS=${HDRS}:"/usr/local/Cellar/libressl/3.1.1/include"
    ##### OPENLDAP
    LIBS=${LIBS}:"/usr/local/opt/openldap/lib"
    HDRS=${HDRS}:"/usr/local/opt/openldap/include"
    #####  GENERIC
    LIBS=${LIBS}:"/usr/local/lib:/Library/Developer/CommandLineTools/usr/lib"
    HDRS=${HDRS}:"/usr/local/include:/Library/Developer/CommandLineTools/usr/include"

    cd postgresql-12.2

    ./configure                                             \
        CC=${CC}                                            \
        --with-includes=${HRDS}                                \
        --with-libraries=${LIBS}                              \
        --prefix=${BASE}                                    \
        --with-pgport=${PORT}                               \
        --with-python                                       \
        --with-libxml --with-libxslt                        \
        --with-wal-blocksize=8                              \
        --with-system-tzdata=/usr/share/zoneinfo            \
        --with-pam                                          \
        --with-ldap                                         \
        --with-uuid=e2fs                                    \
        --with-bonjour                                      \
        --with-openssl                                      \

    echo ===================================================
    echo ===================================================
    echo --with-includes =${HDRS}
    echo --with-libraries=${LIBS}
    echo CC is: $CC
    echo MAKE is: $MAKE
    echo ===================================================
    echo ===================================================

    exit ####DEBUG

and generated

    ===================================================
    ================= 2020-05-15 21:43 ================
    ===================================================
    checking build system type... x86_64-apple-darwin19.4.0
    checking host system type... x86_64-apple-darwin19.4.0
    . . .
    checking zlib.h usability... yes
    checking zlib.h presence... yes
    checking for zlib.h... yes
    checking openssl/ssl.h usability... no
    checking openssl/ssl.h presence... no
    checking for openssl/ssl.h... no
    configure: error: header file <openssl/ssl.h> is required for OpenSSL
    ===================================================
    ===================================================
    --with-includes

=:/usr/local/Cellar/openssl@1.1/1.1.1g/include:/usr/local/opt/openldap/include:/usr/local/include:/Library/Developer/CommandLineTools/usr/include

--with-libraries=:/usr/local/Cellar/openssl@1.1/1.1.1g/lib:/usr/local/opt/openldap/lib:/usr/local/lib:/Library/Developer/CommandLineTools/usr/lib
    CC is: /usr/bin/gcc
    MAKE is: /usr/local/bin/gmake
    ===================================================
    ===================================================

so, once again, I get the error but this time the paths appear to be
correct

Thoughts?

Gavan Schneider
——
Gavan Schneider, Sodwalls, NSW, Australia
Explanations exist; they have existed for all time; there is always a
well-known solution to every human problem — neat, plausible, and
wrong. The ancients, in the case at bar, laid the blame upon the gods:
sometimes they were remote and surly, and sometimes they were kind. In
the Middle Ages lesser powers took a hand in the matter, and so one
reads of works of art inspired by Our Lady, by the Blessed Saints, by
the souls of the departed, and even by the devil.  H. L. Mencken, 1920



pgsql-general by date:

Previous
From: Moor Ali
Date:
Subject: Seamless Logical Replication during Fail-over
Next
From: Peter Eisentraut
Date:
Subject: Re: PG12.2 Configure cannot enalble SSL