From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: MSVC vs Perl |
Date: | 2022-11-26 14:43:19 |
Message-ID: | 10509f7e-2f1b-7cec-20b7-74b4c123e209@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-11-25 Fr 18:52, Andrew Dunstan wrote:
> On 2022-11-25 Fr 18:48, Andrew Dunstan wrote:
>> For various reasons (see below) it's preferable to build on Windows with
>> Strawberry Perl. This works OK if you're building with Msys2, I upgraded
>> the instance on the machine that runs fairywren and drongo today, and
>> fairywren seems fine. Not so drongo, however. First it encountered a
>> build error, which I attempted to cure using something I found in the
>> vim sources [1]. That worked, but then there's a failure at runtime like
>> this:
>>
>> 2022-11-25 21:33:01.073 UTC [3764:3] pg_regress LOG: statement: CREATE EXTENSION IF NOT EXISTS "plperl"
>> src/pl/plperl/Util.c: loadable library and perl binaries are mismatched (got handshake key 0000000012800080, needed 0000000012900080)
>> 2022-11-25 21:33:01.100 UTC [5048:5] LOG: server process (PID 3764) exited with exit code 1
>>
>> I don't know how to debug this. I'm not sure if there's some flag we
>> could set which would cure it. It looks like a 1 bit difference, but I
>> haven't found what that bit corresponds to.
OK, so this cures the problem for drongo:
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 83a3e40425..dc6b94b74f 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -707,6 +707,7 @@ sub mkvcbuild
print "CFLAGS recommended by Perl: $Config{ccflags}\n";
print "CFLAGS to compile embedded Perl: ",
(join ' ', map { "-D$_" } @perl_embed_ccflags), "\n";
+ push @perl_embed_ccflags,'NO_THREAD_SAFE_LOCALE';
foreach my $f (@perl_embed_ccflags)
{
$plperl->AddDefine($f);
I'll see if it also works for bowerbird.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-11-26 15:11:15 | Re: postgres_fdw: batch inserts vs. before row triggers |
Previous Message | Ranier Vilela | 2022-11-26 14:30:07 | Re: Small miscellaneous fixes |