<div dir="ltr">Steve,<div><br></div><div>Thanks for the steps. I am thinking in a different method. I just pushed a branch cmake-postgres. In File FindPostgreSQL.cmake on line no: 19, PG_VERSION is a argument passed while running cmake. ( cmake -DPG_VERSION=9.* ). </div><div><br></div><div>* Take an argument from command line.</div><div>* Modify the present FindPostgreSQL.cmake, build it until it is working properly.</div><div><br></div><div>I am stuck here at this point. See line no: 43 ( <span class="">COMMAND</span><span class=""> </span><span class="">${POSTGRESQL_PG_CONFIG}</span><span class=""> --version) this is giving 8.4 as defaults. Therefore variables after this are set with 8.4, I need to somehow understand and change it. </span></div><div><span class=""><br></span></div><div><span class="">If you are free now we can discuss this. </span></div><div><span class="">- Mani </span></div>
</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 23, 2015 at 1:18 AM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Mani wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm working on this already. Since this is my first time on cmake and<br>
dependencies I might need some help from you guys.<br>
<br>
I'll try my best to make it working.<br>
<br>
</blockquote>
<br></div></div>
Start with the message below and ask where you get stuck. The steps are:<br>
<br>
1. copy the FindPostgreSQL.cmake linked below to the pgrouting/cmake<br>
<br>
2. this will break the build stuff because this new script sets different variables than the existing build expects.<br>
<br>
3. sort this out and get it to build like it did before using the new script<br>
<br>
4. when it is building like before, add the variable to set the version in the commandline and and use that to set PostgreSQL_ADDITIONAL_VERSIONS and it should work.<br>
<br>
Ask specific questions if you get stuck, check in your code where I can look at it.<br>
<br>
There is a ticket for this:<br>
<a href="https://github.com/pgRouting/pgrouting/issues/301" rel="noreferrer" target="_blank">https://github.com/pgRouting/pgrouting/issues/301</a><br>
<br>
-Steve<div class="HOEnZb"><div class="h5"><br>
<br>
On 6/22/2015 12:15 PM, Stephen Woodbridge wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mani,<br>
<br>
You probably want to start with this version of FindPostgreSQL.cmake<br>
<br>
<a href="https://github.com/Kitware/CMake/blob/master/Modules/FindPostgreSQL.cmake" rel="noreferrer" target="_blank">https://github.com/Kitware/CMake/blob/master/Modules/FindPostgreSQL.cmake</a><br>
<br>
It lets you specify PostgreSQL_ADDITIONAL_VERSIONS variable and if<br>
this is set to the version you want it will use this version if<br>
found.<br>
<br>
I think that the return variables that this script sets are different<br>
from what we expect in pgrouting so you might need to set the<br>
expected variables with the correct values also.<br>
<br>
So, I would replace the existing FindPostgreSQL.cmake with this<br>
script and then try to make it work with the existing build system,<br>
then look at reading a command line version and setting the variable<br>
above before calling find postgresql.<br>
<br>
-Steve<br>
<br>
On 6/22/2015 11:50 AM, Manikanta Kondeti wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Steve,<br>
<br>
I've tried my best to update cmake/FindPostgreSQL.cmake and<br>
CMakeLists.txt, but the build was not successful. I've changed all<br>
the POSTGRES variables to 9.4, cmake executed properly, but while<br>
compiling(make) there is a error saying "Postgres.h" not found. Can<br>
you share your CMakeLists.txt and cmake/FindPostgresql..cmake. I am<br>
on the version 9.4.<br>
<br>
I think this needs to be solved for the next release. We need to<br>
the pass the postgresql version to build, like the option you<br>
said "DUSE_PG=9.x". But unfortunately it is not working right now.<br>
I'll try to read about cmake and see what I can do. I will update<br>
you.<br>
<br>
Thank you, Mani<br>
<br>
On Mon, Jun 22, 2015 at 8:20 PM, Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>>> wrote:<br>
<br>
On 6/22/2015 10:37 AM, Manikanta Kondeti wrote:<br>
<br>
Hi,<br>
<br>
I am facing an error while building from source. This is that<br>
issue: <a href="https://github.com/pgRouting/pgrouting/issues/109" rel="noreferrer" target="_blank">https://github.com/pgRouting/pgrouting/issues/109</a><br>
<br>
How to resolve that? Changing Pg version to 9.1 in CMakeLists.txt<br>
is not working. I have 9.1 and 9.4 postgresql versions installed in<br>
my system. Help me out in resolving this.<br>
<br>
<br>
Mani,<br>
<br>
Sorry, the CMakeLists.txt files built for pgrouting 2.x were not<br>
designed for support multiple versions installed on the same<br>
system. This is a problem for me because I have 9.2, 9.3, and 9.4<br>
installed and I can only build and install on 9.4.<br>
<br>
The solution id to update the CMakeLists.txt and specifically<br>
cmake/FindPostgreSQL.cmake which so you can do something like<br>
<br>
cd build cmake -DUSE_PG=9.x ..<br>
<br>
I took a quick look at doing this a while back but<br>
cmake/FindPostgreSQL.cmake needs to be replaced and other changes<br>
are needed and I didn't have time to make the changes and get it<br>
working.<br>
<br>
tools/<a href="http://test-runner.pl" rel="noreferrer" target="_blank">test-runner.pl</a> <<a href="http://test-runner.pl" rel="noreferrer" target="_blank">http://test-runner.pl</a>> already support<br>
options for pg versions and ports so only the build system is<br>
broken in this regard.<br>
<br>
If you want to read up on CMake and get this working a pull<br>
request would be great!<br>
<br>
-Steve<br>
<br>
_______________________________________________ pgrouting-dev<br>
mailing list <a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<mailto:<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a>><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
<br>
<br>
<br>
<br>
_______________________________________________ pgrouting-dev<br>
mailing list <a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
<br>
</blockquote>
<br>
_______________________________________________ pgrouting-dev mailing<br>
list <a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
</blockquote>
<br>
_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
</div></div></blockquote></div><br></div>