Windows compile instructions

Regina Obe lr at pcorp.us
Sat Nov 18 09:05:50 PST 2023


Gandalf,

 

Sorry I keep on meaning to put up my compile instructions and latest PostGIS build chain up, but everytime I start, I create a mess of things and put it off, cause I’m midway upgrading my chain to a newer and haven’t swapped out my mingw setup.

 

I had written these instructions not too long ago for building pgRouting under msys/mingw, https://github.com/pgRouting/pgrouting/wiki/Building-on-windows-with-msys2-and-mingw64-(WIP)

but got stuck when trying to get pgTap Perl dependencies to finish installing (thus why it still has WIP in the name), so stuck with my old configured chain.

But the idea here, was to have something a bit simpler for people to understand than my “build everything from scratch” approach.

 

Just ignore the cmake instructions, and follow the pgSphere instructions for building.

The key thing here, is using pacman (the mingw64 package manager) to install the development tool chain.

 

I have never tried to build pgSphere (except like 15 years ago where I failed miserably for some reason).  But just a warning, at a glance it looks like pgSphere hasn’t been updated in sometime https://github.com/akorotkov/pgsphere (and looks like it might only be set to work only thru PG12).  So it’s quite possible it may need some patches to work with newer PostgreSQL versions.

 

Since it doesn’t appear to have dependencies then you can probably do it with mingw/msys just fine and using the pacman packaged PostgreSQL.

If the version offered by pacman installer doesn’t suit you, compiling PostgreSQL from source is fairly trivial as described here  https://www.cybertec-postgresql.com/en/building-postgresql-with-msys2-and-mingw-under-windows/

 

 

Regardless whatever you build should be compatible with both mingw64 and PostgreSQL 64 Windows EDB as long as you include the libgcc_s_seh-1.dll and libstdc++-6.dll that comes with the mingw64 install and any other dependencies not shipped with PostgreSQL windows EDB.

 

I should also note that the pacman packager in that ships with msys2 mingw64, has pretty much every dependency one would need.  Heck it even has postgis, geos, gdal., but I don’t use those since I tend to name (for example more than one version of PostgreSQL), and I generally need to test out in development geos.

 

Hope that helps,

Regina

 

 

 

From: Gandalf the Gray <pjduplooy.gis at gmail.com> 
Sent: Saturday, November 18, 2023 8:10 AM
To: postgis-devel at lists.osgeo.org
Subject: Windows compile instructions

 

Hi guys (although I think this is for Regina)

 

Where is the latest compile instructions for Windows located at.

 

I have a PG extension that I would like to try and compile for Windows.  It is PG Sphere.

 

Thanks a whole bunch for any guidance.

 

Pieter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20231118/139107ee/attachment.htm>


More information about the postgis-devel mailing list