Attempting to Build a Pro*C Application Fails With: libaio.so.1: cannot open shared object file: No such file or directory (Doc ID 859523.1)

Last updated on JULY 05, 2017

Applies to:

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

Symptoms

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

% /opt/app/oracle/product/11.1.0.6/bin/proc 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/11.1.0.6/bin/proc: error while loading shared libraries:
libaio.so.1: cannot open shared object file: No such file or directory


The ldd command shows that both Pro*C and SQL*Plus reference the libaio.so.1 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/libcwait.so (0x00130000)
librt.so.1 => /lib/i686/librt.so.1 (0x00111000)
libclntsh.so.11.1 => not found
libnnz11.so => not found
libdl.so.2 => /lib/libdl.so.2 (0x0022c000)
libm.so.6 => /lib/i686/libm.so.6 (0x002a2000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x00b56000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00b08000)
libc.so.6 => /lib/i686/libc.so.6 (0x002c5000)
/lib/ld-linux.so.2 (0x00993000)


Here is the ldd output from SQL*Plus

> ldd sqlplus
/etc/libcwait.so (0x0066a000)
libsqlplus.so => /opt/app/oracle/product/11.1.0.6/lib/libsqlplus.so (0x00d63000)
libclntsh.so.11.1 => /opt/app/oracle/product/11.1.0.6/lib/libclntsh.so.11.1 (0x00e09000)
libnnz11.so => /opt/app/oracle/product/11.1.0.6/lib/libnnz11.so (0x001f9000)
libdl.so.2 => /lib/libdl.so.2 (0x00d01000)
libm.so.6 => /lib/i686/libm.so.6 (0x00111000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x006ad000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00134000)
libc.so.6 => /lib/i686/libc.so.6 (0x003a3000)
/lib/ld-linux.so.2 (0x00993000)
libaio.so.1 => not found


Attempting to rebuild the Pro*C executable produces a warning

> make -f ins_precomp.mk relink EXENAME=proc
Linking /opt/app/oracle/product/11.1.0.6/precomp/lib/proc
/usr/bin/ld: warning: libaio.so.1, needed by /opt/app/oracle/product/11.1.0.6/lib//libclntsh.so,
not found (try using -rpath or -rpath-link)
rm -f /opt/app/oracle/product/11.1.0.6/bin/proc
mv /opt/app/oracle/product/11.1.0.6/precomp/lib/proc /opt/app/oracle/product/11.1.0.6/bin/

Cause

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