FS#59767 - [postgresql] error loading libperl.so, libperl.so missing

Attached to Project: Arch Linux
Opened by M. Ham. (MHami) - Thursday, 23 August 2018, 07:30 GMT
Last edited by Levente Polyak (anthraxx) - Tuesday, 02 October 2018, 07:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When loading the plperl extension with "CREATE EXTENSION plperl;" an error is displayed which says it can't load /usr/lib/postgresql/plperl.so. Can't open shared object file. File not found.

The file is there:

$ file /usr/lib/postgresql/plperl.so
/usr/lib/postgresql/plperl.so: ELF 64-bit LSB pie executable x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=70354b1419599e3a2311c77bdd0ddfba946188ef, stripped

However:

$ ldd /usr/lib/postgresql/plperl.so
linux-vdso.so.1 (0x00007fffb2d2c000)
libperl.so => not found
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fdf9bb3e000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fdf9b97a000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007fdf9bb8f000)

Additional info:
* postgresql 10.5-1
* perl 5.28.0-1


Steps to reproduce:

just run CREATE EXTENSION plperl; in the psql command line
This task depends upon

Closed by  Levente Polyak (anthraxx)
Tuesday, 02 October 2018, 07:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  10.5-2
Comment by M. Ham. (MHami) - Monday, 27 August 2018, 04:54 GMT
See https://bbs.archlinux.org/viewtopic.php?id=239888

Others can reproduce the issue. If it is an issue on my part please tell me what to install.
Comment by Doug Newgard (Scimmia) - Monday, 27 August 2018, 04:55 GMT
so it's not that libperl.so is missing, just that it isn't in a location the linker can find it.
Comment by Tim (bastelfreak) - Sunday, 23 September 2018, 11:15 GMT
This is, in my opinion, a bug that got introduced in https://git.archlinux.org/svntogit/packages.git/commit/?h=packages/postgresql&id=7c6b1ec4464bc86702f3a849eaa4cfb8cb9c69a0. After reverting this commit, postgresql is able to find libperl.so again. I use my own compiled package at the moment and was able to load the plperl extension. I hacked the testsuite into the PKGBUILD to verify this:

diff --git a/repos/extra-x86_64/PKGBUILD b/repos/extra-x86_64/PKGBUILD
index 96c64da..7d43bf2 100644
--- a/repos/extra-x86_64/PKGBUILD
+++ b/repos/extra-x86_64/PKGBUILD
@@ -56,7 +56,6 @@ build() {
--with-ldap
--enable-nls
--enable-thread-safety
- --disable-rpath
)

# only build plpython3 for now
@@ -76,7 +75,9 @@ build() {
# regular build with everything
./configure ${options[@]} \
PYTHON=/usr/bin/python2
+ make check
make world
+ make check-world
}

package_postgresql-libs() {


The tests are explained at https://www.postgresql.org/docs/10/static/regress-run.html. I'm not sure if I added them in the correct order. The tests succeed when '--disable-rpath' is removed and they fail if the option is present. Also I want to point out that neither the commit title 'upgpkg: postgresql 10.5-1' has an indication about the added option, nor is there an explanation on why it happened in the commit message or our mailinglists (I might missed it, at least I didn't find anything related).
Comment by Levente Polyak (anthraxx) - Sunday, 23 September 2018, 11:33 GMT
only perl is the isssue, the fix will be to preserve it for perl and disable for anything else. besides that make check-workd includes make check plus they belong to a check() function instead :)
Comment by Levente Polyak (anthraxx) - Sunday, 23 September 2018, 14:05 GMT
10.5-2 is in [testing] with linkable libperl.so and test suites
Comment by M. Ham. (MHami) - Tuesday, 02 October 2018, 06:59 GMT
The issue seems to be fixed for me. 10.5-2 works. Thank you.

Loading...