RE: BUG #16773: GSSAPI + Msys2/mingw64 + setenv() issue.

From: Тарасов Георгий Витальевич <Tarasov-G(at)gaz-is(dot)ru>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Jatoba <Jatoba(at)gaz-is(dot)ru>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #16773: GSSAPI + Msys2/mingw64 + setenv() issue.
Date: 2020-12-15 10:27:53
Message-ID: a25e165b98ad446d8cdc6ce4a38753d8@gaz-is.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Stephen,

Yes, I will definitely try proposed patch.
It seems obvious and in a current PG-code-style. I mean it's the same as putenv()/unsetenv().
But there is some misunderstanding why it is needed to have two functions putenv() and setenv() doing slightly same things??
It's a question to oneself rather, not needed to discuss here.
Probably exist some memory issues as noted in neighebour GSSAPI threads and threads referenced above.

So.
I think I can reproduce build environment and test all variants (patch/putenv + mingw64/msvc), but it's a work not for the one day.
I am starting digging and also will track this thread and publish my results later.

Making buildfarm agent is not possible at the moment due to the testing status of this work.
But it may be possible to setup one in our infrastructure in the future if test results will be considered as acceptable.

Thank you for your reply!
Regards
George Tarasov

-----Original Message-----
From: Stephen Frost [mailto:sfrost(at)snowman(dot)net]
Sent: Monday, December 14, 2020 10:39 PM
To: Jatoba <Jatoba(at)gaz-is(dot)ru>; pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16773: GSSAPI + Msys2/mingw64 + setenv() issue.

Greetings,

* PG Bug reporting form (noreply(at)postgresql(dot)org) wrote:
> I am being engaged in PostgreSQL build process with GSSAPI support in
> msys2/mingw64 environment.
> Everything is good enough on REL_11_STABLE branch, but there are the
> following compilation and linking errors on newer versions/branches
> (12-stable, 13-stable, and 14-devel).
>
> Errors connect with setenv() call that isn't supported in msys2/mingw64.

Yeah, we had some discussion regarding that, as you noted. There's been a further discussion though, here:

https://postgr.es/m/CA+OCxowDNTXfHBruAryhZA0aMxHvqHL4uYk8APiZCqjWAM=M-w@mail.gmail.com

Which seems to indicate that fixing the setenv() issue isn't enough to make things actually work. I'd been hoping that Dave would get back to that thread and provide some feedback on it, but that's not happened yet.

Perhaps you could take his patch and see if it works for you though..?

> Is there a plan to clean code from setenv() call and will the proposed
> patch [3] or its revised versions be applied ??

Would really be helpful if we could have some confidence that such a change would actually result in things working- so, if you could test the patch that Dave posted in the thread I linked to above and let us know if it works for you, that'd certainly be helpful.

> Also I have checked BuildFarm statuses and all mingw64-nodes build PG
> without GSSAPI/KRB5 support [4].
> It looks like the mingw64 platform is no longer being considered as
> LTS and will be in reduced feature list in the future.

I don't think there's any reason to jump to that assumption, however..

> Am i right?

.. if you'd like this to keep working then I would certainly encourage you to set up a buildfarm animal which tests this case and register it with the buildfarm. The lack of one certainly means it's less likely that this specific platform + configuration will be tested regularly.

Thanks,

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2020-12-15 14:03:31 Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch
Previous Message Neel Patel 2020-12-15 09:38:05 Re: [External] Re: pgadmin--pgagent---the process hang by unknow reasons