yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.99k stars 1.07k forks source link

[Docs] [post_install.sh] PostGIS extension fails to install on Alma8 #19389

Open FranckPachot opened 1 year ago

FranckPachot commented 1 year ago

Description

The instructions in YugabyteDB / Explore / SQL Features / PostgreSQL Extensions / PostGIS do not work on Centos8 because they install some libraries that are not compatible with the GLIBC shipped with YugabyteDB in Linuxbrew. YugabyteDB uses GLIBC 2.23 but after running ./bin/post_install.sh -e we have many libraries in yb-thirdparty with dependencies on higher GLIBC:

objdump -T $YB_HOME/lib/yb-thirdparty/* | awk '/^[/]/{f=$1} $0 ~ re{print gensub(re,"\\1 "f" \\2",1)}' re="^.* GLIBC_([0-9.]+) (.*)$" | sort -uV

...
2.23 /home/yugabyte/lib/yb-thirdparty/libquadmath.so.0:  __signgam
2.25 /home/yugabyte/lib/yb-thirdparty/libbsd.so.0:  __explicit_bzero_chk
2.25 /home/yugabyte/lib/yb-thirdparty/libcrypt.so.1:  getentropy
2.25 /home/yugabyte/lib/yb-thirdparty/libcrypt.so.1:  getrandom
2.25 /home/yugabyte/lib/yb-thirdparty/libcrypt.so.1:  __explicit_bzero_chk
2.25 /home/yugabyte/lib/yb-thirdparty/libexpat.so.1:  getrandom
2.26 /home/yugabyte/lib/yb-thirdparty/liburiparser.so.1:  reallocarray
2.27 /home/yugabyte/lib/yb-thirdparty/libIlmImf-2_2.so.22:  logf
2.27 /home/yugabyte/lib/yb-thirdparty/libarpack.so.2:  powf
2.27 /home/yugabyte/lib/yb-thirdparty/libgdal.so.30:  logf
2.27 /home/yugabyte/lib/yb-thirdparty/libgfortran.so.5:  expf
2.27 /home/yugabyte/lib/yb-thirdparty/libgfortran.so.5:  logf
2.27 /home/yugabyte/lib/yb-thirdparty/libhdf5.so.103:  powf
2.27 /home/yugabyte/lib/yb-thirdparty/liblapack.so.3:  logf
2.27 /home/yugabyte/lib/yb-thirdparty/liblapack.so.3:  powf
2.27 /home/yugabyte/lib/yb-thirdparty/libopenblaso.so.0:  expf
2.27 /home/yugabyte/lib/yb-thirdparty/libopenblaso.so.0:  logf
2.27 /home/yugabyte/lib/yb-thirdparty/libopenblaso.so.0:  powf
2.27 /home/yugabyte/lib/yb-thirdparty/libopenblasp.so.0:  expf
2.27 /home/yugabyte/lib/yb-thirdparty/libopenblasp.so.0:  logf
2.27 /home/yugabyte/lib/yb-thirdparty/libopenblasp.so.0:  powf
2.27 /home/yugabyte/lib/yb-thirdparty/libsatlas.so.3:  logf
2.27 /home/yugabyte/lib/yb-thirdparty/libsatlas.so.3:  powf
2.27 /home/yugabyte/lib/yb-thirdparty/libxerces-c-3.2.so:  logf
2.28 /home/yugabyte/lib/yb-thirdparty/libcfitsio.so.7:  fcntl64
2.28 /home/yugabyte/lib/yb-thirdparty/libsqlite3.so.0:  fcntl64
2.28 /home/yugabyte/lib/yb-thirdparty/libxml2.so.2:  fcntl64

The PostGIS extension fails with:

ERROR:  could not load library "/home/yugabyte/postgres/lib/postgis-3.so": /home/yugabyte/linuxbrew/lib/libc.so.6: version `GLIBC_2.28' not found (required by /home/yugabyte/postgres/../lib/yb-thirdparty/libxml2.so.2)
ERROR:  could not load library "/home/yugabyte/postgres/lib/postgis-3.so": /home/yugabyte/linuxbrew/lib/libc.so.6: version `GLIBC_2.28' not found (required by /home/yugabyte/postgres/../lib/yb-thirdparty/libsqlite3.so.0)

More details to reproduce here: https://dev.to/franckpachot/postgis-on-yugabytedb-alma8-with-workaround-2okj

Warning: Please confirm that this issue does not contain any sensitive information

rob-64 commented 10 months ago

@FranckPachot @sushantrmishra This work around no longer works, as postgresql11 rpms are not available on those repos now, same with the postgis ones.

rob-64 commented 10 months ago

I was finally able to get it to work by following option 2: https://dev.to/yugabyte/postgis-on-yugabytedb-alma8-with-workaround-2okj. HOWEVER, postgres repo has removed all the postgresql11 rpms, so I had to hunt and peck the internet for backups and manually install the rpms.

Are there any plans to upgrade postgresql compatibility past 11?

FranckPachot commented 10 months ago

@rob-64, thanks for the feedback. The merge with PostgreSQL 15 is ongoing.