<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Many thanks Regina !</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 19, 2021 at 11:06 PM Regina Obe <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8899536262723880005WordSection1"><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Spoke with Vicky if she can help with your CMake scripts so that I can build under windows at least with the 2.5 without any crazy hacks.  That way I can at least have an idea of what is possible.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">She’s started looking at the CMake and will work on improving it.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Regina<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt"><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b><span style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif"> postgis-devel [mailto:<a href="mailto:postgis-devel-bounces@lists.osgeo.org" target="_blank">postgis-devel-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Esteban Zimanyi<br><b>Sent:</b> Saturday, July 10, 2021 8:34 AM<br><b>To:</b> PostGIS Development Discussion <<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>><br><b>Cc:</b> Mahmoud Sakr <<a href="mailto:m_attia_sakr@yahoo.com" target="_blank">m_attia_sakr@yahoo.com</a>>; mohamed sayed <<a href="mailto:mohamed_bakli@aun.edu.eg" target="_blank">mohamed_bakli@aun.edu.eg</a>>; SCHOEMANS Maxime <<a href="mailto:Maxime.Schoemans@ulb.be" target="_blank">Maxime.Schoemans@ulb.be</a>><br><b>Subject:</b> Re: [postgis-devel] PostGIS 3 and MobilityDB<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal">Dear Regina<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Regarding the way we detect PostgreSQL, according to my understanding we are doing similar things as done in PostGIS. In the configure file of PostGIS 3.1.2 it is stated<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">  PGSQL_FULL_VERSION=`"$PG_CONFIG" --version`<br>  PGSQL_MAJOR_VERSION=`echo $PGSQL_FULL_VERSION | sed 's/[^0-9]*\([0-9]*\).*/\1/'`<br>  PGSQL_MINOR_VERSION=`$PG_CONFIG --version | sed 's/[^0-9]*\([0-9]\)\.\([0-9]\).*/\2/'`<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">In our CMakeLists.txt we do<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12pt">  execute_process(COMMAND ${PGCONFIG} --version OUTPUT_VARIABLE PG_VERSION_STRING OUTPUT_STRIP_TRAILING_WHITESPACE)<u></u><u></u></p></div><div><p class="MsoNormal">and continue stripping the major and minor versions in a less efficient way than you do. There is no problem in reusing your recipe for doing that.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Regarding the PostGIS issue, as I commented in your PR over github<u></u><u></u></p></div><div><p class="MsoNormal">---- (copied from github) ---<u></u><u></u></p></div><div><p style="margin-right:0in;margin-bottom:12pt;margin-left:0in;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(36,41,46)">Actually, we use <a href="http://postgis-2.5.so/" target="_blank">postgis-2.5.so</a> just to ensure the version, we don't do anything with it. I commented the following lines in the CMakeLists.txt and everything works, the tests pass without any problem.<u></u><u></u></span></p><p style="margin:0in 0in 0.0001pt;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(36,41,46)">find_library(HAS_LWGEOM lwgeom)<br>if (HAS_LWGEOM)<br>MESSAGE(STATUS "Found LWGEOM at ${HAS_LWGEOM} - compiling with PostGIS support")<br>--> if(NOT EXISTS "${PostgreSQL_EXTLIB_DIR}/<a href="http://postgis-2.5.so/" target="_blank">postgis-2.5.so</a>")<br>--> message(FATAL_ERROR "Could not find <a href="http://postgis-2.5.so/" target="_blank">postgis-2.5.so</a>; only PostGIS 2.5 is currently supported")<br>--> endif()<br>else()<br>message(FATAL_ERROR "Could not find lwgeom; ")<br>endif ()<u></u><u></u></span></p></div><div><div><p class="MsoNormal">---- (copied from github) ---<u></u><u></u></p></div><div><p class="MsoNormal">we did that to avoid the use of PostGIS 3 with MobilityDB until we solve this issue (as we are discussing in the current thread). As soon as you tell us how to solve this we will change this immediately.<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Many many thanks for your continuous support !<u></u><u></u></p></div><div><p class="MsoNormal"><span style="color:rgb(136,136,136)"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="color:rgb(136,136,136)">Esteban<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Fri, Jul 9, 2021 at 8:27 AM Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">A side note, I think you need to change the way you are detecting PostgreSQL.  It just doesn’t work for me and suspect it will be an issue for anyone with multiple PostgreSQL installs or non-standard paths  – as I had mentioned here - <a href="https://github.com/MobilityDB/MobilityDB/pull/20" target="_blank">https://github.com/MobilityDB/MobilityDB/pull/20</a> .  You should be using the </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">CMAKE PostgreSQL package to detect PostgreSQL.  I always end up having to copy pgRouting code in so the PostgreSQL detection works right.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">As I recall compiling MobilityDB a while ago it has both a dependency to liblwgeom as well as the PostGIS lib.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">The dependency of PostGIS lib is a little troubling as I mentioned here</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><a href="https://github.com/MobilityDB/MobilityDB/issues/16" target="_blank">https://github.com/MobilityDB/MobilityDB/issues/16</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Even the extensions packaged with PostGIS don’t have a direct dependency to PostGIS lib just to liblwgeom.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">So not even a parallel branch will work here unless you change how you are doing things and what to change is unclear to me.  The issue with depending on PostGIS lib is we only guarantee SQL API compatibility across minor versions, not C-API.  Meaning if the function isn’t exposed via the SQL API, we don’t need to worry about it as PostgreSQL upgrade would not care as it only fails if it tries to call a function that is referenced in an SQL API function.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">That said if you must rely on PostGIS lib all your postgis.h dependencies should only be Datum ones and any others will make your code brittle to PostGIS changes.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I’m thinking for the liblwgeom dependency you should be able to use librtopo for that. Still not clear to me why you can’t, but we can discuss in dev meeting. </span><u></u><u></u></p></div></div></blockquote></div></div></div></div></div>_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
</blockquote></div>