pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PG12.2 Configure cannot enalble SSL
7+ messages / 3 participants
[nested] [flat]

* PG12.2 Configure cannot enalble SSL
@ 2020-05-14 07:42 Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-14 13:26 ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Gavan Schneider @ 2020-05-14 07:42 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org


Greetings:

This problem may be related to several threads I have found, e.g.,
	https://www.postgresql.org/message-id/29069.1575298784%40sss.pgh.pa.us

Context:
Building PG12.2 and need to enable SSL
Previous version builds have been uneventful but I haven’t attempted 
to enable SSL before

Sources:
	PG — standard source distribution 12.2
	OpenSSL — Homebrew
	macOS Catalina v 10.15.4

Checks:
	configure finishes normally if I do not attempt to enable SSL
	the header files are at the end of the —with-includes
	they are readable
	searches for this problem seem to relate to older versions and are no 
longer relevant in that I seem to have the include files properly 
identified

Problem:
	I really don’t know where to go with this except to hope someone can 
see my =obvious= error
	All help appreciated.



Relecvant terminal:
	-bash-3.2$ cd postgresql-12.2
	-bash-3.2$ ls -las
	total 1488
	   0 drwxrwxrwx@ 18 pendari   staff     576 11 Feb 09:29 .
	   0 drwxr-xr-x+  8 postgres  wheel     256 14 May 16:17 ..
	   8 -rw-r--r--@  1 pendari   staff     730 11 Feb 09:14 .dir-locals.el
	   8 -rw-r--r--@  1 pendari   staff    1547 11 Feb 09:14 .gitattributes
	   8 -rw-r--r--@  1 pendari   staff     504 11 Feb 09:14 .gitignore
	   8 -rw-r--r--@  1 pendari   staff    1192 11 Feb 09:14 COPYRIGHT
	   8 -rw-r--r--@  1 pendari   staff    3909 11 Feb 09:14 GNUmakefile.in
	   8 -rw-r--r--@  1 pendari   staff     284 11 Feb 09:14 HISTORY
	 128 -rw-r--r--@  1 pendari   staff   61606 11 Feb 09:29 INSTALL
	   8 -rw-r--r--@  1 pendari   staff    1665 11 Feb 09:14 Makefile
	   8 -rw-r--r--@  1 pendari   staff    1212 11 Feb 09:14 README
	   8 -rw-r--r--@  1 pendari   staff     522 11 Feb 09:14 aclocal.m4
	   0 drwxrwxrwx@ 23 pendari   staff     736 11 Feb 09:28 config
	1120 -rwxr-xr-x@  1 pendari   staff  572134 11 Feb 09:14 configure
	 168 -rw-r--r--@  1 pendari   staff   83465 11 Feb 09:14 configure.in
	   0 drwxrwxrwx@ 59 pendari   staff    1888 11 Feb 09:28 contrib
	   0 drwxrwxrwx@  7 pendari   staff     224 11 Feb 09:28 doc
	   0 drwxrwxrwx@ 22 pendari   staff     704 11 Feb 09:29 src
	-bash-3.2$
	-bash-3.2$ ./configure --with-openssl \
	> --with-includes=/usr/local/opt/openssl/include/openssl \
	> --with-libraries=/usr/local/opt/openssl/lib
	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
	-bash-3.2$
	
	-bash-3.2$ /usr/local/Cellar/openssl@1.1/1.1.1g/bin/openssl version
	OpenSSL 1.1.1g  21 Apr 2020
	-bash-3.2$



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 power 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

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG12.2 Configure cannot enalble SSL
  2020-05-14 07:42 PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
@ 2020-05-14 13:26 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-15 11:54   ` Re: PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2020-05-14 13:26 UTC (permalink / raw)
  To: Gavan Schneider <gavan-pg-list@pendari.net>; +Cc: pgsql-general@lists.postgresql.org

"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.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG12.2 Configure cannot enalble SSL
  2020-05-14 07:42 PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-14 13:26 ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-15 11:54   ` Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-15 12:27     ` Re: PG12.2 Configure cannot enalble SSL Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  2020-05-15 13:24     ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 7+ messages in thread

From: Gavan Schneider @ 2020-05-15 11:54 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG12.2 Configure cannot enalble SSL
  2020-05-14 07:42 PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-14 13:26 ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-15 11:54   ` Re: PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
@ 2020-05-15 12:27     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  2020-05-15 13:47       ` Re: PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  1 sibling, 1 reply; 7+ messages in thread

From: Peter Eisentraut @ 2020-05-15 12:27 UTC (permalink / raw)
  To: Gavan Schneider <gavan-pg-list@pendari.net>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org

On 2020-05-15 13:54, Gavan Schneider wrote:
> 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

Then the next step is to check in config.log for the details of the test 
failure.  (Search the file for "openssl/ssl.h" to find the right place.)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG12.2 Configure cannot enalble SSL
  2020-05-14 07:42 PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-14 13:26 ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-15 11:54   ` Re: PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-15 12:27     ` Re: PG12.2 Configure cannot enalble SSL Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2020-05-15 13:47       ` Gavan Schneider <gavan-pg-list@pendari.net>
  0 siblings, 0 replies; 7+ messages in thread

From: Gavan Schneider @ 2020-05-15 13:47 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general@lists.postgresql.org

On 15 May 2020, at 22:27, Peter Eisentraut wrote:

>
> Then the next step is to check in config.log for the details of the 
> test failure.  (Search the file for "openssl/ssl.h" to find the right 
> place.)
>
Thank you, hopefully I’ll find my typos quicker this way

	configure:13101: checking openssl/ssl.h usability
	configure:13101: /usr/bin/gcc -c -Wall -Wmissing-prototypes 
-Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels 
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing 
-fwrapv -Wno-unused-	command-line-argument -O2  
-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include  
-I/usr/local/Cellar/openssl@1.1/1.1.1g/include -I/usr/local/include 
-I/Library/Developer/CommandLineTools/usr/include conftest.c >&5
	configure:13101: $? = 0
	configure:13101: result: yes


Regards
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

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG12.2 Configure cannot enalble SSL
  2020-05-14 07:42 PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-14 13:26 ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-15 11:54   ` Re: PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
@ 2020-05-15 13:24     ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-15 13:40       ` Re: PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  1 sibling, 1 reply; 7+ messages in thread

From: Tom Lane @ 2020-05-15 13:24 UTC (permalink / raw)
  To: Gavan Schneider <gavan-pg-list@pendari.net>; +Cc: pgsql-general@lists.postgresql.org

"Gavan Schneider" <gavan-pg-list@pendari.net> writes:
> 	HDRS=${HDRS}:"/usr/local/Cellar/openssl@1.1/1.1.1g/include"
> ...
> 	    --with-includes=${HRDS}

If that's an accurate copy of your script, spelling HDRS correctly
would help.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG12.2 Configure cannot enalble SSL
  2020-05-14 07:42 PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-14 13:26 ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-15 11:54   ` Re: PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
  2020-05-15 13:24     ` Re: PG12.2 Configure cannot enalble SSL Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-15 13:40       ` Gavan Schneider <gavan-pg-list@pendari.net>
  0 siblings, 0 replies; 7+ messages in thread

From: Gavan Schneider @ 2020-05-15 13:40 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org

On 15 May 2020, at 23:24, Tom Lane wrote:

> "Gavan Schneider" <gavan-pg-list@pendari.net> writes:
>
>> 	HDRS=${HDRS}:"/usr/local/Cellar/openssl@1.1/1.1.1g/include"
>> ...
>> 	    --with-includes=${HRDS}
>
>
> If that's an accurate copy of your script, spelling HDRS correctly
> would help.
>
D’oh! More more proof I haven’t been having a good week.  But it’s 
getting better. Thank you for spotting this,

	checking openssl/ssl.h usability... yes
	checking openssl/ssl.h presence... yes
	checking for openssl/ssl.h... yes

Now to get some real work done :)

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

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-05-15 13:47 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 07:42 PG12.2 Configure cannot enalble SSL Gavan Schneider <gavan-pg-list@pendari.net>
2020-05-14 13:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-15 11:54   ` Gavan Schneider <gavan-pg-list@pendari.net>
2020-05-15 12:27     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-05-15 13:47       ` Gavan Schneider <gavan-pg-list@pendari.net>
2020-05-15 13:24     ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-15 13:40       ` Gavan Schneider <gavan-pg-list@pendari.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox