Building Static Application/Library Using Pro*C Includes Shared Library libnnz10.so (Doc ID 377651.1)

Last updated on JULY 05, 2017

Applies to:

Precompilers - Version 10.2.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 25-Mar-2013***


Symptoms

Using Pro*C to generate static executable from demo "sampl10.pc" by using build_static option results in reference to shared library libnnz10.so. 

Use of ldd command will prove that the library libnnz10.so is not static.

e.g.,

>cd $ORACLE_HOME/precomp/demo/proc

> make  -f demo_proc.mk build_static EXE=sample10 OBJS=sample10.o

>ls -l sample10*
-rwxr-xr-x 1 emtools emtools 21780672 Jul 11 08:19 sample10*
-rw-r--r-- 1 emtools emtools 45029 Jul 11 08:18 sample10.c
-rw-r--r-- 1 emtools emtools 23872 Jul 11 08:18 sample10.o
-rw-rw---- 1 emtools emtools 19286 May 16 2005 sample10.pc

> ldd sample10
libkstat.so.1 => /usr/lib/64/libkstat.so.1
libnnz10.so => $ORACLE_HOME/lib/libnnz10.so        <---- Shared library !
libnsl.so.1 => /usr/lib/64/libnsl.so.1
libsocket.so.1 => /usr/lib/64/libsocket.so.1
libgen.so.1 => /usr/lib/64/libgen.so.1
libdl.so.1 => /usr/lib/64/libdl.so.1
libsched.so.1 => /usr/lib/64/libsched.so.1
libaio.so.1 => /usr/lib/64/libaio.so.1
librt.so.1 => /usr/lib/64/librt.so.1
libm.so.1 => /usr/lib/64/libm.so.1
libthread.so.1 => /usr/lib/64/libthread.so.1
libc.so.1 => /usr/lib/64/libc.so.1
libmp.so.2 => /usr/lib/64/libmp.so.2
/usr/platform/SUNW,Ultra-Enterprise/lib/sparcv9/libc_psr.so.1

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