Обсуждение: 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
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
Вложения
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)
> endif
>
> Could 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
Вложения
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
Вложения
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
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
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
Вложения
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