Lists: | pgsql-hackers |
---|
From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Patch: Perl xsubpp |
Date: | 2011-09-15 16:44:20 |
Message-ID: | 9B946296-A2EB-4B45-A190-153F06662F8B@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hackers,
Since installing Perl 5.14.1, I installed newer version of ExtUtils::ParseXS from CPAN. I installed it with `make install UNINST=1`, which removes the copy of xsubpp that ships with core Perl. This results in an error during PostgreSQL `make`:
make -C plperl install
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -I. -I. -I../../../src/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/lib/perl5/5.14.1/darwin-thread-multi-2level/CORE -c -o plperl.o plperl.c
'/usr/local/bin/perl' /usr/local/lib/perl5/5.14.1/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.14.1/ExtUtils/typemap SPI.xs >SPI.c
Can't open perl script "/usr/local/lib/perl5/5.14.1/ExtUtils/xsubpp": No such file or directory
I [asked][] Perl 5 Porters for the proper way to find xsubpp, and was [told][] that it was probably best to look in @Config{qw(installsitebin installvendorbin installbin)}.
[asked]: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-09/msg00501.html
[told]: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-09/msg00686.html
The attached patch makes this change. I've tested it on Mac OS X and it works fine. Someone else will have to test it on Windows.
Best,
David
Attachment | Content-Type | Size |
---|---|---|
xsubpp.patch | application/octet-stream | 2.5 KB |
From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-09-15 21:41:02 |
Message-ID: | CAFaPBrQt_hKM3MtMAbfm9F5ffHAXcLow_iEsZFDMq6Tud8WuWw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Sep 15, 2011 at 10:44, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> Hackers,
>
> Since installing Perl 5.14.1, I installed newer version of ExtUtils::ParseXS from CPAN. I installed it with `make install UNINST=1`, which removes the copy of xsubpp that ships with core Perl. This results in an error during PostgreSQL `make`:
>
> make -C plperl install
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -I. -I. -I../../../src/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/lib/perl5/5.14.1/darwin-thread-multi-2level/CORE -c -o plperl.o plperl.c
> '/usr/local/bin/perl' /usr/local/lib/perl5/5.14.1/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.14.1/ExtUtils/typemap SPI.xs >SPI.c
> Can't open perl script "/usr/local/lib/perl5/5.14.1/ExtUtils/xsubpp": No such file or directory
>
> I [asked][] Perl 5 Porters for the proper way to find xsubpp, and was [told][] that it was probably best to look in @Config{qw(installsitebin installvendorbin installbin)}.
Doesn't work for me :-( I have:
'installbin' => '/usr/bin',
'installsitebin' => '/usr/bin',
'installvendorbin' => '/usr/bin',
'installscript' => '/usr/bin/core_perl',
'installprivlib' => '/usr/share/perl5/core_perl',
'installsitescript' => '/usr/bin/site_perl',
$ ls /usr/bin/xsubpp
ls: cannot access /usr/bin/xsubpp: No such file or directory
$ ls /usr/bin/core_perl/xsubpp
/usr/bin/core_perl/xsubpp
The worst part is it tells me I need to configure with --with-perl.
Seems it complaining that it couldn't find xsubpp, I did configure
with perl!
Normally it uses the one in /usr/share/perl5/core_perl/ExtUtils/xsubpp.
Also it looks like it uses the wrong typemap file, still uses the one
from privlib.
So then I tried to install the newer ExtUtils::ParseXS to see where it
installed xsubpp for me. It reports:
...
Installing /usr/share/perl5/site_perl/ExtUtils/xsubpp
....
Installing /usr/bin/site_perl/xsubpp
Looking at its makefile looks like installs xsubpp into
installsitescript. Seems install(site|vendor)bin is quite right :-(.
ExtUtils searches @INC, privlibexp maybe we should do that?
ExtUtils/MM_Unix.pm:
# line 3456
sub tool_xsubpp {
....
my @xsubpp_dirs = @INC;
# Make sure we pick up the new xsubpp if we're building perl.
unshift @xsubpp_dirs, $self->{PERL_LIB} if $self->{PERL_CORE};
foreach my $dir (@xsubpp_dirs) {
$xsdir = $self->catdir($dir, 'ExtUtils');
if( -r $self->catfile($xsdir, "xsubpp") ) {
last;
}
}
From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Alex Hunsaker <badalex(at)gmail(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-09-15 21:53:26 |
Message-ID: | 8AFE4EB8-8F6F-4F0C-9453-59D776B7BC86@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sep 15, 2011, at 4:41 PM, Alex Hunsaker wrote:
> ExtUtils searches @INC, privlibexp maybe we should do that?
Yes, I just got an email from David Golden to that effect. So perhaps the attached patch is better?
Best,
David
Attachment | Content-Type | Size |
---|---|---|
xsubpp2.patch | application/octet-stream | 2.6 KB |
From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-09-15 22:04:15 |
Message-ID: | CAFaPBrSKmWB=bTEBxKdmpBVgjc_KfDbUkKvWutz8D_g8ED5ESA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Sep 15, 2011 at 15:53, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On Sep 15, 2011, at 4:41 PM, Alex Hunsaker wrote:
>
>> ExtUtils searches @INC, privlibexp maybe we should do that?
>
> Yes, I just got an email from David Golden to that effect. So perhaps the attached patch is better?
Close, seems I was wrong about the typemap ExtUtils::ParseXS does not
install a new one so we still need to point to the one in privlib.
Also xsubpp is not executable so the test should be -r or something.
Also don't think we should change the configure switch tests to test XSUBPPDIR.
Find those plus some minor typos fixed in the attached.
Attachment | Content-Type | Size |
---|---|---|
xsubpp_v3.patch | text/x-patch | 2.9 KB |
From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Alex Hunsaker <badalex(at)gmail(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-10-12 23:53:26 |
Message-ID: | E1FCDA42-5EB2-441F-A0E1-69ECA3794CB1@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sep 15, 2011, at 3:04 PM, Alex Hunsaker wrote:
> Close, seems I was wrong about the typemap ExtUtils::ParseXS does not
> install a new one so we still need to point to the one in privlib.
> Also xsubpp is not executable so the test should be -r or something.
>
> Also don't think we should change the configure switch tests to test XSUBPPDIR.
>
> Find those plus some minor typos fixed in the attached.
> <xsubpp_v3.patch>
> --
Doesn't look like this has been applied yet. I think it ought to be backported, too, frankly. DId I miss it?
Best,
David
From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-10-13 00:55:02 |
Message-ID: | CAFaPBrQC+kCgCBgDh-OkjPDqr1YQ-4=OermxMajqd+--8vDvhg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Oct 12, 2011 at 17:53, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On Sep 15, 2011, at 3:04 PM, Alex Hunsaker wrote:
>
>> Close, seems I was wrong about the typemap ExtUtils::ParseXS does not
>> install a new one so we still need to point to the one in privlib.
>> Also xsubpp is not executable so the test should be -r or something.
>>
>> Also don't think we should change the configure switch tests to test XSUBPPDIR.
>>
>> Find those plus some minor typos fixed in the attached.
>> <xsubpp_v3.patch>
>> --
>
> Doesn't look like this has been applied yet. I think it ought to be backported, too, frankly. DId I miss it?
Nah, probably should add it to the next commit fest so it does not get
forgotten.
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Alex Hunsaker <badalex(at)gmail(dot)com> |
Cc: | "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-11-26 20:28:57 |
Message-ID: | 4ED14C09.2030100@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 10/12/2011 08:55 PM, Alex Hunsaker wrote:
> On Wed, Oct 12, 2011 at 17:53, David E. Wheeler<david(at)kineticode(dot)com> wrote:
>> On Sep 15, 2011, at 3:04 PM, Alex Hunsaker wrote:
>>
>>> Close, seems I was wrong about the typemap ExtUtils::ParseXS does not
>>> install a new one so we still need to point to the one in privlib.
>>> Also xsubpp is not executable so the test should be -r or something.
>>>
>>> Also don't think we should change the configure switch tests to test XSUBPPDIR.
>>>
>>> Find those plus some minor typos fixed in the attached.
>>> <xsubpp_v3.patch>
>>> --
>> Doesn't look like this has been applied yet. I think it ought to be backported, too, frankly. DId I miss it?
> Nah, probably should add it to the next commit fest so it does not get
> forgotten.
>
committed.
cheers
andrew
From: | "Mr(dot) Aaron W(dot) Swenson" <titanofold(at)gentoo(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-11-27 13:25:15 |
Message-ID: | 20111127132514.GA2411@atrus.grandmasfridge.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sat, Nov 26, 2011 at 03:28:57PM -0500, Andrew Dunstan wrote:
> On 10/12/2011 08:55 PM, Alex Hunsaker wrote:
> > On Wed, Oct 12, 2011 at 17:53, David E.
> > Wheeler<david(at)kineticode(dot)com> wrote:
> >> On Sep 15, 2011, at 3:04 PM, Alex Hunsaker wrote:
> >>
> >>> Close, seems I was wrong about the typemap ExtUtils::ParseXS does not
> >>> install a new one so we still need to point to the one in privlib.
> >>> Also xsubpp is not executable so the test should be -r or something.
> >>>
> >>> Also don't think we should change the configure switch tests to
> >>> test XSUBPPDIR.
> >>>
> >>> Find those plus some minor typos fixed in the attached.
> >>> <xsubpp_v3.patch>
> >>> --
> >> Doesn't look like this has been applied yet. I think it ought to
> >> be backported, too, frankly. DId I miss it?
> > Nah, probably should add it to the next commit fest so it does not get
> > forgotten.
> >
>
> committed.
>
> cheers
>
> andrew
Has this been backpatched as well?
--
Mr. Aaron W. Swenson
Gentoo Linux Developer
Email : titanofold(at)gentoo(dot)org
GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
GnuPG ID : D1BBFDA0
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-11-27 14:11:22 |
Message-ID: | 4ED2450A.90108@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 11/27/2011 08:25 AM, Mr. Aaron W. Swenson wrote:
> On Sat, Nov 26, 2011 at 03:28:57PM -0500, Andrew Dunstan wrote:
>> On 10/12/2011 08:55 PM, Alex Hunsaker wrote:
>>> On Wed, Oct 12, 2011 at 17:53, David E.
>>> Wheeler<david(at)kineticode(dot)com> wrote:
>>>> On Sep 15, 2011, at 3:04 PM, Alex Hunsaker wrote:
>>>>
>>>>> Close, seems I was wrong about the typemap ExtUtils::ParseXS does not
>>>>> install a new one so we still need to point to the one in privlib.
>>>>> Also xsubpp is not executable so the test should be -r or something.
>>>>>
>>>>> Also don't think we should change the configure switch tests to
>>>>> test XSUBPPDIR.
>>>>>
>>>>> Find those plus some minor typos fixed in the attached.
>>>>> <xsubpp_v3.patch>
>>>>> --
>>>> Doesn't look like this has been applied yet. I think it ought to
>>>> be backported, too, frankly. DId I miss it?
>>> Nah, probably should add it to the next commit fest so it does not get
>>> forgotten.
>>>
>> committed.
>>
>>
> Has this been backpatched as well?
It has been to 9.1.
cheers
andrew
From: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-11-27 20:12:41 |
Message-ID: | 90FFAA46-275E-414D-AE8C-279655999CE4@justatheory.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Nov 27, 2011, at 6:11 AM, Andrew Dunstan wrote:
>> Has this been backpatched as well?
>
> It has been to 9.1.
There may be a simple workaround, but it's non-obvious. I think it should be back-patched all the way.
Best,
David
From: | "Mr(dot) Aaron W(dot) Swenson" <titanofold(at)gentoo(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-11-28 03:30:42 |
Message-ID: | 20111128032909.GB6739@atrus.grandmasfridge.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sun, Nov 27, 2011 at 12:12:41PM -0800, David E. Wheeler wrote:
> On Nov 27, 2011, at 6:11 AM, Andrew Dunstan wrote:
>
> >> Has this been backpatched as well?
> >
> > It has been to 9.1.
>
> There may be a simple workaround, but it's non-obvious. I think it should be back-patched all the way.
>
> Best,
>
> David
That's my vote, too. It's preventing users of all versions from compiling
against ExtUtils-ParseXS-3.20.0.
--
Mr. Aaron W. Swenson
Gentoo Linux
Developer, Proxy Committer
Email : titanofold(at)gentoo(dot)org
GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
GnuPG ID : D1BBFDA0
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-11-28 12:56:47 |
Message-ID: | 4ED3850F.1010904@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 11/27/2011 10:30 PM, Mr. Aaron W. Swenson wrote:
> On Sun, Nov 27, 2011 at 12:12:41PM -0800, David E. Wheeler wrote:
>> On Nov 27, 2011, at 6:11 AM, Andrew Dunstan wrote:
>>
>>>> Has this been backpatched as well?
>>> It has been to 9.1.
>> There may be a simple workaround, but it's non-obvious. I think it should be back-patched all the way.
>>
>> Best,
>>
>> David
> That's my vote, too. It's preventing users of all versions from compiling
> against ExtUtils-ParseXS-3.20.0.
>
OK, it's done.
cheers
andrew
From: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Perl xsubpp |
Date: | 2011-11-28 17:37:11 |
Message-ID: | 66428A4C-6C8B-4FDE-82B4-E76C028C67AE@justatheory.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Nov 28, 2011, at 4:56 AM, Andrew Dunstan wrote:
> OK, it's done.
Andrew++ Thanks!
David