[Mobilitydb-dev] First build for both PostGIS 2.5.5 and 3.1.3 !

Regina Obe lr at pcorp.us
Tue Aug 31 11:27:03 PDT 2021


I’m still having trouble compiling against this branch.

 

The first issue is: https://github.com/MobilityDB/MobilityDB/blob/towards-postgis3/cmake/FindPOSTGIS.cmake#L25  

Is looking for a .so file.  On windows that would be .dll  and on Mac I forget the extension

 

file(GLOB POSTGIS_LIBRARY "${POSTGRESQL_DYNLIB_DIR}/postgis-*.so")

 

If I change to 

 

file(GLOB POSTGIS_LIBRARY "${POSTGRESQL_DYNLIB_DIR}/postgis-*.*")

 

 

It detects but then gives a message:

 

CMake Error at cmake/FindPOSTGIS.cmake:31 (message):

  Several versions of the PostGIS library have been found

 

 

Yes I do have several versions of PostGIS installed in the same instance.  So this might be more of an issue for me than anyone else.

Is there a way to pass via CMake specify the version of PostGIS to use?

 

After hard-coding the path of postgis lib and changing my postgis.control (to match the one I hard-coded)

 

I got to this point:

 

-- LITTLE_ENDIAN

GEOS_INCLUDE_DIR=C:/ming64gcc81/projects/geos/rel-3.9w64gcc81/include

GEOS_LIBRARY=

CMake Error at cmake/FindGEOS.cmake:115 (MESSAGE):

  Could not find GEOS.  Perhaps try:

 

  $ sudo apt-get install libgeos++-dev

 

 

I’m checking to see what I missed here.  Might be a missing lib path I didn’t pass in.

 

Thanks,

Regina

 

From: Mobilitydb-dev [mailto:mobilitydb-dev-bounces at lists.osgeo.org] On Behalf Of Esteban Zimanyi
Sent: Friday, August 27, 2021 9:29 AM
To: mobilitydb-dev at lists.osgeo.org
Subject: [Mobilitydb-dev] First build for both PostGIS 2.5.5 and 3.1.3 !

 

I was able to produce a first build that works for both PostGIS 2.5.5 and 3.1.3. This is great news since we have been waiting for almost two years to be able to make MobilityDB work with PostGIS 3 !

 

The build is in the branch

https://github.com/MobilityDB/MobilityDB/tree/towards-postgis3

There is still one test (51_tpoint.test.sql) that gives different results in version 3.1.3. The reason may be that the lwgeom_hash function was changed in version 3.1.3. I will look at this in the forthcoming days.

 

The source files of the PostGIS directories liblwgeom, libpgcommon, and ryu were copied into the directory MobilityDB/postgis, in addition to the two files postgis_config.h and postgis_revision.h. Minimal changes were done to these files, basically removing static keywords for the functions getSRSbySRID, getSRIDbySRS and circ_tree_distance_tree_internal so that they can be called by MobilityDB.

 

The basic idea of the build is that if a PostGIS version less than 3.0 is found, then library liblwgeom.so is loaded. Otherwise, the directory MobilityDB/postgis is added to the build.

 

Please notice that this is still a proof-of-concept build. Indeed, I first built PostGIS 3.1.3 in my machine and therefore this build generated the right parameters for the files postgis_config.h and postgis_revision.h that are embedded in MobilityDB/postgis. This concerns in particular the setting of the machine endian constant. Therefore, we need to replicate in MobilityDB some of the configuration PostGIS makes in order to produce the right postgis_config.h and postgis_revision.h according to the machine characteristics at hand. I will work on that in the forthcoming days.

 

Esteban

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mobilitydb-dev/attachments/20210831/9d6e461d/attachment.html>


More information about the Mobilitydb-dev mailing list