Thread

  1. Patch: Perl xsubpp

    David Wheeler <david@kineticode.com> — 2011-09-15T16:44:20Z

    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
    
  2. Re: Patch: Perl xsubpp

    Alex Hunsaker <badalex@gmail.com> — 2011-09-15T21:41:02Z

    On Thu, Sep 15, 2011 at 10:44, David E. Wheeler <david@kineticode.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;
            }
        }
    
    
  3. Re: Patch: Perl xsubpp

    David Wheeler <david@kineticode.com> — 2011-09-15T21:53:26Z

    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
    
  4. Re: Patch: Perl xsubpp

    Alex Hunsaker <badalex@gmail.com> — 2011-09-15T22:04:15Z

    On Thu, Sep 15, 2011 at 15:53, David E. Wheeler <david@kineticode.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.
    
  5. Re: Patch: Perl xsubpp

    David Wheeler <david@kineticode.com> — 2011-10-12T23:53:26Z

    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
    
  6. Re: Patch: Perl xsubpp

    Alex Hunsaker <badalex@gmail.com> — 2011-10-13T00:55:02Z

    On Wed, Oct 12, 2011 at 17:53, David E. Wheeler <david@kineticode.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.
    
    
  7. Re: Patch: Perl xsubpp

    Andrew Dunstan <andrew@dunslane.net> — 2011-11-26T20:28:57Z

    
    On 10/12/2011 08:55 PM, Alex Hunsaker wrote:
    > On Wed, Oct 12, 2011 at 17:53, David E. Wheeler<david@kineticode.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
    
    
  8. Re: Patch: Perl xsubpp

    Aaron W. Swenson <titanofold@gentoo.org> — 2011-11-27T13:25:15Z

    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@kineticode.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@gentoo.org
    GnuPG FP : 2C00 7719 4F85 FB07 A49C  0E31 5713 AA03 D1BB FDA0
    GnuPG ID : D1BBFDA0
    
  9. Re: Patch: Perl xsubpp

    Andrew Dunstan <andrew@dunslane.net> — 2011-11-27T14:11:22Z

    
    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@kineticode.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
    
    
  10. Re: Patch: Perl xsubpp

    David E. Wheeler <david@justatheory.com> — 2011-11-27T20:12:41Z

    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
    
    
    
  11. Re: Patch: Perl xsubpp

    Aaron W. Swenson <titanofold@gentoo.org> — 2011-11-28T03:30:42Z

    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@gentoo.org
    GnuPG FP : 2C00 7719 4F85 FB07 A49C  0E31 5713 AA03 D1BB FDA0
    GnuPG ID : D1BBFDA0
    
  12. Re: Patch: Perl xsubpp

    Andrew Dunstan <andrew@dunslane.net> — 2011-11-28T12:56:47Z

    
    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
    
    
  13. Re: Patch: Perl xsubpp

    David E. Wheeler <david@justatheory.com> — 2011-11-28T17:37:11Z

    On Nov 28, 2011, at 4:56 AM, Andrew Dunstan wrote:
    
    > OK, it's done.
    
    Andrew++ Thanks!
    
    David