MSYS2 support
There were a number of recent threads about building PostgreSQL on
MSYS2. This has been confusing on occasion; see for example [0]/messages/by-id/6672cebd-0c07-ce1e-36f8-6ae82c496eb0@2ndquadrant.com. MSYS2
is actually a derivative of Cygwin. What most people are actually doing
is using MSYS2 has the host environment for doing a kind of
cross-compilation to MinGW.
You can also build natively on MSYS2, using the existing Cygwin support.
Except that it won't work because configure doesn't recognize the
config.guess output. Attached are a couple of small patches to fix that
up. The first patch fixes configure as explained. The second patch
fixes some warnings in ps_status.c. It's curious why the existing build
farm members don't issue warnings there, but maybe their compilers are
too old. The third patch fixes another warning; again, not sure why
original Cygwin doesn't warn. It might be a bit too broad to apply like
that.
MSYS2 doesn't ship with cygserver AFAICT, so you can't run a PostgreSQL
server, but everything else should work.
[0]: /messages/by-id/6672cebd-0c07-ce1e-36f8-6ae82c496eb0@2ndquadrant.com
/messages/by-id/6672cebd-0c07-ce1e-36f8-6ae82c496eb0@2ndquadrant.com
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:
0001-Add-support-for-MSYS2.patchtext/plain; charset=UTF-8; name=0001-Add-support-for-MSYS2.patch; x-mac-creator=0; x-mac-type=0Download+10-15
0002-Fix-compiler-warnings.patchtext/plain; charset=UTF-8; name=0002-Fix-compiler-warnings.patch; x-mac-creator=0; x-mac-type=0Download+8-1
0003-Fix-compiler-warning-for-ppoll-on-MSYS2.patchtext/plain; charset=UTF-8; name=0003-Fix-compiler-warning-for-ppoll-on-MSYS2.patch; x-mac-creator=0; x-mac-type=0Download+3-1
On 2019-12-12 22:11, Peter Eisentraut wrote:
You can also build natively on MSYS2, using the existing Cygwin support.
Except that it won't work because configure doesn't recognize the
config.guess output. Attached are a couple of small patches to fix that
up. The first patch fixes configure as explained. The second patch
fixes some warnings in ps_status.c. It's curious why the existing build
farm members don't issue warnings there, but maybe their compilers are
too old. The third patch fixes another warning; again, not sure why
original Cygwin doesn't warn. It might be a bit too broad to apply like
that.
For completeness: These patches have all been applied. They were also
useful for more recent Cygwin versions than the build farm currently has.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services