Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#64606 - Postgis broken with new postgresql 12.1 package

Attached to Project: Community Packages
Opened by Johannes Schriewer (dunkelstern) - Friday, 22 November 2019, 07:53 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Thursday, 28 November 2019, 17:33 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

If you try to migrate from a postgres 11.x instance to the new postgres 12.1, Postgres will complain that the installed PostGIS library is incompatible:

When running `pg_upgrade`:

could not load library "$libdir/postgis-2.5": ERROR: could not load library "/usr/lib/postgresql/postgis-2.5.so": /usr/
lib/postgresql/postgis-2.5.so: undefined symbol: AllocSetContextCreateExtended

could not load library "$libdir/rtpostgis-2.5": ERROR: incompatible library "/usr/lib/postgresql/rtpostgis-2.5.so": ver
sion mismatch
DETAIL: Server is version 12, library is version 11.


I think it just needs a rebuild against postgres 12.
This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Thursday, 28 November 2019, 17:33 GMT
Reason for closing:  Implemented
Additional comments about closing:  postgis 3.0.0-1
Comment by Laurențiu Nicola (lnicola) - Friday, 22 November 2019, 11:39 GMT
A rebuild fixes it, but I haven't been able to migrate my old data using pg_upgrade because it uses a wrong path to load the extension:

pg_dump: error: query failed: ERROR: could not access file "$libdir/postgis-2.5": No such file or directory

Note the literal $libdir.

[pid 35726] stat("$libdir/postgis-2.5", 0x7ffdd59ef690) = -1 ENOENT (No such file or directory)

I didn't try using a manual backup and restore.
Comment by Roel (roelpaddestoel) - Saturday, 23 November 2019, 20:48 GMT
I managed to install postgis 3.0 on postgresql 12 by compiling version 2.5.3 as well and putting the files postgis-2.5.so, postgis_raster-2.5.so and postgis_topology-2.5.so in /usr/lib/postgresql.
Then run:
alter extension postgis update;
as described on http://postgis.net/2019/10/20/postgis-3.0.0/
Comment by Dian M Fay (dmfay) - Sunday, 24 November 2019, 04:48 GMT
I got caught by this after the new icu release forced me to upgrade from Postgres 11, and was able to install PostGIS 3.0.0 by tweaking the PKGBUILD (pkgver, pkgrel, sha256sums). I didn't try pg_upgrade, but there haven't been any surprises.
Comment by florian (elseif) - Wednesday, 27 November 2019, 11:58 GMT
hm I just installed postgis from the AUR, can somebody examplain to me, how I can rebuild it against postgres 12? (just reinstalling does not fix the issue)
currently I am stuck
Comment by Laurențiu Nicola (lnicola) - Wednesday, 27 November 2019, 12:01 GMT
@elseif See https://wiki.archlinux.org/index.php/Arch_Build_System. Something like:

$ sudo pacman -S asp
$ asp export postgis
$ cd postgis
$ makepkg -s
$ sudo pacman -U postgis-2.5.3-2-x86_64.pkg.tar
Comment by Jaroslav Lichtblau (Dragonlord) - Wednesday, 27 November 2019, 21:50 GMT
Rebuilt postgis 3.0.0-1 is in community-testing now.
Comment by florian (elseif) - Thursday, 28 November 2019, 07:00 GMT
@Dragonlord: thanks!
Comment by Jaroslav Lichtblau (Dragonlord) - Thursday, 28 November 2019, 17:16 GMT
So I guess it works as it should now? Moving it to [community] then.

Loading...