Article 6HCFE [SOLVED] libperl library required error when building postgresql in lxc

[SOLVED] libperl library required error when building postgresql in lxc

by
ar2deetu
from LinuxQuestions.org on (#6HCFE)
I am testing Slackware 15 in an LXC container and am trying to build a PostgreSQL package.

I've downloaded the source in the DOWNLOAD directive in the postgresql.info file.

I've been installing everything I needed when encountered however, after last `./postgresql.SlackBuild` I am stuck on the current error:

Code:...
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking for perl.h... yes
checking for libperl... no
configure: error: libperl library is required for Perl
`libperl.so` is found here:
Code:/usr/lib64/perl5/CORE/libperl.so
/usr/lib64/libperl.soI've also noticed in `config.log` the following error:
Code:/usr/bin/ld: cannot find -lnslAlthough, I see a lot of "/usr/bin/ld cannot find etc, etc" errors so this may not be part of the problem.

Here is more of the error from config.log:
Code:...
configure:19384: checking for libperl
configure:19400: gcc -o conftest -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -fPIC -fPIC -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE conftest.c -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc >&5
/usr/bin/ld: cannot find -lnsl
collect2: error: ld returned 1 exit status
configure:19400: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "PostgreSQL"
| #define PACKAGE_TARNAME "postgresql"
| #define PACKAGE_VERSION "14.9"
| #define PACKAGE_STRING "PostgreSQL 14.9"
| #define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org"
| #define PACKAGE_URL "https://www.postgresql.org/"
| #define CONFIGURE_ARGS " '--prefix=/usr/lib64/postgresql/14' '--sysconfdir=/etc/postgresql/14' '--includedir=/usr/include' '--datarootdir=/usr/share' '--mandir=/usr/man' '--docdir=/usr/doc/postgresql-14.9' '--datadir=/usr/share/postgresql-14' '--with-openssl' '--with-tcl' '--with-perl' '--with-python' '--with-libxml' '--with-libxslt' '--enable-thread-safety' '--with-system-tzdata=/usr/share/zoneinfo' '--disable-nls' '--build=x86_64-slackware-linux' 'build_alias=x86_64-slackware-linux' 'CFLAGS=-O2 -fPIC' 'PYTHON=/usr/bin/python3'"
| #define PG_MAJORVERSION "14"
...
...
| #define USE_SYSV_SHARED_MEMORY 1
| #define MEMSET_LOOP_LIMIT 1024
| /* end confdefs.h. */
|
| #include <EXTERN.h>
| #include <perl.h>
|
| int
| main ()
| {
| perl_alloc();
| ;
| return 0;
| }
configure:19404: result: no
configure:19406: error: libperl library is required for Perl
...This happens at the `--with-perl` flag on `.configure` in `postgresql.Slackbuild`.

Here are installed packages:
Code:ls /var/log/packages/

aaa_base-15.0-x86_64-4_slack15.0 iputils-20211215-x86_64-1 python-docutils-0.17.1-x86_64-3 [11/1817]
aaa_glibc-solibs-2.33-x86_64-5 kdev-python-21.12.1-x86_64-1 python-doxypypy-0.8.8.6-x86_64-1
aaa_libraries-15.0-x86_64-19 kernel-headers-5.15.139-x86-1 python-doxyqml-0.5.1-x86_64-1
aaa_terminfo-6.3-x86_64-1 kmod-29-x86_64-1 python-future-0.18.2-x86_64-7
acl-2.3.1-x86_64-1 less-590-x86_64-1 python-idna-3.3-x86_64-2
attr-2.5.1-x86_64-1 libaio-0.3.112-x86_64-3 python-markdown-3.3.4-x86_64-3
bash-5.1.016-x86_64-1 libcgroup-0.41-x86_64-10 python-notify2-0.3.1-x86_64-10
bin-11.1-x86_64-5 libmnl-1.0.4-x86_64-5 python-packaging-21.3-x86_64-1
binutils-2.37-x86_64-1 libpsl-0.21.1-x86_64-4 python-pbr-5.8.0-x86_64-1
bison-3.8.2-x86_64-1 libpwquality-1.4.4-x86_64-6 python-pillow-8.4.0-x86_64-2
bzip2-1.0.8-x86_64-3 libseccomp-2.5.3-x86_64-1 python-pip-21.3.1-x86_64-2
ca-certificates-20231117-noarch-1_slack15.0 libsodium-1.0.18-x86_64-3 python-ply-3.11-x86_64-8
cmake-3.21.4-x86_64-1 libunistring-0.9.10-x86_64-3 python-pycparser-2.21-x86_64-1
coreutils-9.0-x86_64-3 libxml2-2.11.6-x86_64-1_slack15.0 python-pygments-2.10.0-x86_64-3
cracklib-2.9.7-x86_64-3 libxslt-1.1.35-x86_64-1_slack15.0 python-pysol_cards-0.12.0-x86_64-2
dbus-python-1.2.18-x86_64-3 make-4.3-x86_64-3 python-random2-1.0.1-x86_64-5
dhcpcd-9.4.1-x86_64-1 man-db-2.9.4-x86_64-3 python-requests-2.26.0-x86_64-3
dialog-1.3_20211214-x86_64-1 man-pages-5.13-noarch-1 python-sane-2.9.1-x86_64-5
diffutils-3.8-x86_64-1 mc-4.8.27-x86_64-1 python-setuptools-57.5.0-x86_64-2
e2fsprogs-1.46.5-x86_64-1 mpfr-4.1.0-x86_64-3 python-setuptools_scm-6.3.2-x86_64-1
elogind-246.10-x86_64-1 nano-6.0-x86_64-1 python-six-1.16.0-x86_64-3
elvis-2.2_0-x86_64-8 ncurses-6.3-x86_64-1 python-tomli-1.2.2-x86_64-1
etc-15.0-x86_64-17 network-scripts-15.0-noarch-19_slack15.0 python-urllib3-1.26.8-x86_64-1
extra-cmake-modules-5.90.0-x86_64-1 nvi-1.81.6-x86_64-3 python3-3.9.18-x86_64-1_slack15.0
file-5.41-x86_64-1 openssh-9.3p2-x86_64-1_slack15.0 readline-8.1.002-x86_64-1
findutils-4.8.0-x86_64-3 openssl-1.1.1w-x86_64-1_slack15.0 rsync-3.2.7-x86_64-1_slack15.0
flex-2.6.4-x86_64-5 openssl-solibs-1.1.1w-x86_64-1_slack15.0 sed-4.8-x86_64-3
gawk-5.1.1-x86_64-1 pam-1.5.2-x86_64-1 shadow-4.8.1-x86_64-12
gcc-11.2.0-x86_64-2 pam-krb5-4.11-x86_64-1 slackpkg-15.0.10-noarch-1
gcc-g++-11.2.0-x86_64-2 patch-2.7.6-x86_64-5 slackpkgplus
gcc-gdc-11.2.0-x86_64-2 pcre-8.45-x86_64-1 sudo-1.9.15p4-x86_64-1_slack15.0
gccmakedep-1.0.3-noarch-4 pcre2-10.39-x86_64-1 sysfsutils-2.1.0-x86_64-4
gettext-0.21-x86_64-3 perl-5.34.0-x86_64-2_slack15.0 sysvinit-3.01-x86_64-1
gettext-tools-0.21-x86_64-3 php81-8.1.27-x86_64-1_slack15.0 sysvinit-functions-8.53-x86_64-5
git-2.35.8-x86_64-1_slack15.0 pkgtools-15.0-noarch-42 sysvinit-scripts-15.0-noarch-8
glibc-2.33-x86_64-5 procps-ng-3.3.17-x86_64-2 tar-1.34-x86_64-2_slack15.0
glibc-i18n-2.33-x86_64-5 python-Jinja2-3.0.3-x86_64-1 tcl-8.6.12-x86_64-1
glibc-profile-2.33-x86_64-5 python-MarkupSafe-2.0.1-x86_64-1 time-1.9-x86_64-4
glibc-zoneinfo-2023d-noarch-1_slack15.0 python-PyYAML-6.0-x86_64-1 tree-1.8.0-x86_64-3
gmp-6.2.1-x86_64-3 python-appdirs-1.4.4-x86_64-6 utempter-1.2.0-x86_64-3
gnupg-1.4.23-x86_64-4 python-certifi-2021.10.8-x86_64-2 util-linux-2.37.4-x86_64-2_slack15.0
grep-3.7-x86_64-1 python-cffi-1.15.0-x86_64-2 vim-9.0.2127-x86_64-1_slack15.0
gzip-1.12-x86_64-1_slack15.0 python-chardet-4.0.0-x86_64-5 wget-1.21.2-x86_64-1
hostname-3.23-x86_64-3 python-charset-normalizer-2.0.10-x86_64-1 which-2.21-x86_64-4
inetd-1.79s-x86_64-14 python-distro-1.6.0-x86_64-2 xz-5.2.5-x86_64-4_slack15.0
iproute2-5.16.0-x86_64-1 python-dnspython-2.1.0-x86_64-3 zlib-1.2.13-x86_64-1_slack15.0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments