Subject: PG10 postgis24 + gdal on RHEL6

From: Justin Pryzby <[email-masked]>
Date: Wed, 29 Nov 2017 04:03:19 -0600

Just wanted to point out that the GDAL package seems to be unavailable for PG10
for (at least) centos6.

Deploying a new customer, our ansible deployment script is failing like so:

TASK: [redhat_pgsql | Install postgresql-server] ******************************
failed: [new.gta] => {"changed": true, "cmd": ["yum", "-y", "install", "postgresql10-server", "postgresql10-docs", "postgresql10-contrib", "pgfincore10", "pg_repack10", "pgtune", "proj-nad", "libpqxx", "libpqxx-devel", "postgis24_10", "postgis24_10-client", "postgis24_10-docs", "postgis24_10-utils"], "delta": "0:00:13.078998", "end": "2017-11-29 19:55:36.754333", "item": "", "rc": 1, "start": "2017-11-29 19:55:23.675335"}

stderr: Error: Package: postgis24_10-2.4.2-1.rhel6.x86_64 (pgdg10)
Requires: gdal-libs >= 1.9.0

Thanks,
Justin

---

From: Devrim Gündüz <[email-masked]>
Date: Wed, 29 Nov 2017 10:22:48 +0000

Hi Justin,

On Wed, 2017-11-29 at 04:03 -0600, Justin Pryzby wrote:
> Just wanted to point out that the GDAL package seems to be unavailable for
> PG10 for (at least) centos6.

Apologies for the inconvenience. I just pushed the packages to repo. They will
be available 1 hour later.

Regards,
-- 
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

---

From: Justin Pryzby <[email-masked]>
Date: Thu, 7 Dec 2017 15:02:45 -0600

> be available 1 hour later.

It looks like maybe the same thing is true for libgeotiff.x86_64 ?
..which I see is available @pgdg94, and 96, but not 10.

Thanks

Justin

---

From: Justin Pryzby <[email-masked]>
Date: Fri, 8 Dec 2017 13:33:13 -0600

I compared lists of RPMs available for PG10 vs PG96 for RHEL6 and found that
these seem to be missing for PG10.  That primarily affects new installs, users
who upgrade from PG10 are likely to have the PG96 PGDG repo still.

libgeotiff proj libpqxx?

---

From: Justin Pryzby <[email-masked]>
Date: Thu, 14 Dec 2017 13:15:02 -0600

Just checking in.  Our deployment scripts intending to use PG10 currently fail
unless I install PGDG PG96 repo rpm.

-- 
Justin Pryzby
System Administrator
Telsasoft
+1-952-707-8581

---

From: Devrim Gündüz <[email-masked]>
Date: Fri, 15 Dec 2017 06:05:51 +0300

Hi,

On Fri, 2017-12-08 at 13:33 -0600, Justin Pryzby wrote:
> libgeotiff

Pushed to repos. They will be available in next 20 mins.

>  proj

Please grab this from EPEL:

https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/

>  libpqxx?

It is already in the repo (5.0.1-2)

Regards,

---

From: Justin Pryzby <[email-masked]>
Date: Thu, 14 Dec 2017 21:26:21 -0600

> Pushed to repos. They will be available in next 20 mins.

Thank you!

> https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/

You're right, thanks.

> It is already in the repo (5.0.1-2)

Not for centos6 (nor RHEL6) ?
https://yum.postgresql.org/10/redhat/rhel-6-x86_64/

Justin

---

From: Devrim Gündüz <[email-masked]>
Date: Fri, 15 Dec 2017 09:16:36 +0300

Hi,

> https://yum.postgresql.org/10/redhat/rhel-6-x86_64/

Sorry, I thought it was RHEL 7. libpqxx 5 does not compile on RHEL 6. Please
grab libpqxx 4.0.1 from EPEL.

Regards,

---

From: Justin Pryzby <[email-masked]>
Date: Sat, 16 Dec 2017 13:01:01 -0600

> https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/

For centos6, I think there's an issue with the version of proj in EPEL combined
with postgis10_24:

[pryzbyj@db ~]$ yum list --showdu proj
...
Installed Packages
proj.x86_64                                                                           4.7.0-1.el6                                                                             @epel
Available Packages
proj.i686                                                                             4.7.0-1.el6                                                                             epel
proj.x86_64                                                                           4.7.0-1.el6                                                                             epel
proj.x86_64                                                                           4.8.0-2.rhel6                                                                           pgdg96

[pryzbyj@db ~]$ psql 3rivers -f /usr/pgsql-10/share/contrib/postgis-2.4/postgis.sql 2>&1 |head
BEGIN
SET
DO
CREATE FUNCTION
psql:/usr/pgsql-10/share/contrib/postgis-2.4/postgis.sql:94: ERROR:  could not load library "/usr/pgsql-10/lib/postgis-2.4.so": /usr/pgsql-10/lib/postgis-2.4.so: undefined symbol: pj_get_spheroid_defn
psql:/usr/pgsql-10/share/contrib/postgis-2.4/postgis.sql:99: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:/usr/pgsql-10/share/contrib/postgis-2.4/postgis.sql:107: ERROR:  current transaction is aborted, commands ignored until end of transaction block

[pryzbyj@db ~]$ nm -D /usr/lib64/libproj.so.0.6.6 |grep pj_get_spheroid_defn || echo NOT FOUND
NOT FOUND

proj 4.8 from PGDG96 works ok:

[pryzbyj@db ~]$ psql 3rivers -qf /usr/pgsql-10/share/contrib/postgis-2.4/postgis.sql && echo OK
OK

[pryzbyj@db ~]$ sudo yum list --showduplicates postgis24_10{,-client,-utils} libgeotiff gdal-libs libspatialite proj
Loaded plugins: etckeeper, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.scalabledns.com
 * epel: mirror.chpc.utah.edu
 * extras: repos.forethought.net
 * ius: ord.mirror.rackspace.com
 * updates: repos.forethought.net
Installed Packages
gdal-libs.x86_64                                                                           1.9.2-8.rhel6                                                                     @pgdg10
libgeotiff.x86_64                                                                          1.4.0-1.rhel6                                                                     @pgdg96
libspatialite.x86_64                                                                       2.4.0-0.6.RC4.el6                                                                 @epel  
postgis24_10.x86_64                                                                        2.4.2-1.rhel6                                                                     @pgdg10
postgis24_10-client.x86_64                                                                 2.4.2-1.rhel6                                                                     @pgdg10
postgis24_10-utils.x86_64                                                                  2.4.2-1.rhel6                                                                     @pgdg10
proj.x86_64                                                                                4.8.0-2.rhel6                                                                     @pgdg96
Available Packages
gdal-libs.x86_64                                                                           1.9.2-8.rhel6                                                                     pgdg10 
gdal-libs.x86_64                                                                           1.9.2-8.rhel6                                                                     pgdg96 
libgeotiff.i686                                                                            1.2.5-6.el6                                                                       epel   
libgeotiff.x86_64                                                                          1.2.5-6.el6                                                                       epel   
libgeotiff.x86_64                                                                          1.4.0-1.rhel6                                                                     pgdg96 
libspatialite.i686                                                                         2.4.0-0.6.RC4.el6                                                                 epel   
libspatialite.x86_64                                                                       2.4.0-0.6.RC4.el6                                                                 epel   
postgis24_10.x86_64                                                                        2.4.1-1.rhel6                                                                     pgdg10 
postgis24_10.x86_64                                                                        2.4.2-1.rhel6                                                                     pgdg10 
postgis24_10-client.x86_64                                                                 2.4.1-1.rhel6                                                                     pgdg10 
postgis24_10-client.x86_64                                                                 2.4.2-1.rhel6                                                                     pgdg10 
postgis24_10-utils.x86_64                                                                  2.4.1-1.rhel6                                                                     pgdg10 
postgis24_10-utils.x86_64                                                                  2.4.2-1.rhel6                                                                     pgdg10 
proj.i686                                                                                  4.7.0-1.el6                                                                       epel   
proj.x86_64                                                                                4.7.0-1.el6                                                                       epel   
proj.x86_64                                                                                4.8.0-2.rhel6                                                                     pgdg96 

Thanks for your support in this and in building RPMs.

Justin

---

From: Justin Pryzby <[email-masked]>
Date: Mon, 18 Dec 2017 08:56:35 -0600

...
> psql:/usr/pgsql-10/share/contrib/postgis-2.4/postgis.sql:94: ERROR:  could not load library "/usr/pgsql-10/lib/postgis-2.4.so": /usr/pgsql-10/lib/postgis-2.4.so: undefined symbol: pj_get_spheroid_d…

I meant to also say:
I think that indicates a missing dependency version in the postgis package.  I
know that in debian, this kind of thing is handled by dpkg-shlibdeps.

-- 
Justin Pryzby
System Administrator
Telsasoft
+1-952-707-8581

---

From: Justin Pryzby <[email-masked]>
Date: Tue, 19 Dec 2017 15:30:13 -0600

> know that in debian, this kind of thing is handled by dpkg-shlibdeps.

I was doing another deployment (ansible) and again ran into same issue (I
think):

TASK: [legacy_appserver | create postgis environment] ************************* 
failed: [new.gta] => {"failed": true, "item": ""}
msg: Database query failed: could not load library "/usr/pgsql-10/lib/postgis-2.4.so": /usr/pgsql-10/lib/postgis-2.4.so: undefined symbol: geod_init

gdal-libs.x86_64                            1.9.2-8.rhel6                @pgdg10
geos.x86_64                                 3.5.0-1.rhel6                @pgdg10
geos36.x86_64                               3.6.2-2.rhel6                @pgdg10
geos36-devel.x86_64                         3.6.2-2.rhel6                @pgdg10

libgeotiff.x86_64                           1.4.0-1.rhel6                @pgdg96
postgis24_10.x86_64                         2.4.2-3.rhel6                @pgdg10
proj.x86_64                                 4.8.0-2.rhel6                @pgdg10
libspatialite.x86_64                   2.4.0-0.6.RC4.el6                   @epel

I see:
https://trac.osgeo.org/postgis/ticket/3142

[pryzbyj@gta-mtx-telsa ~]$ yum list --showdu proj
Loaded plugins: etckeeper, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.ndchost.com
 * epel: mirror.sjc02.svwh.net
 * extras: mirror.lax.hugeserver.com
 * ius: mirror.team-cymru.org
 * updates: mirrors.usc.edu
Installed Packages
proj.x86_64                        4.8.0-2.rhel6                         @pgdg10
Available Packages
proj.i686                          4.7.0-1.el6                           epel   
proj.x86_64                        4.7.0-1.el6                           epel   
proj.x86_64                        4.8.0-2.rhel6                         pgdg10 
proj.x86_64                        4.8.0-2.rhel6                         pgdg96 

I was able to work around by doing:
sudo yum downgrade postgis24_10{,-client,-utils}-2.4.2-1.rhel6

Was the postgis24_10 built against a proj from centos7 or not available in
repo?

-- 
Justin Pryzby
System Administrator
Telsasoft
+1-952-707-8581

---

From: Devrim Gündüz <[email-masked]>
Date: Wed, 20 Dec 2017 00:45:06 +0300

Hi,

On Mon, 2017-12-18 at 08:56 -0600, Justin Pryzby wrote:
> I meant to also say: I think that indicates a missing dependency version in
> the postgis package

I bite the bullet, and (I think) I got rid of all proj-4.8.0 dependency in RHEL
7 repos. RHEL 6 needs a bit more work, I am on it.

FWIW, PGDG repos will include GDAL, libgeotiff and OGDI, which uses proj49 RPMs
that we provide.

Regards,