Wednesday, June 17, 2026

Forward with QGIS 4 and NetBSD 11 and more

 A week ago, based on a tip from Greg T, I build QGIS 4.0 on a NetBSD 10.1 system. It worked, after arranging the work-in-progress snapshot.

Peripherally, I got into gdal (for georeferenced PDFs), postgis (with PostgreSQL 18), and fence-posting of PGSQL 14 through 18 as allowed by the pkgsrc tools and all.


I put the problems first, instead of the splash screen showing the build worked; this showed it work-worked.

Splash - QGIS 4.0 starting banner, with an auth fail flag.


To show the build time (as opposed to package download/install time), I used Zabbix charts of CPU time and/or temperature.

First is the fastest machine I have, compiling QGIS 3 followed by 4. A few hours each. Ish.


Sidebar in the future about single-threaded builds, as I have a collection of antique laptops that I've kept out of the hopper by installing BSD on them with new SSDs. 2 or 4 core, plus one "tower" that has a laptop-type board inside (HP made money doing that).

The glitch for using other than one PGSQL versions I found was the packaged build use 16 (as of this writing), but the pkgsrc make process allows one (and only one) of 14 through 18. For some reason I've got even number versions running, not on purpose, just the time I jumped into the pool for some app/reason.

A bigger test/build/test cycle is brewing, with the rough starting time after 2026 Q2 packages are distributed in a few weeks. Meanwhile I built 3.4.8 on a system with PostgreSQL 14 server. 18 to 24 hours on this box.

===> Extracting for qgis-3.44.8

=> Full dependency postgresql14-client>=14.17nb2: found postgresql14-client-14.23

I like this chart as Zabbix allows dashboards with arbitrary charts to go on the same page. Easier than trying to line up 2 Y-axes unless they are on the same scale (like classic 1/5/15 minute processor loads).

Issues above (and beyond)

  • First encounter with an authorization message. Doesn't stop use, but it's unfamiliar territory.
  • Building a current work-in-progress sub-tree broke apps on my main machine, maybe not the version 4.0.
  • One core dump in the short time I ran 4.0.
  • I had/have outdated pkgsrc trees, getting up to date with 2026 Q1 then Q2.
  • Wishful thinking I could cross-build an aarch64 QGIS 4.0 as a Pi 4 may take as long to build as an old Intel (unsure)
  • Geo-referenced PDF exports depend on the gdal library; Greg imported a change prior to freeze that I have yet to try.
  • PostGIS works with version 18 now.
  • The PKGSRC.se site has some new data, some old data on their pages. Images at the end. #ToDo
  • The QGIS.org site shows build steps for FreeBSD and OpenBSD, not NetBSD. (Whom do I know?)
  • pkg_admin version?
  • The NetBSD wiki and pkgsrc docs could explain more how to/why to use a PGSQL version with QGIS or any other DB app.
    • e.g 

https://wiki.netbsd.org/pkgsrc/how_to_install_a_postgresql_server/
Last edited 5 years and 9 months ago
...
The recommended way is to install the prebuilt postgresql binaries.
The PostgreSQL Server depends on the postgreSQL Client.

? road less traveled way - how to use a version other than default ?

cd geography/qgis
set version ?
"make install"

PHP and PostgreSQL
You may wish to install the postgres Module for PHP, e.g. for PHP 7.0 use:
# pkg_add -v php70-pgsql

3$ pkgin se php".*"-pgsql
php56-pgsql-5.6.40nb1  PHP extension for PostgreSQL databases
php74-pgsql-7.4.33nb1  PHP extension for PostgreSQL databases
php82-pgsql-8.2.31nb1  PHP extension for PostgreSQL databases
php83-pgsql-8.3.31nb1  PHP extension for PostgreSQL databases
php84-pgsql-8.4.20nb1  PHP extension for PostgreSQL databases
php85-pgsql-8.5.7nb1  PHP extension for PostgreSQL databases

add Python example:

$ pkgin se psyco
py311-psycopg2-2.9.11  PostgreSQL database adapter for Python
py312-psycopg2-2.9.11  PostgreSQL database adapter for Python
py313-psycopg2-2.9.11 = PostgreSQL database adapter for Python
py314-psycopg2-2.9.11  PostgreSQL database adapter for Python

import psycopg2


add Perl via DBI/DBD:

$ pkgin se p5-dbd-postgresql
p5-DBD-postgresql-3.14.2nb5  Perl DBI/DBD driver for PostgreSQL databases

use DBI qw(:sql_types);
use DBD::Pg qw(:pg_types);

export PGUSER=scott
export PGDATABASE=emp
export PGHOST=dept

? Read the manual ?

https://www.netbsd.org/docs/pkgsrc/pkgsrc.html

pgsql.buildlink3.mk will accept any of the Postgres versions in the variable PGSQL_VERSIONS_ACCEPTED and default to the version PGSQL_VERSION_DEFAULT. See the file for more information.

Explain default version "middle of the road" at a point in time for more users than other versions (subject to debate) not "most recent" version of PostreSQL.


https://pkgsrc.se/wip/qgis


https://pkgsrc.se/geography/qgis

Others in scope:

https://pkgsrc.se/geography/gdal-lib

https://pkgsrc.se/databases/py-psycopg2


No comments: