php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61551 Error "/usr/bin/ld: warning: libnnz11.so not found" when using --disable-rpath
Submitted: 2012-03-29 09:04 UTC Modified: 2021-08-29 04:22 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:3 of 4 (75.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: jm at trash-mail dot com Assigned: cmb (profile)
Status: No Feedback Package: OCI8 related
PHP Version: Irrelevant OS: linux x64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-03-29 09:04 UTC] jm at trash-mail dot com
Description:
------------
Installed Oracle instantclient from RPM:

/usr/lib/oracle/11.2/client64/lib looks like this:

libclntsh.so
libclntsh.so.11.1
libnnz11.so
libocci.so
libocci.so.11.1
libociei.so
libocijdbc11.so
ojdbc5.jar
ojdbc6.jar
ottclasses.zip
xstreams.jar

configuring and compiling oci8 results in 
# ldd modules/oci8.so
...
	libnnz11.so => not found
...

even though libnnz11.so is present in the above listing.

What helps is this:

--- config.m4.old       2012-03-29 10:31:58.000000000 +0200
+++ config.m4   2012-03-29 10:31:43.000000000 +0200
@@ -321,6 +321,7 @@

     AC_OCI8IC_VERSION($PHP_OCI8_INSTANT_CLIENT)
     PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
+    PHP_ADD_LIBRARY(nnz11, 1, OCI8_SHARED_LIBADD)
     PHP_ADD_LIBPATH($PHP_OCI8_INSTANT_CLIENT, OCI8_SHARED_LIBADD)

     AC_DEFINE(HAVE_OCI_INSTANT_CLIENT,1,[ ])

--> # ldd modules/oci8.so
        linux-vdso.so.1 =>  (0x00007fff9efc5000)
        libclntsh.so.11.1 => /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1 (0x00007f2b4f24c000)
        libnnz11.so => /usr/lib/oracle/11.2/client64/lib/libnnz11.so (0x00007f2b4ee7f000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f2b4eaef000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f2b4e8eb000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f2b4e694000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2b4e477000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f2b4e25f000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007f2b4e05c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2b51d11000)

\o/


Patches

config.m4.61551.patch (last revision 2013-01-22 07:14 UTC by sixd@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-29 11:29 UTC] johannes@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: sixd
 [2012-03-29 15:05 UTC] sixd@php.net
-Status: Assigned +Status: Feedback
 [2012-03-29 15:05 UTC] sixd@php.net
What operating system and version are you using?
What version of Instant Client are you using?
What is your 'configure' line?
 [2013-01-18 10:18 UTC] kenji dot uui at gmail dot com
I got the error when I built php-5.3.20:

/usr/bin/ld: warning: libnnz11.so, needed by /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so, not found (try using -rpath or -rpath-link)

configure:

'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--enable-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--enable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' --with-oci8 --with-pdo-oci=$ORACLE_HOME --with-sqlite3 --enable-sqlite-utf8

Environment:

CentOS 5.2 64bit
oracle-xe-11.2.0-1.0.x86_64.rpm
PHP 5.3.20
 [2013-01-22 05:02 UTC] sixd@php.net
-Summary: dynamic linker says libnnz11.so not found +Summary: Error "/usr/bin/ld: warning: libnnz11.so not found" when using --disable-rpath -Status: Feedback +Status: Open
 [2013-01-22 05:02 UTC] sixd@php.net
Either:
- Don't use --disable-rpath.
- set LD_LIBRARY_PATH to the Oracle library directory before invoking 'make'.
 [2013-01-22 07:14 UTC] sixd@php.net
The following patch has been added/updated:

Patch Name: config.m4.61551.patch
Revision:   1358838876
URL:        https://bugs.php.net/patch-display.php?bug=61551&patch=config.m4.61551.patch&revision=1358838876
 [2013-01-22 07:16 UTC] sixd@php.net
Try the attached patch to ext/oci8/config.m4.
Rebuild the configuration file before configuring the PHP build:
  ./buildconf --force
  ./configure ...
  make
 [2013-01-23 12:07 UTC] kenji dot uui at gmail dot com
Your patch worked fine. I built php-5.3.21.
 [2017-10-24 08:06 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: sixd +Assigned To:
 [2021-08-18 10:48 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-18 10:48 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-08-29 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 18:03:43 2023 UTC