gettext instructions for Windows seems wrong

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема gettext instructions for Windows seems wrong
Дата
Msg-id 164246013804.31952.4958087335645367498@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: gettext instructions for Windows seems wrong  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/install-windows-full.html
Description:

I have to build Postgres on Windows 10. I got everything building from a git
checkout without NLS. I followed the instructions the way I understood them
(possibly incorrectly).

To add NLS support, I read this:
Gettext is required to build with NLS support, and can be downloaded from
http://gnuwin32.sourceforge.net. Note that binaries, dependencies and
developer files are all needed.

So, I went to that site and downloaded the binaries, dependencies, and
developer files as three separate ZIPs. I created a folder,
C:\Users\Documents\Code\libintl and then extracted all three ZIPs into that
directory. In that folder, there end up being directories for: bin, contrib,
include, lib, man, manifest, share. This makes sense to me; all the
extracted files are merged into one coherent directory tree rooted at
C:\Users\Documents\Code\libintl.

The instructions say that I have to edit config.pl (actually, I had to
create it), and I added this line:
$config->{nls} = 'C:\Users\dcbow\Documents\Code\libintl';

Then when I run "build", I get:

fe-misc.obj : error LNK2019: unresolved external symbol
__imp_libintl_dgettext referenced in function libpq_gettext
[c:\Users\dcbow\Documents\Code\postgres\libpq.vcxproj]
fe-misc.obj : error LNK2019: unresolved external symbol
__imp_libintl_dngettext referenced in function libpq_ngettext
[c:\Users\dcbow\Documents\Code\postgres\libpq.vcxproj]
fe-misc.obj : error LNK2019: unresolved external symbol
__imp_libintl_bindtextdomain referenced in function libpq_binddomain
[c:\Users\dcbow\Documents\Code\postgres\libpq.vcxproj]
libpgport.lib(strerror.obj) : error LNK2019: unresolved external symbol
__imp_libintl_gettext referenced in function pg_strerror_r
[c:\Users\dcbow\Documents\Code\postgres\libpq.vcxproj]
libpgport.lib(chklocale.obj) : error LNK2001: unresolved external symbol
__imp_libintl_gettext
[c:\Users\dcbow\Documents\Code\postgres\libpq.vcxproj]
C:\Users\dcbow\Documents\Code\libintl\lib\libintl.lib : warning LNK4272:
library machine type 'x86' conflicts with target machine type 'x64'
[c:\Users\dcbow\Documents\Code\postgres\libpq.vcxproj]
.\Debug\libpq\libpq.dll : fatal error LNK1120: 4 unresolved externals
[c:\Users\dcbow\Documents\Code\postgres\libpq.vcxproj]

Based on the line containing LNK4272, I learned two things here: 1. It seems
like extracting the files that I did in the place that I did and also
setting the line in config.pl that I did all seem right; at least the build
can find the files. 2. It's 32 bit, not 64, which seems to create another
problem. The documentation says: "To use a server-side third party library
such as python or OpenSSL, this library must also be 64-bit. There is no
support for loading a 32-bit library in a 64-bit server. "

I'm trying to build this, rather than use the installer,  in order to find
whatever commit introduced a particular bug in libpq. I downloaded the
binary (ZIP) files from EnterpriseDB at
https://www.enterprisedb.com/download-postgresql-binaries, and they include
libintl-9.dll. In fact, in at least 12.9, 13.5 and 14.1, it's the exact same
binary. But the libintl DLL that's in http://gnuwin32.sourceforge.net/ is
named libintl3.dll and was built 17 years ago.

So, my chief complaint is that the gettext/libintl download that's listed in
the documentation is a creaky antique that, due to API changes and bitness
issues in the given build, will not work. I'm investigating
https://mlocati.github.io/articles/gettext-iconv-windows.html, which are
just more modern builds, or building all of it myself with MSYS2.

Any guidance would be appreciated, as would some sort of update to the docs
that do not have such an outdated dependency reference. Thanks for such
otherwise excellent documentation!

В списке pgsql-docs по дате отправления:

Предыдущее
От: Liam Bowen
Дата:
Сообщение: Re: Dead link to MinGW in Windows documentation
Следующее
От: "nikolai.berkoff"
Дата:
Сообщение: COMMENT ON lock