pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: jatoba@gaz-is.ru
Subject: BUG #16773: GSSAPI + Msys2/mingw64 + setenv() issue.
Date: Mon, 14 Dec 2020 16:52:08 +0000
Message-ID: <16773-c0bb1bc300bde127@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16773
Logged by:          George Tarasov
Email address:      jatoba@gaz-is.ru
PostgreSQL version: 12.0
Operating system:   Windows MSYS2/MINGW64
Description:        

Dear hackers,

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.

be-secure-gssapi.c: In function 'secure_open_gssapi':
be-secure-gssapi.c:493:3: warning: implicit declaration of function
'setenv'; did you mean 'getenv'? [-Wimplicit-function-declaration]
   setenv("KRB5_KTNAME", pg_krb_server_keyfile, 1);
   ^~~~~~
   getenv

libpq/be-secure-gssapi.o: In function `secure_open_gssapi':
D:\postgresql\src\backend\libpq/be-secure-gssapi.c:493: undefined reference
to `setenv'
collect2.exe: error: ld returned 1 exit status

I have read this [1], this [2], and this [3] and as i understood it's
recommended to use more convenient putenv() insted of setenv().
But the function setenv() is still there and the patch proposed in [3] have
not yet been approved.

Please comment
Is there a plan to clean code from setenv() call and will the proposed patch
[3] or its revised versions be applied ??
Or setenv() is our Happy Future and PG-code will stay broken for non-common
execution environments, namely those, that use, for example, GSSAPI support
in msys2/mingw64.

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. 
Am i right?

Thanks!

[1] https://www.postgresql.org/message-id/30119.1576538578%40sss.pgh.pa.us
[2] https://www.postgresql.org/message-id/29478.1576537771%40sss.pgh.pa.us
[3]
https://www.postgresql.org/message-id/CAEudQArtoobDWsYV300qPrg4Nms_v6DkiBiewZ9nzn+KQKd9Qw@mail.gmail...
[4] https://buildfarm.postgresql.org/cgi-bin/show_status.pl



view thread (4+ messages)  latest in thread

Message-ID: <16773-c0bb1bc300bde127@postgresql.org>
Permalink:  ../16773-c0bb1bc300bde127@postgresql.org/
Also on:    postgresql.org/message-id/16773-c0bb1bc300bde127@postgresql.org

 · 

reply

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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, jatoba@gaz-is.ru
  Subject: Re: BUG #16773: GSSAPI + Msys2/mingw64 + setenv() issue.
  In-Reply-To: <16773-c0bb1bc300bde127@postgresql.org>

* 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