Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DBD::Oracle and RHEL8

314 views
Skip to first unread message

Oliver Dörr

unread,
Jul 8, 2020, 1:00:04 AM7/8/20
to dbi...@perl.org
Hi,

i just tried to install DBD::Oracle 1.80 on RHEL 8 and the make command failes.
gcc  -lpthread -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -fstack-protector-strong  Oracle.o dbdimp.o oci8.o  -o blib/arch/auto/DBD/Oracle/Oracle.so  \
   -L/db/main/oraclient193/lib -lclntsh -ldl -lm -lpthread -lnsl -lirc -limf -lirc -lrt -laio -lresolv -lsvml -lperl   \

/usr/bin/ld: cannot find -lnsl
collect2: error: ld returned 1 exit status
make: *** [Makefile:524: blib/arch/auto/DBD/Oracle/Oracle.so] Error 1

A little research and comparing to RHEL 7 shows the problem.
RHEL7:
ll /usr/lib64/libnsl*
-rwxr-xr-x 1 root root 115816 Jan 22 06:19 /usr/lib64/libnsl-2.17.so
lrwxrwxrwx 1 root root     23 May  5 06:05 /usr/lib64/libnsl.so -> ../../lib64/libnsl.so.1
lrwxrwxrwx 1 root root     14 May  5 06:00 /usr/lib64/libnsl.so.1 -> libnsl-2.17.so

RHEL8:
 ll /usr/lib64/libnsl*
-rwxr-xr-x  1 root root 163520 Jan 16 21:40 /usr/lib64/libnsl-2.28.so
lrwxrwxrwx  1 root root     14 Jan 16 21:29 /usr/lib64/libnsl.so.1 -> libnsl-2.28.so
lrwxrwxrwx. 1 root root     15 Aug 12  2018 /usr/lib64/libnsl.so.2 -> libnsl.so.2.0.0
-rwxr-xr-x. 1 root root 116408 Aug 12  2018 /usr/lib64/libnsl.so.2.0.0


So the softlink is /usr/lib64/libnsl.so missing in RHEl8. Everything compiles if I add the softlink, but I'm not sure if this is a good idea. Should that not be fixed inside the Makefile.PL or so?

Any hints are welcome

Regards
Oliver


H.Merijn Brand

unread,
Jul 8, 2020, 3:30:03 AM7/8/20
to Oliver Dörr, dbi...@perl.org
On Mon, 6 Jul 2020 12:50:44 +0200, Oliver Dörr <oli...@doerr-privat.de>
wrote:

> Hi,
>
> i just tried to install DBD::Oracle 1.80 on RHEL 8 and the make
> command failes.
> gcc  -lpthread -shared -Wl,-z,relro -Wl,-z,now
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib
> -fstack-protector-strong  Oracle.o dbdimp.o oci8.o  -o
> blib/arch/auto/DBD/Oracle/Oracle.so  \
>    -L/db/main/oraclient193/lib -lclntsh -ldl -lm -lpthread -lnsl
> -lirc -limf -lirc -lrt -laio -lresolv -lsvml -lperl   \
>
> */usr/bin/ld: cannot find -lnsl*
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:524: blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
>
> A little research and comparing to RHEL 7 shows the problem.
> *RHEL7:*
> ll /usr/lib64/libnsl*
> -rwxr-xr-x 1 root root 115816 Jan 22 06:19 /usr/lib64/libnsl-2.17.so
> *lrwxrwxrwx 1 root root     23 May  5 06:05 /usr/lib64/libnsl.so ->
> ../../lib64/libnsl.so.1*
> lrwxrwxrwx 1 root root     14 May  5 06:00 /usr/lib64/libnsl.so.1 ->
> libnsl-2.17.so
>
> RHEL8:
>  ll /usr/lib64/libnsl*
> -rwxr-xr-x  1 root root 163520 Jan 16 21:40 /usr/lib64/libnsl-2.28.so
> lrwxrwxrwx  1 root root     14 Jan 16 21:29 /usr/lib64/libnsl.so.1 ->
> libnsl-2.28.so
> lrwxrwxrwx. 1 root root     15 Aug 12  2018 /usr/lib64/libnsl.so.2 ->
> libnsl.so.2.0.0
> -rwxr-xr-x. 1 root root 116408 Aug 12  2018 /usr/lib64/libnsl.so.2.0.0
>
>
> So the softlink is */usr/lib64/libnsl.so* missing in RHEl8.
> Everything compiles if I add the softlink, but I'm not sure if this
> is a good idea. Should that not be fixed inside the Makefile.PL or so?

You most likely forgot to install the libnsl2-devel package

$ rpm -qf /usr/lib64/libnsl.so
libnsl2-devel-1.2.0-2.20180605git4a062cf.el8.x86_64

$ sudo dnf install -y libnsl2-devel

> Any hints are welcome
>
> Regards
> Oliver

--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.31 porting perl5 on HP-UX, AIX, and Linux
https://useplaintext.email https://tux.nl http://www.test-smoke.org
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/

Christopher Jones

unread,
Jul 8, 2020, 7:00:03 AM7/8/20
to Oliver Dörr, dbi...@perl.org

On RHEL8 or OL8 (or similar) you should install the 'libnsl' package to use Oracle Instant Client.  My update to the Instant Client install instructions about this seems to have gone AWOL.

A future Instant Client RPM will install this package by default. Work is also ongoing to review the need for this dependency in the first place.

Chris


-- 
https://twitter.com/ghrd
0 new messages