Re: plperl on windows

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Subject: Re: plperl on windows
Date: 2022-01-30 23:14:32
Message-ID: 20220130231432.GA2658915@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 30, 2022 at 02:16:59PM -0800, Andres Freund wrote:
> Specifically where USE_THREAD_SAFE_LOCALE is defined for msvc. Which explains
> why the same perl build ends up with different definitions for
> PerlInterpreter, depending on headers getting compiled with gcc or
> msvc.
>
> Seems pretty clear that this is something that should be determined at build,
> rather than at #include time?

Agreed.

> I tested that just forcing the msvc build to behave the same using
> NO_THREAD_SAFE_LOCALE makes the tests pass. Yay. But it's obviously not a
> great solution - I'm not aware of a windows perl distribution that uses msvc,
> but who knows.

Last I looked (~2017), EDB distributed an MSVC-built Perl as the designated
Perl to use with https://www.postgresql.org/download/windows/ plperl.

> > The error message about mismatched lib / perl binary could really use a bit
> > more detail. It's pretty darn annoying to figure out right now what it could
> > mean.
>
> I wonder if we could do something to improve that on our side. This isn't the
> first time we've hunted down this kind of mismatch. It'd be much friendlier if
> we could get an error at build time, rather than runtime.

The MSVC build system does give a build-time error ("Perl test fails with or
without ...") for a Perl ABI mismatch. It would be a simple matter of
programming to have the configure+gmake build system do the same.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-01-30 23:34:14 Re: plperl on windows
Previous Message Rémi Lapeyre 2022-01-30 22:56:57 Re: Add header support to text format and matching feature