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