pgxs/config/missing is... missing

Started by Jim Nasbyabout 10 years ago13 messages
#1Jim Nasby
Jim.Nasby@BlueTreble.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

#2David E. Wheeler
david@justatheory.com
In reply to: Jim Nasby (#1)
1 attachment(s)
Re: pgxs/config/missing is... missing

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
0�	*�H��
��0�10	+0�	*�H��
��i0�-0��Q�0
	*�H��
0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0
150909050437Z
160909073817Z0F10Udavid@justatheory.com1$0"	*�H��
	david@justatheory.com0�"0
	*�H��
�0�
��zg���P����������:�BV��h/�a�UcTD��L������V�9
��&��2��O*@@�g����E�����!�Ta��G�����R�B�����RI�\g��K��.7��������8��,dr��B��}���F��)�y��n��38�]$D) ��g�'
Hz�"�������`EVl�{<���q�h��A�-���=��:�m���nlxsN~�����jo���s�FV������1IB8p�1���0��0	U00U�0U%0++0U���D�!���<�rV6
���0U#0�Sr������\|~�5N���Q�0 U0�david@justatheory.com0�LU �C0�?0�;+��70�*0.+"http://www.startssl.com/policy.pdf0��+0��0' StartCom Certification Authority0��This certificate was issued according to the Class 1 Validation requirements of the StartCom CA policy, reliance only for the intended purpose in compliance of the relying party obligations.06U/0-0+�)�'�%http://crl.startssl.com/crtu1-crl.crl0��+��009+0�-http://ocsp.startssl.com/sub/class1/client/ca0B+0�6http://aia.startssl.com/certs/sub.class1.client.ca.crt0#U0�http://www.startssl.com/0
	*�H��
�r��������.��;�-a�����������L��O��4���}��F�,^��Y�,�'�d���7:�LR|��s=�9v|\K	��C�@�Y����VW�h Ev����M6��I�oIJ!y����l_����������3������V	[�\�nsD����|�~u����P��Tn�	C��_V!�{A�>��;g���^��,�a�d�X�T��vlO7��L��S>���N*i]m���R�tn����/k0�40��0
	*�H��
0}10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0
071024210155Z
171024210155Z0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0�"0
	*�H��
�0�
��	���-��)�.����2����A�UG��o���#G�
��B|N�D�����Rp�M-��B��=o���-�we�5��J�Qpa>O��.�#������.���_�<���V��
[~�*��*�p�z��~�3�W�G�.�������Ml�r[�<C�e�6���f����q������O���"��u��xf�WN�#�u����i���c�gk��v$����Lb�%�������y��`�����_�{`���xK'G�N������0��0U�0�0U�0USr������\|~�5N���Q�0U#0�N��@[�i�0�4hC�A��0f+Z0X0'+0�http://ocsp.startssl.com/ca0-+0�!http://www.startssl.com/sfsca.crt0[UT0R0'�%�#�!http://www.startssl.com/sfsca.crl0'�%�#�!http://crl.startssl.com/sfsca.crl0��U y0w0u+��70f0.+"http://www.startssl.com/policy.pdf04+(http://www.startssl.com/intermediate.pdf0
	*�H��
�
�}x�,\�c�^��#wM�q�}��>UK/��^y��X��y	�����f�rMI���B6�1ymQ���������Z���0���&��;�@��#13q����&	����������o�	6�r��_��;�GO>*I�(	7�4����XS1r3��)!����y��6Ko����t��#
_�w�S�r����
�;�B
A�Dp�(f��s����������6%�����.W0J3�:b�C�<�8t X����1�<��C��n�=�����t==�wS���T������~���\�wkB�f�|1���5���zU��P)��(���I��j��VB��!����OfI=b��b�\4�-*em��/��SJm�7���N�����[�]'��@����D9�Kr>���R��7/����|�o���^I@���'��Pa$ z��9�a'L�)��(�
�I��}v��c�H]����D����*��W�}
m�>Q����|�C.�(,�l��Q�1�o0�k0��0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0	+���0	*�H��
	1	*�H��
0	*�H��
	1
151029223111Z0#	*�H��
	1:�'��K}V�3�@�B�����0��	+�71��0��0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0��*�H��
	1�����0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0
	*�H��
�J��v�~�R���
���U���P��B>F���o��o��x�����])�L�H�O"d��x�*�.)�6
�V�o����P�^�N8���h
���%�uN��-��|��
3`-���Y���z�����4h�9��H���!�Q�Z���T��4��d�����gU�����0�����0+-���d��"������@N9$�������PtnK
q��.5`o���x�5Z(���c�W�Bn���7��P�
#3Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: David E. Wheeler (#2)
1 attachment(s)
Re: pgxs/config/missing is... missing

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

Attachments:

patch.difftext/plain; charset=UTF-8; name=patch.diff; x-mac-creator=0; x-mac-type=0Download
diff --git a/config/Makefile b/config/Makefile
index da12838..67e7998 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -7,9 +7,11 @@ include $(top_builddir)/src/Makefile.global
 
 install: all installdirs
 	$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
+	$(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing'
 
 installdirs:
 	$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'
 
 uninstall:
 	rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh'
+	rm -f '$(DESTDIR)$(pgxsdir)/config/missing'
#4David E. Wheeler
david@justatheory.com
In reply to: Jim Nasby (#3)
1 attachment(s)
Re: pgxs/config/missing is... missing

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
0�	*�H��
��0�10	+0�	*�H��
��i0�-0��Q�0
	*�H��
0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0
150909050437Z
160909073817Z0F10Udavid@justatheory.com1$0"	*�H��
	david@justatheory.com0�"0
	*�H��
�0�
��zg���P����������:�BV��h/�a�UcTD��L������V�9
��&��2��O*@@�g����E�����!�Ta��G�����R�B�����RI�\g��K��.7��������8��,dr��B��}���F��)�y��n��38�]$D) ��g�'
Hz�"�������`EVl�{<���q�h��A�-���=��:�m���nlxsN~�����jo���s�FV������1IB8p�1���0��0	U00U�0U%0++0U���D�!���<�rV6
���0U#0�Sr������\|~�5N���Q�0 U0�david@justatheory.com0�LU �C0�?0�;+��70�*0.+"http://www.startssl.com/policy.pdf0��+0��0' StartCom Certification Authority0��This certificate was issued according to the Class 1 Validation requirements of the StartCom CA policy, reliance only for the intended purpose in compliance of the relying party obligations.06U/0-0+�)�'�%http://crl.startssl.com/crtu1-crl.crl0��+��009+0�-http://ocsp.startssl.com/sub/class1/client/ca0B+0�6http://aia.startssl.com/certs/sub.class1.client.ca.crt0#U0�http://www.startssl.com/0
	*�H��
�r��������.��;�-a�����������L��O��4���}��F�,^��Y�,�'�d���7:�LR|��s=�9v|\K	��C�@�Y����VW�h Ev����M6��I�oIJ!y����l_����������3������V	[�\�nsD����|�~u����P��Tn�	C��_V!�{A�>��;g���^��,�a�d�X�T��vlO7��L��S>���N*i]m���R�tn����/k0�40��0
	*�H��
0}10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0
071024210155Z
171024210155Z0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0�"0
	*�H��
�0�
��	���-��)�.����2����A�UG��o���#G�
��B|N�D�����Rp�M-��B��=o���-�we�5��J�Qpa>O��.�#������.���_�<���V��
[~�*��*�p�z��~�3�W�G�.�������Ml�r[�<C�e�6���f����q������O���"��u��xf�WN�#�u����i���c�gk��v$����Lb�%�������y��`�����_�{`���xK'G�N������0��0U�0�0U�0USr������\|~�5N���Q�0U#0�N��@[�i�0�4hC�A��0f+Z0X0'+0�http://ocsp.startssl.com/ca0-+0�!http://www.startssl.com/sfsca.crt0[UT0R0'�%�#�!http://www.startssl.com/sfsca.crl0'�%�#�!http://crl.startssl.com/sfsca.crl0��U y0w0u+��70f0.+"http://www.startssl.com/policy.pdf04+(http://www.startssl.com/intermediate.pdf0
	*�H��
�
�}x�,\�c�^��#wM�q�}��>UK/��^y��X��y	�����f�rMI���B6�1ymQ���������Z���0���&��;�@��#13q����&	����������o�	6�r��_��;�GO>*I�(	7�4����XS1r3��)!����y��6Ko����t��#
_�w�S�r����
�;�B
A�Dp�(f��s����������6%�����.W0J3�:b�C�<�8t X����1�<��C��n�=�����t==�wS���T������~���\�wkB�f�|1���5���zU��P)��(���I��j��VB��!����OfI=b��b�\4�-*em��/��SJm�7���N�����[�]'��@����D9�Kr>���R��7/����|�o���^I@���'��Pa$ z��9�a'L�)��(�
�I��}v��c�H]����D����*��W�}
m�>Q����|�C.�(,�l��Q�1�o0�k0��0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0	+���0	*�H��
	1	*�H��
0	*�H��
	1
151030154043Z0#	*�H��
	1'��������N��5)��0��	+�71��0��0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0��*�H��
	1�����0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0
	*�H��
��V�H��tJ3I�G�T�����y�3��t,��c.����g����[��t��c_�X����g�������(>q��s$������/����'nb�����F^���
f�0�#������UL��"L��PK���8kO����/�A��M���S0����A�H[�@^�'E,���1h���O|A
|`�| -|?���.m�����	���%�I2vP:Sr�3�B�s������3�Ws���BU��)+�
#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: David E. Wheeler (#4)
Re: pgxs/config/missing is... missing

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

#6Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Alvaro Herrera (#5)
Re: pgxs/config/missing is... missing

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

#7David E. Wheeler
david@justatheory.com
In reply to: Jim Nasby (#6)
1 attachment(s)
Re: pgxs/config/missing is... missing

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
0�	*�H��
��0�10	+0�	*�H��
��i0�-0��Q�0
	*�H��
0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0
150909050437Z
160909073817Z0F10Udavid@justatheory.com1$0"	*�H��
	david@justatheory.com0�"0
	*�H��
�0�
��zg���P����������:�BV��h/�a�UcTD��L������V�9
��&��2��O*@@�g����E�����!�Ta��G�����R�B�����RI�\g��K��.7��������8��,dr��B��}���F��)�y��n��38�]$D) ��g�'
Hz�"�������`EVl�{<���q�h��A�-���=��:�m���nlxsN~�����jo���s�FV������1IB8p�1���0��0	U00U�0U%0++0U���D�!���<�rV6
���0U#0�Sr������\|~�5N���Q�0 U0�david@justatheory.com0�LU �C0�?0�;+��70�*0.+"http://www.startssl.com/policy.pdf0��+0��0' StartCom Certification Authority0��This certificate was issued according to the Class 1 Validation requirements of the StartCom CA policy, reliance only for the intended purpose in compliance of the relying party obligations.06U/0-0+�)�'�%http://crl.startssl.com/crtu1-crl.crl0��+��009+0�-http://ocsp.startssl.com/sub/class1/client/ca0B+0�6http://aia.startssl.com/certs/sub.class1.client.ca.crt0#U0�http://www.startssl.com/0
	*�H��
�r��������.��;�-a�����������L��O��4���}��F�,^��Y�,�'�d���7:�LR|��s=�9v|\K	��C�@�Y����VW�h Ev����M6��I�oIJ!y����l_����������3������V	[�\�nsD����|�~u����P��Tn�	C��_V!�{A�>��;g���^��,�a�d�X�T��vlO7��L��S>���N*i]m���R�tn����/k0�40��0
	*�H��
0}10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0
071024210155Z
171024210155Z0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0�"0
	*�H��
�0�
��	���-��)�.����2����A�UG��o���#G�
��B|N�D�����Rp�M-��B��=o���-�we�5��J�Qpa>O��.�#������.���_�<���V��
[~�*��*�p�z��~�3�W�G�.�������Ml�r[�<C�e�6���f����q������O���"��u��xf�WN�#�u����i���c�gk��v$����Lb�%�������y��`�����_�{`���xK'G�N������0��0U�0�0U�0USr������\|~�5N���Q�0U#0�N��@[�i�0�4hC�A��0f+Z0X0'+0�http://ocsp.startssl.com/ca0-+0�!http://www.startssl.com/sfsca.crt0[UT0R0'�%�#�!http://www.startssl.com/sfsca.crl0'�%�#�!http://crl.startssl.com/sfsca.crl0��U y0w0u+��70f0.+"http://www.startssl.com/policy.pdf04+(http://www.startssl.com/intermediate.pdf0
	*�H��
�
�}x�,\�c�^��#wM�q�}��>UK/��^y��X��y	�����f�rMI���B6�1ymQ���������Z���0���&��;�@��#13q����&	����������o�	6�r��_��;�GO>*I�(	7�4����XS1r3��)!����y��6Ko����t��#
_�w�S�r����
�;�B
A�Dp�(f��s����������6%�����.W0J3�:b�C�<�8t X����1�<��C��n�=�����t==�wS���T������~���\�wkB�f�|1���5���zU��P)��(���I��j��VB��!����OfI=b��b�\4�-*em��/��SJm�7���N�����[�]'��@����D9�Kr>���R��7/����|�o���^I@���'��Pa$ z��9�a'L�)��(�
�I��}v��c�H]����D����*��W�}
m�>Q����|�C.�(,�l��Q�1�o0�k0��0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0	+���0	*�H��
	1	*�H��
0	*�H��
	1
151030195532Z0#	*�H��
	1I
�x��������i|i�T��0��	+�71��0��0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0��*�H��
	1�����0��10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CAQ�0
	*�H��
���r�?�������_�q>\�y��d��w�(
y.A3&�����!����WM��]��3��"����z�T�-2AK*_b�-_�3\S�^�K���x������GJ������0�.8��V�;p\��_�6��0���aJ�@���X>����h	]��[���b��),�V(^%�����zn#���;#Wv��i�`r���!������2�~PrM�������ZZy��W| ��
X����0�{���
#8Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: David E. Wheeler (#7)
Re: pgxs/config/missing is... missing

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

#9Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Jim Nasby (#1)
1 attachment(s)
Fwd: [GENERAL] pgxs/config/missing is... missing

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
diff --git a/config/Makefile b/config/Makefile
index da12838..67e7998 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -7,9 +7,11 @@ include $(top_builddir)/src/Makefile.global
 
 install: all installdirs
 	$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
+	$(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing'
 
 installdirs:
 	$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'
 
 uninstall:
 	rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh'
+	rm -f '$(DESTDIR)$(pgxsdir)/config/missing'
#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jim Nasby (#9)
Re: Fwd: [GENERAL] pgxs/config/missing is... missing

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

#11Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Tom Lane (#10)
Re: Fwd: [GENERAL] pgxs/config/missing is... missing

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

#12Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Jim Nasby (#11)
Re: Fwd: [GENERAL] pgxs/config/missing is... missing

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

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

#13Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jim Nasby (#12)
Re: Fwd: [GENERAL] pgxs/config/missing is... missing

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