[pgrouting-dev] Reg: Compile error in KSP with PostgreSQL 8.4
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Jun 22 12:48:30 PDT 2015
Mani wrote:
> I'm working on this already. Since this is my first time on cmake and
> dependencies I might need some help from you guys.
>
> I'll try my best to make it working.
>
Start with the message below and ask where you get stuck. The steps are:
1. copy the FindPostgreSQL.cmake linked below to the pgrouting/cmake
2. this will break the build stuff because this new script sets
different variables than the existing build expects.
3. sort this out and get it to build like it did before using the new script
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.
Ask specific questions if you get stuck, check in your code where I can
look at it.
There is a ticket for this:
https://github.com/pgRouting/pgrouting/issues/301
-Steve
On 6/22/2015 12:15 PM, Stephen Woodbridge wrote:
> Mani,
>
> You probably want to start with this version of FindPostgreSQL.cmake
>
> https://github.com/Kitware/CMake/blob/master/Modules/FindPostgreSQL.cmake
>
> It lets you specify PostgreSQL_ADDITIONAL_VERSIONS variable and if
> this is set to the version you want it will use this version if
> found.
>
> I think that the return variables that this script sets are different
> from what we expect in pgrouting so you might need to set the
> expected variables with the correct values also.
>
> So, I would replace the existing FindPostgreSQL.cmake with this
> script and then try to make it work with the existing build system,
> then look at reading a command line version and setting the variable
> above before calling find postgresql.
>
> -Steve
>
> On 6/22/2015 11:50 AM, Manikanta Kondeti wrote:
>> Hi Steve,
>>
>> I've tried my best to update cmake/FindPostgreSQL.cmake and
>> CMakeLists.txt, but the build was not successful. I've changed all
>> the POSTGRES variables to 9.4, cmake executed properly, but while
>> compiling(make) there is a error saying "Postgres.h" not found. Can
>> you share your CMakeLists.txt and cmake/FindPostgresql..cmake. I am
>> on the version 9.4.
>>
>> I think this needs to be solved for the next release. We need to
>> the pass the postgresql version to build, like the option you
>> said "DUSE_PG=9.x". But unfortunately it is not working right now.
>> I'll try to read about cmake and see what I can do. I will update
>> you.
>>
>> Thank you, Mani
>>
>> On Mon, Jun 22, 2015 at 8:20 PM, Stephen Woodbridge
>> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>> wrote:
>>
>> On 6/22/2015 10:37 AM, Manikanta Kondeti wrote:
>>
>> Hi,
>>
>> I am facing an error while building from source. This is that
>> issue: https://github.com/pgRouting/pgrouting/issues/109
>>
>> How to resolve that? Changing Pg version to 9.1 in CMakeLists.txt
>> is not working. I have 9.1 and 9.4 postgresql versions installed in
>> my system. Help me out in resolving this.
>>
>>
>> Mani,
>>
>> Sorry, the CMakeLists.txt files built for pgrouting 2.x were not
>> designed for support multiple versions installed on the same
>> system. This is a problem for me because I have 9.2, 9.3, and 9.4
>> installed and I can only build and install on 9.4.
>>
>> The solution id to update the CMakeLists.txt and specifically
>> cmake/FindPostgreSQL.cmake which so you can do something like
>>
>> cd build cmake -DUSE_PG=9.x ..
>>
>> I took a quick look at doing this a while back but
>> cmake/FindPostgreSQL.cmake needs to be replaced and other changes
>> are needed and I didn't have time to make the changes and get it
>> working.
>>
>> tools/test-runner.pl <http://test-runner.pl> already support
>> options for pg versions and ports so only the build system is
>> broken in this regard.
>>
>> If you want to read up on CMake and get this working a pull
>> request would be great!
>>
>> -Steve
>>
>> _______________________________________________ pgrouting-dev
>> mailing list pgrouting-dev at lists.osgeo.org
>> <mailto:pgrouting-dev at lists.osgeo.org>
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>
>>
>>
>>
>> _______________________________________________ pgrouting-dev
>> mailing list pgrouting-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>
>
> _______________________________________________ pgrouting-dev mailing
> list pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
More information about the pgrouting-dev
mailing list