[osgeo4w-dev] Packaging MobilityDB for Windows
Esteban Zimanyi
estebanzimanyi at gmail.com
Tue May 23 12:43:40 PDT 2023
MobilityDB is an OSGeo Community project
https://www.osgeo.org/projects/mobilitydb/
A recurrent request from users is to have a Windows version
https://github.com/MobilityDB/MobilityDB/issues/176
We are able to generate a Windows version using msys2 both in Github
https://github.com/MobilityDB/MobilityDB/actions/runs/5059343801/jobs/9080732581
and locally as in the script below.
Can someone instructs us how to package MobilityDB so it can be added using
e.g. Stackbuilder (as it is done for PostGIS) to an existing PostgreSQL
database in Windows ?
We have been struggling for long time to achieve this and haven't found a
way to do it :-(
Many thanks for your help
Esteban
----------------------------------------------------------------------------------------------------
Install msys2 as explained in the web site below
https://www.msys2.org/
After executing the installer, do the following on the MSYS2 UCRT64 prompt
$ pacman -S mingw-w64-ucrt-x86_64-gcc
$ pacman -S mingw-w64-ucrt-x86_64-cmake
$ pacman -S mingw-w64-ucrt-x86_64-ninja
$ pacman -S mingw-w64-ucrt-x86_64-postgis
$ pacman -S mingw-w64-ucrt-x86_64-gsl
$ pacman -S git
$ pacman -Syyu
$ export PGDATA="C:/msys64/usr/local/pgsql/data"
$ export PGPORT=5434
$ initdb
$ pg_ctl start
$ createdb mydb
$ psql mydb
psql (15.1)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
mydb=# SELECT version();
version
----------------------------------------------------------------------------------------------------------
PostgreSQL 15.1 on x86_64-w64-mingw32, compiled by gcc.exe (Rev7, Built by
MSYS2 project) 12.2.0, 64-bit
(1 row)
mydb=# CREATE EXTENSION postgis;
CREATE EXTENSION
mydb=# SELECT postgis_full_version();
postgis_full_version
----------------------------------------------------------------------------------------------------------------------
POSTGIS="3.3.1 3786b21" [EXTENSION] PGSQL="150" GEOS="3.9.1-CAPI-1.14.2"
PROJ="9.2.0" LIBXML="2.10.3" LIBJSON="0.16"
(1 row)
---------------------------------------------------------------------------------
After this first step continue building MobilityDB
$ git clone https://github.com/MobilityDB/MobilityDB.git
$ cd MobilityDB/
$ mkdir build
$ cd build
$ git checkout develop
$ cmake ..
$ cmake --build .
$ cmake --install .
Edit the file C:\msys64\usr\local\pgsql\data\postgresql.conf with your
favorite editor (e.g. Notepad++) and add at the end the following lines
shared_preload_libraries = 'postgis-3.dll'
max_locks_per_transaction = 128
timezone = 'UTC'
parallel_tuple_cost = 100
parallel_setup_cost = 100
force_parallel_mode = off
min_parallel_table_scan_size = 0
min_parallel_index_scan_size = 0
Continue on the MSYS2 UCRT64 prompt
$ pg_ctl restart
$ psql mydb
psql (15.1)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
mydb=# create extension mobilitydb;
CREATE EXTENSION
mydb=# select mobilitydb_full_version();
mobilitydb_full_version
--------------------------------------------------------------------------------------
MobilityDB 1.1.0, PostgreSQL 15.1, PostGIS 3.3.1, GEOS 3.9.1-CAPI-1.14.2,
PROJ 9.2.0
(1 row)
mydb=# select tfloat '1 at 2000-01-01';
tfloat
--------------------------
1 at 2000-01-01 00:00:00+00
(1 row)
------------------------------------------------------------
Regards
Esteban
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/osgeo4w-dev/attachments/20230523/f53bea8c/attachment.htm>
More information about the osgeo4w-dev
mailing list