pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Fix msvc builds for ActivePerl > 5.24
3+ messages / 2 participants
[nested] [flat]
* pgsql: Fix msvc builds for ActivePerl > 5.24
@ 2018-03-02 11:42 Magnus Hagander <magnus@hagander.net>
2018-03-03 08:00 ` Re: pgsql: Fix msvc builds for ActivePerl > 5.24 Noah Misch <noah@leadboat.com>
0 siblings, 1 reply; 3+ messages in thread
From: Magnus Hagander @ 2018-03-02 11:42 UTC (permalink / raw)
To: pgsql-committers
Fix msvc builds for ActivePerl > 5.24
From this version ActivePerl ships both a .lib and a .a file for the
perl library, which our code would detect as there being no library
available. Instead, we should pick the .lib version and use that.
Report and suggested fix in bug #15065
Author: Heath Lord
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7240962f8626ff09bb8f9e71ecdb074775bdd035
Modified Files
--------------
src/tools/msvc/Mkvcbuild.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Fix msvc builds for ActivePerl > 5.24
2018-03-02 11:42 pgsql: Fix msvc builds for ActivePerl > 5.24 Magnus Hagander <magnus@hagander.net>
@ 2018-03-03 08:00 ` Noah Misch <noah@leadboat.com>
2018-03-04 17:04 ` Re: pgsql: Fix msvc builds for ActivePerl > 5.24 Magnus Hagander <magnus@hagander.net>
0 siblings, 1 reply; 3+ messages in thread
From: Noah Misch @ 2018-03-03 08:00 UTC (permalink / raw)
To: Magnus Hagander <magnus@hagander.net>; +Cc: pgsql-committers
On Fri, Mar 02, 2018 at 11:42:32AM +0000, Magnus Hagander wrote:
> Fix msvc builds for ActivePerl > 5.24
> --- a/src/tools/msvc/Mkvcbuild.pm
> +++ b/src/tools/msvc/Mkvcbuild.pm
> @@ -524,9 +524,11 @@ sub mkvcbuild
> my $perl_path = $solution->{options}->{perl} . '\lib\CORE\*perl*';
>
> # ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a
> + # Starting with ActivePerl 5.24, both perlnn.lib and libperlnn.a are provided.
> + # In this case, prefer .lib.
Sounds reasonable, but ...
> my @perl_libs =
> grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl_path);
> - if (@perl_libs == 1)
> + if (@perl_libs > 0)
> {
> $plperl->AddLibrary($perl_libs[0]);
> }
... the behavior doesn't match the comment. By default, glob() sorts by ASCII
value, so @perl_libs = qw(libperl524.a perl524.lib).
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Fix msvc builds for ActivePerl > 5.24
2018-03-02 11:42 pgsql: Fix msvc builds for ActivePerl > 5.24 Magnus Hagander <magnus@hagander.net>
2018-03-03 08:00 ` Re: pgsql: Fix msvc builds for ActivePerl > 5.24 Noah Misch <noah@leadboat.com>
@ 2018-03-04 17:04 ` Magnus Hagander <magnus@hagander.net>
0 siblings, 0 replies; 3+ messages in thread
From: Magnus Hagander @ 2018-03-04 17:04 UTC (permalink / raw)
To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-committers
On Sat, Mar 3, 2018 at 9:00 AM, Noah Misch <noah@leadboat.com> wrote:
> On Fri, Mar 02, 2018 at 11:42:32AM +0000, Magnus Hagander wrote:
> > Fix msvc builds for ActivePerl > 5.24
>
> > --- a/src/tools/msvc/Mkvcbuild.pm
> > +++ b/src/tools/msvc/Mkvcbuild.pm
> > @@ -524,9 +524,11 @@ sub mkvcbuild
> > my $perl_path = $solution->{options}->{perl} .
> '\lib\CORE\*perl*';
> >
> > # ActivePerl 5.16 provided perl516.lib; 5.18 provided
> libperl518.a
> > + # Starting with ActivePerl 5.24, both perlnn.lib and
> libperlnn.a are provided.
> > + # In this case, prefer .lib.
>
> Sounds reasonable, but ...
>
> > my @perl_libs =
> > grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl_path);
> > - if (@perl_libs == 1)
> > + if (@perl_libs > 0)
> > {
> > $plperl->AddLibrary($perl_libs[0]);
> > }
>
> ... the behavior doesn't match the comment. By default, glob() sorts by
> ASCII
> value, so @perl_libs = qw(libperl524.a perl524.lib).
>
That's what I get for actually assuming the submission matched the
description, and not properly testing.
Not being a perl guy, I've committed what I think is a correct fix.
Thanks for the spot!
--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/;
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-03-04 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02 11:42 pgsql: Fix msvc builds for ActivePerl > 5.24 Magnus Hagander <magnus@hagander.net>
2018-03-03 08:00 ` Noah Misch <noah@leadboat.com>
2018-03-04 17:04 ` Magnus Hagander <magnus@hagander.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox