DBD::Oracle and RHEL8

--------------999344EBAAF1810EE10A7550
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

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



--------------999344EBAAF1810EE10A7550
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi,<br>
    <br>
    i just tried to install DBD::Oracle 1.80 on RHEL 8 and the make
    command failes.<br>
    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  \<br>
       -L/db/main/oraclient193/lib -lclntsh -ldl -lm -lpthread -lnsl
    -lirc -limf -lirc -lrt -laio -lresolv -lsvml -lperl   \<br>
    <br>
    <b>/usr/bin/ld: cannot find -lnsl</b><br>
    collect2: error: ld returned 1 exit status<br>
    make: *** [Makefile:524: blib/arch/auto/DBD/Oracle/Oracle.so] Error
    1<br>
    <br>
    A little research and comparing to RHEL 7 shows the problem. <br>
    <b>RHEL7:</b><br>
    ll /usr/lib64/libnsl*<br>
    -rwxr-xr-x 1 root root 115816 Jan 22 06:19 /usr/lib64/libnsl-2.17.so<br>
    <b>lrwxrwxrwx 1 root root     23 May  5 06:05 /usr/lib64/libnsl.so
      -&gt; ../../lib64/libnsl.so.1</b><br>
    lrwxrwxrwx 1 root root     14 May  5 06:00 /usr/lib64/libnsl.so.1
    -&gt; libnsl-2.17.so<br>
    <br>
    RHEL8:<br>
     ll /usr/lib64/libnsl*<br>
    -rwxr-xr-x  1 root root 163520 Jan 16 21:40
    /usr/lib64/libnsl-2.28.so<br>
    lrwxrwxrwx  1 root root     14 Jan 16 21:29 /usr/lib64/libnsl.so.1
    -&gt; libnsl-2.28.so<br>
    lrwxrwxrwx. 1 root root     15 Aug 12  2018 /usr/lib64/libnsl.so.2
    -&gt; libnsl.so.2.0.0<br>
    -rwxr-xr-x. 1 root root 116408 Aug 12  2018
    /usr/lib64/libnsl.so.2.0.0<br>
    <br>
    <br>
    So the softlink is <b>/usr/lib64/libnsl.so</b> 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?<br>
    <br>
    Any hints are welcome<br>
    <br>
    Regards<br>
    Oliver<br>
    <br>
    <br>
  </body>
</html>

--------------999344EBAAF1810EE10A7550--
0
oliver
7/6/2020 10:50:44 AM
perl.dbi.dev 1960 articles. 0 followers. Follow

2 Replies
117 Views

Similar Articles

[PageSpeed] 7

--------------B7F68DCA77C87FC93A4EF553
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit


On 6/7/20 8:50 pm, Oliver Dörr 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?
>
> Any hints are welcome

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


--------------B7F68DCA77C87FC93A4EF553
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    <div class="moz-cite-prefix">On 6/7/20 8:50 pm, Oliver Dörr wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:8b0ff480-366d-4f90-8aee-aee0da2d7b59@doerr-privat.de">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Hi,<br>
      <br>
      i just tried to install DBD::Oracle 1.80 on RHEL 8 and the make
      command failes.<br>
      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  \<br>
         -L/db/main/oraclient193/lib -lclntsh -ldl -lm -lpthread -lnsl
      -lirc -limf -lirc -lrt -laio -lresolv -lsvml -lperl   \<br>
      <br>
      <b>/usr/bin/ld: cannot find -lnsl</b><br>
      collect2: error: ld returned 1 exit status<br>
      make: *** [Makefile:524: blib/arch/auto/DBD/Oracle/Oracle.so]
      Error 1<br>
      <br>
      A little research and comparing to RHEL 7 shows the problem. <br>
      <b>RHEL7:</b><br>
      ll /usr/lib64/libnsl*<br>
      -rwxr-xr-x 1 root root 115816 Jan 22 06:19
      /usr/lib64/libnsl-2.17.so<br>
      <b>lrwxrwxrwx 1 root root     23 May  5 06:05 /usr/lib64/libnsl.so
        -&gt; ../../lib64/libnsl.so.1</b><br>
      lrwxrwxrwx 1 root root     14 May  5 06:00 /usr/lib64/libnsl.so.1
      -&gt; libnsl-2.17.so<br>
      <br>
      RHEL8:<br>
       ll /usr/lib64/libnsl*<br>
      -rwxr-xr-x  1 root root 163520 Jan 16 21:40
      /usr/lib64/libnsl-2.28.so<br>
      lrwxrwxrwx  1 root root     14 Jan 16 21:29 /usr/lib64/libnsl.so.1
      -&gt; libnsl-2.28.so<br>
      lrwxrwxrwx. 1 root root     15 Aug 12  2018 /usr/lib64/libnsl.so.2
      -&gt; libnsl.so.2.0.0<br>
      -rwxr-xr-x. 1 root root 116408 Aug 12  2018
      /usr/lib64/libnsl.so.2.0.0<br>
      <br>
      <br>
      So the softlink is <b>/usr/lib64/libnsl.so</b> 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?<br>
      <br>
      Any hints are welcome<br>
    </blockquote>
    <p>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.<br>
    </p>
    <p>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.<br>
    </p>
    <p>Chris</p>
    <br>
    <pre class="moz-signature" cols="150">-- 
<a class="moz-txt-link-freetext" href="https://twitter.com/ghrd">https://twitter.com/ghrd</a>
</pre>
  </body>
</html>

--------------B7F68DCA77C87FC93A4EF553--
0
christopher
7/8/2020 6:57:56 AM
On Mon, 6 Jul 2020 12:50:44 +0200, Oliver D=C3=B6rr <oliver@doerr-privat.de>
wrote:

> Hi,
>=20
> i just tried to install DBD::Oracle 1.80 on RHEL 8 and the make
> command failes.
> gcc=C2=A0 -lpthread -shared -Wl,-z,relro -Wl,-z,now=20
> -specs=3D/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib=20
> -fstack-protector-strong=C2=A0 Oracle.o dbdimp.o oci8.o=C2=A0 -o=20
> blib/arch/auto/DBD/Oracle/Oracle.so=C2=A0 \
>  =C2=A0=C2=A0 -L/db/main/oraclient193/lib -lclntsh -ldl -lm -lpthread -ln=
sl
> -lirc -limf -lirc -lrt -laio -lresolv -lsvml -lperl=C2=A0=C2=A0 \
>=20
> */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
>=20
> 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=C2=A0=C2=A0=C2=A0=C2=A0 23 May=C2=A0 5 06:05 /usr=
/lib64/libnsl.so ->=20
> ../../lib64/libnsl.so.1*
> lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0 14 May=C2=A0 5 06:00 /usr/=
lib64/libnsl.so.1 ->=20
> libnsl-2.17.so
>=20
> RHEL8:
>  =C2=A0ll /usr/lib64/libnsl*
> -rwxr-xr-x=C2=A0 1 root root 163520 Jan 16 21:40 /usr/lib64/libnsl-2.28.so
> lrwxrwxrwx=C2=A0 1 root root=C2=A0=C2=A0=C2=A0=C2=A0 14 Jan 16 21:29 /usr=
/lib64/libnsl.so.1 ->=20
> libnsl-2.28.so
> lrwxrwxrwx. 1 root root=C2=A0=C2=A0=C2=A0=C2=A0 15 Aug 12=C2=A0 2018 /usr=
/lib64/libnsl.so.2 ->=20
> libnsl.so.2.0.0
> -rwxr-xr-x. 1 root root 116408 Aug 12=C2=A0 2018 /usr/lib64/libnsl.so.2.0=
..0
>=20
>=20
> 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
>=20
> Regards
> Oliver

--=20
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/
0
perl5
7/8/2020 7:03:12 AM
Reply: