pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: QGIS and hard-coded PostgreSQL versions



Jim Spath <jspath55%gmail.com@localhost> writes:

> I have now built QGIS 3.44.11-Solothurn from pkgsrc 2026Q2 on systems
> with PostgreSQL server and/or client versions from 14 to 18. I posted
> about the older processor glitch earlier. I also built the wip QGIS
> 4.0.3-Norrköping on my faster machine.
> If I try to add the package I built on one database version platform,
> it will complain if a different version is installed. 3 and 4 act
> similarly:
>
> $ pkg_add ./qgis-4.0.3.tgz
> pkg_add: no pkg found for 'postgresql16-client>=16.0nb1', sorry.
> pkg_add: Can't install dependency postgresql16-client>=16.0nb1
> pkg_add: Expected dependency postgresql16-client>=16.0nb1 still missing
> pkg_add: 1 package addition failed
> $  psql --version
> psql (PostgreSQL) 18.4

When you build a package that uses pgsql, a version is selected at
package build time.    When you install a binary package, you must do so
in the context of a package repository (directory of pacakges, for
pkg_add) that has all the packages that were produced from the original
build.  You are calling pkg_add, and it's looking for pg16, presumably
what was installed when you built qgis, and it did not find it.  Is
there "postgresql16-client-16.0nb1.tar.gz" in the same directory?  If
not, why not?

> The QGIS code does not appear to depend on specific PG database libraries.
>
> $ ldd `which qgis` | grep -i sql
>         -lQt6Sql.6 => /usr/pkg/qt6/lib/libQt6Sql.so.6
>         -lsqlite3 => /usr/pkg/lib/libsqlite3.so

Use pkg_info, which on my system shows (in a long list)
  postgresql16-client>=16.0nb1

And, it's spelled pq :-)

  $ ldd /usr/pkg/bin/qgis|egrep pq
          -lpq.5 => /usr/pkg/lib/libpq.so.5

> This has more impact than missing Python plug-ins as QGIS won't
> install, much less run. It's likely there is a lot of infra behind
> this I don't understand. So, an observation without a fix.

Basically you must have a consistent set of binary packages, if you are
using binary packages.  I think you are moving single packages around,
which is unsound, and that isn't about qgis.


Home | Main Index | Thread Index | Old Index