pgrouting icon indicating copy to clipboard operation
pgrouting copied to clipboard

Standalone/Modular Installation

Open alexandermichels opened this issue 4 years ago • 5 comments

Problem I'm trying to install pgRouting on a cluster using modules and I've noticed that the installation process uses the Postgresql package library directory to determine the installation path (or at least that's what I think this is doing: https://github.com/pgRouting/pgrouting/blob/main/CMakeLists.txt#L228). Is there an option to install pgRouting separately from PostgreSQL so that users can load PostgreSQL without pgRouting but still have the option to load pgRouting as an extension to PostgreqSQL?

To Reproduce Install pgrouting using instructions in the documentation: https://docs.pgrouting.org/3.0/en/pgRouting-installation.html#install-build Cmake/Make/Make Install.

What I've Tried I tried setting -DCMAKE_INSTALL_PREFIX, but it appears that was just ignored. I also tried using DESTDIR=<path I want> REGRESS=1 during the make install command which worked for PostGIS (suggested by this: https://trac.osgeo.org/postgis/ticket/635), but that resulted in the pgRouting installing at <path I want>/<full path to PostgreSQL>.

Expectation Is there some option to say "install in this location regardless of PostgreSQL." This would probably require that we set a few environment variables so that PostgreSQL knows where to look for pgRouting, but that can be done in the modulefile.

Platform/versions Ubuntu 20.04.2 LTS PostgreSQL 12.4 PostGIS 3.1.2 pgRouting 3.1.3

alexandermichels avatar Aug 19 '21 17:08 alexandermichels

Do you know of some other extensions that allow this? pgRouting depends on PostGIS, do you plan to do the same with PostGIS. And if yes, is it possible with PostGIS?

dkastl avatar Aug 20 '21 02:08 dkastl

I do plan to do this PostGIS as well if I can. PostGIS provides a parameter to do this (--prefix on this page: https://postgis.net/docs/manual-3.1/postgis_installation.html#installation_configuration), but the parameter has been broken. The issue for that parameter being broken in PostGIS is here https://trac.osgeo.org/postgis/ticket/635 . Using the DESTDIR=<path I want> REGRESS=1 work-around for PostGIS it appears some stuff installs in <path I want>/bin, <path I want>/lib> and <path I want>/share, but it appears the extension folder still goes to <path I want>/<path to PostgreSQL>/... which is a similar issue to the one I'm raising here.

If for some reason this isn't doable due to constraints in PostgreSQL, I completely understand, just thought I would ask because this would option would be useful for people trying to install the extension without sudo privileges and for clusters that use modules. It would make a lot of sense if you waited for PostGIS to resolve the issue before attempting to do it here. Thanks for the quick response!

alexandermichels avatar Aug 20 '21 13:08 alexandermichels

Thanks for the additional explanations! It's probably that I (and others in the pgRouting project) haven't come across this use case yet, and I must admit that I don't know well about it. But if PostGIS can find a way to solve this, then pgRouting should be able to do this as well.

Do you have some good resource about this "cluster modules" way of installation? I'm not sure I'm looking for the right thing.

dkastl avatar Aug 20 '21 14:08 dkastl

Sounds good and thank you for your help! When I mentioned modules I was referring to Environment Modules and Lmod. So for example, it would be great to be able to install two different versions of pgRouting (say pgRouting-x.y.z and pgRouting-a.b.c) and give users the ability to load PostgreSQL/PostGIS without pgRouting, load PostgreSQL/PostGIS with pgRouting version x.y.z, or load PostgreSQL/PostGIS with pgRouting version a.b.c.

alexandermichels avatar Aug 20 '21 22:08 alexandermichels

I have installed all versions from v3.0.0 (build and installed manually and in order)

ls /usr/share/postgresql/13/extension/pgrouting
Display all 286 possibilities? (y or n)
pgrouting--2.2.0--3.0.0.sql  pgrouting--2.6.1--3.0.4.sql  pgrouting--2.6.3--3.0.5.sql  pgrouting--3.0.1--3.1.1.sql  pgrouting--3.0.3--3.3.0.sql  pgrouting--3.1.0--3.1.4.sql  pgrouting--3.1.3.sql
pgrouting--2.2.1--3.0.0.sql  pgrouting--2.6.1--3.0.5.sql  pgrouting--2.6.3--3.0.6.sql  pgrouting--3.0.1--3.1.2.sql  pgrouting--3.0.3--3.3.1.sql  pgrouting--3.1.0--3.2.0.sql  pgrouting--3.1.4--3.3.0.sql
pgrouting--2.2.2--3.0.0.sql  pgrouting--2.6.1--3.0.6.sql  pgrouting--2.6.3--3.1.0.sql  pgrouting--3.0.1--3.1.3.sql  pgrouting--3.0.3--3.4.0.sql  pgrouting--3.1.0--3.2.1.sql  pgrouting--3.1.4--3.3.1.sql
pgrouting--2.2.3--3.0.0.sql  pgrouting--2.6.1--3.1.0.sql  pgrouting--2.6.3--3.1.1.sql  pgrouting--3.0.1--3.1.4.sql  pgrouting--3.0.3--3.5.0.sql  pgrouting--3.1.0--3.2.2.sql  pgrouting--3.1.4--3.4.0.sql
pgrouting--2.2.4--3.0.0.sql  pgrouting--2.6.1--3.1.1.sql  pgrouting--2.6.3--3.1.2.sql  pgrouting--3.0.1--3.2.0.sql  pgrouting--3.0.3--4.0.0.sql  pgrouting--3.1.0--3.3.0.sql  pgrouting--3.1.4--3.5.0.sql
pgrouting--2.3.0--3.0.0.sql  pgrouting--2.6.1--3.1.2.sql  pgrouting--2.6.3--3.1.3.sql  pgrouting--3.0.1--3.2.1.sql  pgrouting--3.0.3.sql         pgrouting--3.1.0--3.3.1.sql  pgrouting--3.1.4--4.0.0.sql
pgrouting--2.3.1--3.0.0.sql  pgrouting--2.6.1--3.1.3.sql  pgrouting--2.6.3--3.1.4.sql  pgrouting--3.0.1--3.2.2.sql  pgrouting--3.0.4--3.0.5.sql  pgrouting--3.1.0--3.4.0.sql  pgrouting--3.1.4.sql
pgrouting--2.3.2--3.0.0.sql  pgrouting--2.6.1--3.1.4.sql  pgrouting--2.6.3--3.2.0.sql  pgrouting--3.0.1--3.3.0.sql  pgrouting--3.0.4--3.0.6.sql  pgrouting--3.1.0--3.5.0.sql  pgrouting--3.2.0--3.2.1.sql
pgrouting--2.4.0--3.0.0.sql  pgrouting--2.6.1--3.2.0.sql  pgrouting--2.6.3--3.2.1.sql  pgrouting--3.0.1--3.3.1.sql  pgrouting--3.0.4--3.1.2.sql  pgrouting--3.1.0--4.0.0.sql  pgrouting--3.2.0--3.2.2.sql
pgrouting--2.4.1--3.0.0.sql  pgrouting--2.6.1--3.2.1.sql  pgrouting--2.6.3--3.2.2.sql  pgrouting--3.0.1--3.4.0.sql  pgrouting--3.0.4--3.1.3.sql  pgrouting--3.1.0.sql         pgrouting--3.2.0--3.3.0.sql
pgrouting--2.4.2--3.0.0.sql  pgrouting--2.6.1--3.2.2.sql  pgrouting--2.6.3--3.3.0.sql  pgrouting--3.0.1--3.5.0.sql  pgrouting--3.0.4--3.1.4.sql  pgrouting--3.1.1--3.1.2.sql  pgrouting--3.2.0--3.3.1.sql
pgrouting--2.5.0--3.0.0.sql  pgrouting--2.6.1--3.3.0.sql  pgrouting--2.6.3--3.3.1.sql  pgrouting--3.0.1--4.0.0.sql  pgrouting--3.0.4--3.2.0.sql  pgrouting--3.1.1--3.1.3.sql  pgrouting--3.2.0--3.4.0.sql
pgrouting--2.5.1--3.0.0.sql  pgrouting--2.6.1--3.3.1.sql  pgrouting--2.6.3--3.4.0.sql  pgrouting--3.0.1.sql         pgrouting--3.0.4--3.2.1.sql  pgrouting--3.1.1--3.1.4.sql  pgrouting--3.2.0--3.5.0.sql
pgrouting--2.5.2--3.0.0.sql  pgrouting--2.6.1--3.4.0.sql  pgrouting--2.6.3--3.5.0.sql  pgrouting--3.0.2--3.0.3.sql  pgrouting--3.0.4--3.2.2.sql  pgrouting--3.1.1--3.2.0.sql  pgrouting--3.2.0--4.0.0.sql
pgrouting--2.5.3--3.0.0.sql  pgrouting--2.6.1--3.5.0.sql  pgrouting--2.6.3--4.0.0.sql  pgrouting--3.0.2--3.0.4.sql  pgrouting--3.0.4--3.3.0.sql  pgrouting--3.1.1--3.2.1.sql  pgrouting--3.2.0.sql
pgrouting--2.5.4--3.0.0.sql  pgrouting--2.6.1--4.0.0.sql  pgrouting--3.0.0--3.0.1.sql  pgrouting--3.0.2--3.0.5.sql  pgrouting--3.0.4--3.3.1.sql  pgrouting--3.1.1--3.2.2.sql  pgrouting--3.2.1--3.2.2.sql
pgrouting--2.5.5--3.0.0.sql  pgrouting--2.6.2--3.0.0.sql  pgrouting--3.0.0--3.0.2.sql  pgrouting--3.0.2--3.0.6.sql  pgrouting--3.0.4--3.4.0.sql  pgrouting--3.1.1--3.3.0.sql  pgrouting--3.2.1--3.3.0.sql
pgrouting--2.6.0--3.0.0.sql  pgrouting--2.6.2--3.0.1.sql  pgrouting--3.0.0--3.0.3.sql  pgrouting--3.0.2--3.1.0.sql  pgrouting--3.0.4--3.5.0.sql  pgrouting--3.1.1--3.3.1.sql  pgrouting--3.2.1--3.3.1.sql
pgrouting--2.6.0--3.0.1.sql  pgrouting--2.6.2--3.0.2.sql  pgrouting--3.0.0--3.0.4.sql  pgrouting--3.0.2--3.1.1.sql  pgrouting--3.0.4--4.0.0.sql  pgrouting--3.1.1--3.4.0.sql  pgrouting--3.2.1--3.4.0.sql
pgrouting--2.6.0--3.0.2.sql  pgrouting--2.6.2--3.0.3.sql  pgrouting--3.0.0--3.0.5.sql  pgrouting--3.0.2--3.1.2.sql  pgrouting--3.0.4.sql         pgrouting--3.1.1--3.5.0.sql  pgrouting--3.2.1--3.5.0.sql
pgrouting--2.6.0--3.0.3.sql  pgrouting--2.6.2--3.0.4.sql  pgrouting--3.0.0--3.0.6.sql  pgrouting--3.0.2--3.1.3.sql  pgrouting--3.0.5--3.0.6.sql  pgrouting--3.1.1--4.0.0.sql  pgrouting--3.2.1--4.0.0.sql
pgrouting--2.6.0--3.0.4.sql  pgrouting--2.6.2--3.0.5.sql  pgrouting--3.0.0--3.1.0.sql  pgrouting--3.0.2--3.1.4.sql  pgrouting--3.0.5--3.1.3.sql  pgrouting--3.1.1.sql         pgrouting--3.2.1.sql
pgrouting--2.6.0--3.0.5.sql  pgrouting--2.6.2--3.0.6.sql  pgrouting--3.0.0--3.1.1.sql  pgrouting--3.0.2--3.2.0.sql  pgrouting--3.0.5--3.1.4.sql  pgrouting--3.1.2--3.1.3.sql  pgrouting--3.2.2--3.3.0.sql
pgrouting--2.6.0--3.0.6.sql  pgrouting--2.6.2--3.1.0.sql  pgrouting--3.0.0--3.1.2.sql  pgrouting--3.0.2--3.2.1.sql  pgrouting--3.0.5--3.2.0.sql  pgrouting--3.1.2--3.1.4.sql  pgrouting--3.2.2--3.3.1.sql
pgrouting--2.6.0--3.1.0.sql  pgrouting--2.6.2--3.1.1.sql  pgrouting--3.0.0--3.1.3.sql  pgrouting--3.0.2--3.2.2.sql  pgrouting--3.0.5--3.2.1.sql  pgrouting--3.1.2--3.2.0.sql  pgrouting--3.2.2--3.4.0.sql
pgrouting--2.6.0--3.1.1.sql  pgrouting--2.6.2--3.1.2.sql  pgrouting--3.0.0--3.1.4.sql  pgrouting--3.0.2--3.3.0.sql  pgrouting--3.0.5--3.2.2.sql  pgrouting--3.1.2--3.2.1.sql  pgrouting--3.2.2--3.5.0.sql
pgrouting--2.6.0--3.1.2.sql  pgrouting--2.6.2--3.1.3.sql  pgrouting--3.0.0--3.2.0.sql  pgrouting--3.0.2--3.3.1.sql  pgrouting--3.0.5--3.3.0.sql  pgrouting--3.1.2--3.2.2.sql  pgrouting--3.2.2--4.0.0.sql
pgrouting--2.6.0--3.1.3.sql  pgrouting--2.6.2--3.1.4.sql  pgrouting--3.0.0--3.2.1.sql  pgrouting--3.0.2--3.4.0.sql  pgrouting--3.0.5--3.3.1.sql  pgrouting--3.1.2--3.3.0.sql  pgrouting--3.2.2.sql
pgrouting--2.6.0--3.1.4.sql  pgrouting--2.6.2--3.2.0.sql  pgrouting--3.0.0--3.2.2.sql  pgrouting--3.0.2--3.5.0.sql  pgrouting--3.0.5--3.4.0.sql  pgrouting--3.1.2--3.3.1.sql  pgrouting--3.3.0--3.3.1.sql
pgrouting--2.6.0--3.2.0.sql  pgrouting--2.6.2--3.2.1.sql  pgrouting--3.0.0--3.3.0.sql  pgrouting--3.0.2--4.0.0.sql  pgrouting--3.0.5--3.5.0.sql  pgrouting--3.1.2--3.4.0.sql  pgrouting--3.3.0--3.4.0.sql
pgrouting--2.6.0--3.2.1.sql  pgrouting--2.6.2--3.2.2.sql  pgrouting--3.0.0--3.3.1.sql  pgrouting--3.0.2.sql         pgrouting--3.0.5--4.0.0.sql  pgrouting--3.1.2--3.5.0.sql  pgrouting--3.3.0--3.5.0.sql
pgrouting--2.6.0--3.2.2.sql  pgrouting--2.6.2--3.3.0.sql  pgrouting--3.0.0--3.4.0.sql  pgrouting--3.0.3--3.0.4.sql  pgrouting--3.0.5.sql         pgrouting--3.1.2--4.0.0.sql  pgrouting--3.3.0--4.0.0.sql
pgrouting--2.6.0--3.3.0.sql  pgrouting--2.6.2--3.3.1.sql  pgrouting--3.0.0--3.5.0.sql  pgrouting--3.0.3--3.0.5.sql  pgrouting--3.0.6--3.3.0.sql  pgrouting--3.1.2.sql         pgrouting--3.3.0.sql
pgrouting--2.6.0--3.3.1.sql  pgrouting--2.6.2--3.4.0.sql  pgrouting--3.0.0--4.0.0.sql  pgrouting--3.0.3--3.0.6.sql  pgrouting--3.0.6--3.3.1.sql  pgrouting--3.1.3--3.2.0.sql  pgrouting--3.3.1.sql
pgrouting--2.6.0--3.4.0.sql  pgrouting--2.6.2--3.5.0.sql  pgrouting--3.0.0.sql         pgrouting--3.0.3--3.1.1.sql  pgrouting--3.0.6--3.4.0.sql  pgrouting--3.1.3--3.2.1.sql  pgrouting--3.4.0--3.5.0.sql
pgrouting--2.6.0--3.5.0.sql  pgrouting--2.6.2--4.0.0.sql  pgrouting--3.0.1--3.0.2.sql  pgrouting--3.0.3--3.1.2.sql  pgrouting--3.0.6--3.5.0.sql  pgrouting--3.1.3--3.2.2.sql  pgrouting--3.4.0--4.0.0.sql
pgrouting--2.6.0--4.0.0.sql  pgrouting--2.6.3--3.0.0.sql  pgrouting--3.0.1--3.0.3.sql  pgrouting--3.0.3--3.1.3.sql  pgrouting--3.0.6--4.0.0.sql  pgrouting--3.1.3--3.3.0.sql  pgrouting--3.4.0.sql
pgrouting--2.6.1--3.0.0.sql  pgrouting--2.6.3--3.0.1.sql  pgrouting--3.0.1--3.0.4.sql  pgrouting--3.0.3--3.1.4.sql  pgrouting--3.0.6.sql         pgrouting--3.1.3--3.3.1.sql  pgrouting--3.5.0.sql
pgrouting--2.6.1--3.0.1.sql  pgrouting--2.6.3--3.0.2.sql  pgrouting--3.0.1--3.0.5.sql  pgrouting--3.0.3--3.2.0.sql  pgrouting--3.1.0--3.1.1.sql  pgrouting--3.1.3--3.4.0.sql  pgrouting--4.0.0.sql
pgrouting--2.6.1--3.0.2.sql  pgrouting--2.6.3--3.0.3.sql  pgrouting--3.0.1--3.0.6.sql  pgrouting--3.0.3--3.2.1.sql  pgrouting--3.1.0--3.1.2.sql  pgrouting--3.1.3--3.5.0.sql  pgrouting.control
pgrouting--2.6.1--3.0.3.sql  pgrouting--2.6.3--3.0.4.sql  pgrouting--3.0.1--3.1.0.sql  pgrouting--3.0.3--3.2.2.sql  pgrouting--3.1.0--3.1.3.sql  pgrouting--3.1.3--4.0.0.sql 

if I want to use version 3.0.1:

CREATE EXTENSION pgRouting WITH VERSION '3.0.1'

About the library

ls /usr/lib/postgresql/13/lib/libpgrouting-*
/usr/lib/postgresql/13/lib/libpgrouting-3.0.so  /usr/lib/postgresql/13/lib/libpgrouting-3.2.so  /usr/lib/postgresql/13/lib/libpgrouting-3.4.so  /usr/lib/postgresql/13/lib/libpgrouting-4.0.so
/usr/lib/postgresql/13/lib/libpgrouting-3.1.so  /usr/lib/postgresql/13/lib/libpgrouting-3.3.so  /usr/lib/postgresql/13/lib/libpgrouting-3.5.so

version 3.0.1 will use libpgrouting-3.0.so version 3.0.2 will use libpgrouting-3.0.so

cvvergara avatar Dec 16 '21 19:12 cvvergara

Looking at ./configure is because postgis is not using cmake

cvvergara avatar Oct 05 '22 01:10 cvvergara