pgxs/config/missing is... missing
I'm trying to install pgTAP on a FreeBSD machine and running into an odd
problem:
sed -e 's,MODULE_PATHNAME,$libdir/pgtap,g' -e 's,__OS__,freebsd,g' -e 's,__VERSION__,0.95,g' sql/pgtap-core.sql > sql/pgtap-core.tmp
/bin/sh /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing perl compat/gencore 0 sql/pgtap-core.tmp > sql/pgtap-core.sql
cannot open /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing: No such file or directory
Makefile:124: recipe for target 'sql/pgtap-core.sql' failed
That particular recipe is
sql/pgtap-core.sql: sql/pgtap.sql.in
cp $< $@
sed -e 's,sql/pgtap,sql/pgtap-core,g' compat/install-8.4.patch | patch -p0
sed -e 's,sql/pgtap,sql/pgtap-core,g' compat/install-8.3.patch | patch -p0
sed -e 's,MODULE_PATHNAME,$$libdir/pgtap,g' -e 's,__OS__,$(OSNAME),g' -e 's,__VERSION__,$(NUMVERSION),g' sql/pgtap-core.sql > sql/pgtap-core.tmp
$(PERL) compat/gencore 0 sql/pgtap-core.tmp > sql/pgtap-core.sql
rm sql/pgtap-core.tmp
and it's the $(PERL) that's failing. If I add this recipe
print-% : ; @echo $* = $($*)
and do
gmake print-PERL
I indeed get
PERL = /bin/sh
/usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing perl
even after explicitly exporting PERL=/usr/local/bin/perl
I see that there is a config/missing script in source, and that
Makefile.global.in references it:
src/Makefile.global.in:missing = $(SHELL) $(top_srcdir)/config/missing
Any ideas why it's not being installed, or why the PGXS Makefile is
ignoring/over-riding $PERL?
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Oct 28, 2015, at 10:54 AM, Jim Nasby <Jim.Nasby@BlueTreble.com> wrote:
I indeed get
PERL = /bin/sh /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing perl
Ew.
even after explicitly exporting PERL=/usr/local/bin/perl
Hrm. I have this code in the pgTAP Makefile:
ifndef PERL
PERL := $(shell which perl)
endif
Could that be causing the problem?
I see that there is a config/missing script in source, and that Makefile.global.in references it:
src/Makefile.global.in:missing = $(SHELL) $(top_srcdir)/config/missing
Any ideas why it's not being installed, or why the PGXS Makefile is ignoring/over-riding $PERL?
That I surely don’t know. :-(
Best,
David
Attachments:
smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
On 10/29/15 5:31 PM, David E. Wheeler wrote:
even after explicitly exporting PERL=/usr/local/bin/perl
Hrm. I have this code in the pgTAP Makefile:
ifndef PERL
PERL := $(shell which perl)
endifCould that be causing the problem?
That doesn't help because PGXS defines PERL:
# Perl
ifneq (,)
# quoted to protect pathname with spaces
PERL = ''
else
PERL = $(missing) perl
endif
On a system where configure could find perl, that first line is:
ifneq (/opt/local/bin/perl,)
So instead of checking ifndef, I'm thinking it should check ifeq($PERL,).
I see that there is a config/missing script in source, and that Makefile.global.in references it:
src/Makefile.global.in:missing = $(SHELL) $(top_srcdir)/config/missing
Any ideas why it's not being installed, or why the PGXS Makefile is ignoring/over-riding $PERL?
That I surely don’t know.:-(
I'm not sure if this is the right way to go about it, but this patch at
least installs the file.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
Attachments:
patch.difftext/plain; charset=UTF-8; name=patch.diff; x-mac-creator=0; x-mac-type=0Download+2-0
On Oct 29, 2015, at 7:22 PM, Jim Nasby <Jim.Nasby@BlueTreble.com> wrote:
I'm not sure if this is the right way to go about it, but this patch at least installs the file.
Which seems like a decent idea. I’d like a way to know when Perl is missing, though. What does `missing` do?
D
Attachments:
smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
David E. Wheeler wrote:
On Oct 29, 2015, at 7:22 PM, Jim Nasby <Jim.Nasby@BlueTreble.com> wrote:
I'm not sure if this is the right way to go about it, but this patch at least installs the file.
Which seems like a decent idea. I’d like a way to know when Perl is missing, though. What does `missing` do?
It prints an error message "such-and-such utility is missing".
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 10/30/15 11:13 AM, Alvaro Herrera wrote:
David E. Wheeler wrote:
On Oct 29, 2015, at 7:22 PM, Jim Nasby <Jim.Nasby@BlueTreble.com> wrote:
I'm not sure if this is the right way to go about it, but this patch at least installs the file.
Which seems like a decent idea. I’d like a way to know when Perl is missing, though. What does `missing` do?
It prints an error message "such-and-such utility is missing".
Given what pgTap's Makefile is using perl for, perhaps the best bet is
to just ignore whatever PGXS has to say about it.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Oct 30, 2015, at 11:38 AM, Jim Nasby <Jim.Nasby@BlueTreble.com> wrote:
Given what pgTap's Makefile is using perl for, perhaps the best bet is to just ignore whatever PGXS has to say about it.
So add a check to see if it ends in “missing perl”? Suggested Makefile-foo for that?
D
Attachments:
smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
On 10/30/15 2:55 PM, David E. Wheeler wrote:
On Oct 30, 2015, at 11:38 AM, Jim Nasby <Jim.Nasby@BlueTreble.com> wrote:
Given what pgTap's Makefile is using perl for, perhaps the best bet is to just ignore whatever PGXS has to say about it.
So add a check to see if it ends in “missing perl”? Suggested Makefile-foo for that?
Hrm, you're probably stuck with egrep for that. :( It'd be similar to
how test and GE91 work at
https://github.com/BlueTreble/variant/blob/master/Makefile#L18.
Though, maybe there's something that could be put together with what's
at https://www.gnu.org/software/make/manual/html_node/Text-Functions.html.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Full story below, but in short:
I see that there is a config/missing script in source, and that
Makefile.global.in references it:
src/Makefile.global.in:missing = $(SHELL)
$(top_srcdir)/config/missing
AFAICT the problem is that missing wasn't included in install or
uninstall in config/Makefile. Attached patch fixes that, and results in
missing being properly installed in lib/pgxs/config.
-------- Forwarded Message --------
Subject: [GENERAL] pgxs/config/missing is... missing
Date: Wed, 28 Oct 2015 12:54:54 -0500
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: pgsql-general <pgsql-general@postgresql.org>
CC: David E. Wheeler <david@justatheory.com>
I'm trying to install pgTAP on a FreeBSD machine and running into an odd
problem:
sed -e 's,MODULE_PATHNAME,$libdir/pgtap,g' -e 's,__OS__,freebsd,g' -e 's,__VERSION__,0.95,g' sql/pgtap-core.sql > sql/pgtap-core.tmp
/bin/sh /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing perl compat/gencore 0 sql/pgtap-core.tmp > sql/pgtap-core.sql
cannot open /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing: No such file or directory
Makefile:124: recipe for target 'sql/pgtap-core.sql' failed
That particular recipe is
sql/pgtap-core.sql: sql/pgtap.sql.in
cp $< $@
sed -e 's,sql/pgtap,sql/pgtap-core,g' compat/install-8.4.patch | patch -p0
sed -e 's,sql/pgtap,sql/pgtap-core,g' compat/install-8.3.patch | patch -p0
sed -e 's,MODULE_PATHNAME,$$libdir/pgtap,g' -e 's,__OS__,$(OSNAME),g' -e 's,__VERSION__,$(NUMVERSION),g' sql/pgtap-core.sql > sql/pgtap-core.tmp
$(PERL) compat/gencore 0 sql/pgtap-core.tmp > sql/pgtap-core.sql
rm sql/pgtap-core.tmp
and it's the $(PERL) that's failing. If I add this recipe
print-% : ; @echo $* = $($*)
and do
gmake print-PERL
I indeed get
PERL = /bin/sh
/usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing perl
even after explicitly exporting PERL=/usr/local/bin/perl
I see that there is a config/missing script in source, and that
Makefile.global.in references it:
src/Makefile.global.in:missing = $(SHELL) $(top_srcdir)/config/missing
Any ideas why it's not being installed, or why the PGXS Makefile is
ignoring/over-riding $PERL?
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Attachments:
patchtext/plain; charset=UTF-8; name=patch; x-mac-creator=0; x-mac-type=0Download+2-0
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
AFAICT the problem is that missing wasn't included in install or
uninstall in config/Makefile. Attached patch fixes that, and results in
missing being properly installed in lib/pgxs/config.
I thought we'd more or less rejected that approach in the previous thread.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/10/15 7:09 PM, Tom Lane wrote:
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
AFAICT the problem is that missing wasn't included in install or
uninstall in config/Makefile. Attached patch fixes that, and results in
missing being properly installed in lib/pgxs/config.I thought we'd more or less rejected that approach in the previous thread.
David Wheeler and I worked on a way to work around this in the pgTap
extension, but AFAICT there's a bug here. The FreeBSD packages seems to
be built without having PERL on the system, so if you try and use it
with PGXS to set PERL, you end up with
PERL = /bin/sh
/usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing perl
which is coming out of the PGXS makefile. And that would work fine, if
we were actually installing config/missing.
If instead of installing config/missing we want to just drop that file
completely we can do that, but then we should remove it from sorce and
from the makefiles.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/11/15 6:25 PM, Jim Nasby wrote:
On 12/10/15 7:09 PM, Tom Lane wrote:
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
AFAICT the problem is that missing wasn't included in install or
uninstall in config/Makefile. Attached patch fixes that, and results in
missing being properly installed in lib/pgxs/config.I thought we'd more or less rejected that approach in the previous
thread.David Wheeler and I worked on a way to work around this in the pgTap
extension, but AFAICT there's a bug here. The FreeBSD packages seems to
be built without having PERL on the system, so if you try and use it
with PGXS to set PERL, you end up withPERL = /bin/sh
/usr/local/lib/postgresql/pgxs/src/makefiles/../../config/missing perlwhich is coming out of the PGXS makefile. And that would work fine, if
we were actually installing config/missing.If instead of installing config/missing we want to just drop that file
completely we can do that, but then we should remove it from sorce and
from the makefiles.
Grr, right after sending this I found the thread you were talking about.
I'm not really sure our missing is better than just letting the error
bubble up. If folks think that's better then lets just rip missing out
entirely.
If we do decide to keep missing, we should probably clarify it's
messages to indicate that the relevant file was missing when *configure
was run*.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
Grr, right after sending this I found the thread you were talking about.
I'm not really sure our missing is better than just letting the error
bubble up. If folks think that's better then lets just rip missing out
entirely.
Well, that's what I was suggesting in the other thread, but it wasn't
drawing consensus.
Don't know if you noticed, but I committed your earlier patch a few
hours ago. We can revert it if we somehow get to a consensus that
we don't need "missing".
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers