<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I’m still having trouble compiling against this branch.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The first issue is: <a href="https://github.com/MobilityDB/MobilityDB/blob/towards-postgis3/cmake/FindPOSTGIS.cmake#L25">https://github.com/MobilityDB/MobilityDB/blob/towards-postgis3/cmake/FindPOSTGIS.cmake#L25</a>  <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Is looking for a .so file.  On windows that would be .dll  and on Mac I forget the extension<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>file(GLOB POSTGIS_LIBRARY "${POSTGRESQL_DYNLIB_DIR}/postgis-*.so")<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>If I change to <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>file(GLOB POSTGIS_LIBRARY "${POSTGRESQL_DYNLIB_DIR}/postgis-*.*")<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>It detects but then gives a message:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>CMake Error at cmake/FindPOSTGIS.cmake:31 (message):<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>  Several versions of the PostGIS library have been found<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Is there a way to pass via CMake specify the version of PostGIS to use?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>After hard-coding the path of postgis lib and changing my postgis.control (to match the one I hard-coded)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I got to this point:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>-- LITTLE_ENDIAN<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>GEOS_INCLUDE_DIR=C:/ming64gcc81/projects/geos/rel-3.9w64gcc81/include<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>GEOS_LIBRARY=<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>CMake Error at cmake/FindGEOS.cmake:115 (MESSAGE):<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>  Could not find GEOS.  Perhaps try:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:14.0pt;font-family:"Lucida Console"'>  $ sudo apt-get install libgeos++-dev<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I’m checking to see what I missed here.  Might be a missing lib path I didn’t pass in.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Regina<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Mobilitydb-dev [mailto:mobilitydb-dev-bounces@lists.osgeo.org] <b>On Behalf Of </b>Esteban Zimanyi<br><b>Sent:</b> Friday, August 27, 2021 9:29 AM<br><b>To:</b> mobilitydb-dev@lists.osgeo.org<br><b>Subject:</b> [Mobilitydb-dev] First build for both PostGIS 2.5.5 and 3.1.3 !<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>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 !<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The build is in the branch<o:p></o:p></p><div><p class=MsoNormal><a href="https://github.com/MobilityDB/MobilityDB/tree/towards-postgis3">https://github.com/MobilityDB/MobilityDB/tree/towards-postgis3</a><o:p></o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Esteban<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></div></body></html>