Attempting to Build a Pro*C Application Fails With: cannot open shared object file: No such file or directory

(Doc ID 859523.1)

Last updated on JULY 05, 2017

Applies to:

Precompilers - Version and later
Information in this document applies to any platform.
***Checked for relevance on 27th Jun 2016***


Attempting to build a Pro*C application or simply run the Pro*C pre-compiler fails with:

% /opt/app/oracle/product/ sqlcheck=syntax code=ansi_c
include=/home/project/src/libs in
clude=/usr/lib/gcc/i386-redhat-linux/3.4.6//include nousage.pc
/opt/app/oracle/product/ error while loading shared libraries: cannot open shared object file: No such file or directory

The ldd command shows that both Pro*C and SQL*Plus reference the file, but executing the SQL*Plus executable (sqlplus) works while Pro*C (proc) fails.

Here is the ldd output from Pro*C:

> ldd proc
/etc/ (0x00130000) => /lib/i686/ (0x00111000) => not found => not found => /lib/ (0x0022c000) => /lib/i686/ (0x002a2000) => /lib/i686/ (0x00b56000) => /lib/ (0x00b08000) => /lib/i686/ (0x002c5000)
/lib/ (0x00993000)

Here is the ldd output from SQL*Plus

> ldd sqlplus
/etc/ (0x0066a000) => /opt/app/oracle/product/ (0x00d63000) => /opt/app/oracle/product/ (0x00e09000) => /opt/app/oracle/product/ (0x001f9000) => /lib/ (0x00d01000) => /lib/i686/ (0x00111000) => /lib/i686/ (0x006ad000) => /lib/ (0x00134000) => /lib/i686/ (0x003a3000)
/lib/ (0x00993000) => not found

Attempting to rebuild the Pro*C executable produces a warning

> make -f relink EXENAME=proc
Linking /opt/app/oracle/product/
/usr/bin/ld: warning:, needed by /opt/app/oracle/product/,
not found (try using -rpath or -rpath-link)
rm -f /opt/app/oracle/product/
mv /opt/app/oracle/product/ /opt/app/oracle/product/


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms