msys2 - Mailing list pgsql-hackers

From Andrew Dunstan
Subject msys2
Date
Msg-id 9f4f22be-f9f1-b350-bc06-521226b87f7a@dunslane.net
Whole thread Raw
List pgsql-hackers
Disclaimer: I might have done things in not the best way - I'll happily 
accept correction.


Here is some information about building on msys2, the rewrite of msys, 
plus a proposal for a couple of tiny changes to support it.


The simplest way to install msys2 is via the chocolatey package manager 
(See <https://chocolatey.org/docs/installation>)


     choco install -y msys2


Alternatively, download the installer and run it.


Once that's done, fire up an Msys2 shell and use its package manager to 
install the required tools:


     pacman -S msys/bison \

         msys/flex \

         msys/make \

         msys/git \

         msys/perl \

         msys/ccache \

         msys/diffutils \

         mingw-w64-x86_64-toolchain \

         mingw-w64-i686-toolchain


If you want to run a buildfarm animal, there are a few other things you 
will also need:


     pacman -S msys/perl-libwww msys/perl-Crypt-SSLeay msys/tar


If you want to run TAP tests, you need to install IPC::Run somewhere and 
point PERL5LIB at it. There is no pacman package available. You will 
also need:


     pacman -S msys/perl-Test-Simple msys/perl-Test-Harness


And there are a few very useful things it makes sense to install:


     pacman -S msys/vim msys/patch


Pre-build setup:


For 64 bit builds:


     unset MSYSTEM_CHOST # or export MSYSTEM_CHOST=x86_64-w64-mingw32

     export MSYSTEM=MINGW64

     export PATH=/mingw64/bin:$PATH


For 32 bit builds


     unset MSYSTEM_CHOST # or export MSYSTEM_CHOST=i686-w64-mingw32

     export MSYSTEM=MINGW32

     export PATH=/mingw32/bin:$PATH


build:


     ./configure --with-template=win32 ...


Things that fail:


  * configure without a tamplate - there is a simple fix for this,
    included in the attached patch
  * pg_upgrade test - I was clearly not thorough enough with my fix in
    commit 608a71095. It occurred to me that rather than using `uname
    -s` and  putting "MINGW*|MSYS*" everywhere, it might be better to
    use the "host_os" value from Makefile.global. The patch does it that
    way, falling back to uname if necessary. But I'm with doing it the
    other way of people prefer. Yes, I know I should use backticks
    instead of $().
  * the pg_dump TAP test 010_dump_connstr.pl chokes badly on $dname3 and
    $dbname4. The commands complain about too many arguments. It seems
    weird because jacana is doing this just fine.
  * 32 bit builds only fail the circle regression test like this:

    *** C:/tools/msys64/home/Administrator/bf/root/HEAD/pgsql/src/test/regress/expected/circle.out    2018-10-03
18:52:44.137775400+0000
 
    --- C:/tools/msys64/home/administrator/bf/root/HEAD/pgsql.build/src/test/regress/results/circle.out    2018-10-05
20:59:45.424014300+0000
 
    ***************
    *** 109,116 ****
         WHERE (c1.f1 < c2.f1) AND ((c1.f1 <-> c2.f1) > 0)
         ORDER BY distance, area(c1.f1), area(c2.f1);
        five |      one       |      two       |     distance
    ! ------+----------------+----------------+------------------
    !       | <(3,5),0>      | <(1,2),3>      | 0.60555127546399
             | <(3,5),0>      | <(5,1),3>      | 1.47213595499958
             | <(100,200),10> | <(100,1),115>  |               74
             | <(100,200),10> | <(1,2),100>    | 111.370729772479
    --- 109,116 ----
         WHERE (c1.f1 < c2.f1) AND ((c1.f1 <-> c2.f1) > 0)
         ORDER BY distance, area(c1.f1), area(c2.f1);
        five |      one       |      two       |     distance
    ! ------+----------------+----------------+-------------------
    !       | <(3,5),0>      | <(1,2),3>      | 0.605551275463989
             | <(3,5),0>      | <(5,1),3>      |  1.47213595499958
             | <(100,200),10> | <(100,1),115>  |                74
             | <(100,200),10> | <(1,2),100>    |  111.370729772479


cheers

andrew



Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: executor relation handling
Next
From: Tom Lane
Date:
Subject: Re: Performance improvements for src/port/snprintf.c