From: Andrew Dunstan <andrew@dunslane.net>
To: Muralikrishna Bandaru <muralikrishna.bandaru@enterprisedb.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: pl/perl extension fails on Windows
Date: Tue, 10 Sep 2024 09:47:09 -0400
Message-ID: <11f06540-85a8-4fbc-8922-b03bf9ef92b7@dunslane.net> (raw)
In-Reply-To: <35af00d5-0cc6-4c22-9367-5af3b50ee96b@dunslane.net>
References: <CA+uec8DHo92L25mac6=yrZTcP6wAnmkMbxqk47RfCf3MzY39fA@mail.gmail.com>
<35af00d5-0cc6-4c22-9367-5af3b50ee96b@dunslane.net>
On 2024-09-10 Tu 7:51 AM, Andrew Dunstan wrote:
>
>
> On 2024-09-10 Tu 6:20 AM, Muralikrishna Bandaru wrote:
>> Hi,
>> I built PG17 rc1 using meson on Windows with the option
>> "-Dplperl=enabled" . When I tried to create the extension,it crashed
>> the database.
>> --
>> postgres=# create extension plperl;
>> server closed the connection unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
>> The connection to the server was lost. Attempting reset: Succeeded.
>>
>> The log contains the following error.
>>
>> *src/pl/plperl/Util.c: loadable library and perl binaries are
>> mismatched (got first handshake key 0000000012d00080, needed
>> 0000000012c00080)*
>> --
>> This issue is seen with strawberry perl *5.40* not with *5.38* . The
>> Perl that is used during compilation and on the target machine is the
>> same.
>>
>> I have used strawberry perl 5.40 , which is available in the
>> strawberry perl home page <https://strawberryperl.com/> ,but 5.40 is
>> not available in the release page
>> <https://strawberryperl.com/releases.html; . So, is it recommended to
>> use perl 5.40 ?
>>
>> Please let me know if you need any other information.
>
>
> We've seen similar things before. See for example:
>
> https://postgr.es/m/20211005004334.tgjmro4kuachwiuc@alap3.anarazel.de
> https://postgr.es/m/c2da86a0-2906-744c-923d-16da6047875e@dunslane.net
>
> This looks like we are defining something we should not be, or not
> defining something we should be. We just need to find out what it is :-)
>
> In the meantime, I would suggest sticking to 5.38.
>
>
>
Now I've had a chance to take a look I see that Strawberry 5.40 has
USE_THREAD_SAFE_LOCALE defined. Can you try what happens with 5.40 if
you comment out theses lines in meson.build?
if cc.get_id() == 'msvc'
# prevent binary mismatch between MSVC built plperl and
Strawberry or
# msys ucrt perl libraries
perl_ccflags += ['-DNO_THREAD_SAFE_LOCALE']
endif
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: andrew@dunslane.net, muralikrishna.bandaru@enterprisedb.com, pgsql-bugs@lists.postgresql.org
Subject: Re: pl/perl extension fails on Windows
In-Reply-To: <11f06540-85a8-4fbc-8922-b03bf9ef92b7@dunslane.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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