How to build static applications (Doc ID 433372.1)

Last updated on NOVEMBER 21, 2013

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.8 and later
Linux x86
***Checked for relevance 21-Nov-2013***


Symptoms

Unable to build static executable on Linux with glibc 2.3

Sample of the errors when attempting to build oci02.c:

make -f demo_rdbms.mk build_static EXE=oci02 OBJS=oci02.o

/usr/bin/gcc -L/usr/local/oracle/product/9ir2/lib/
-L/usr/local/oracle/product/9ir2/rdbms/lib/ -o oci02 oci02.o -lclntst9 `cat
/usr/local/oracle/product/9ir2/lib/sysliblist` -ldl -lm
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lcvb24.o)(.text+0x45): In
function `lcvb24':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lcvb24.o)(.text+0xb4): In
function `lcvb24':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lcvb2w.o)(.text+0x45): In
function `lcvb2w':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lcvb2w.o)(.text+0xd3): In
function `lcvb2w':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstclo.o)(.text+0x33): In
function `lstclo':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstclo.o)(.text+0x5b): In
function `lstclo':
: undefined reference to `__ctype_tolower'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstclo.o)(.text+0x80): In
function `lstclo':
: undefined reference to `__ctype_tolower'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstmclo.o)(.text+0x4a): In
function `lstmclo':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstmclo.o)(.text+0x63): In
function `lstmclo':
: undefined reference to `__ctype_tolower'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstmclo.o)(.text+0x80): In
function `lstmclo':
: undefined reference to `__ctype_tolower'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstmup.o)(.text+0x31): In
function `lstmup':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstup.o)(.text+0x28): In
function `lstup':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstup.o)(.text+0x5d): In
function `lstup':
: undefined reference to `__ctype_toupper'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lxpname.o)(.text+0xc5): In
function `lxpname':
: undefined reference to `__ctype_tolower'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lstmlo.o)(.text+0x38): In
function `lstmlo':
: undefined reference to `__ctype_b'
/usr/local/oracle/product/9ir2/lib//libclntst9.a(lsxv.o)(.text+0xb45a): more
undefined references to `__ctype_b' follow
collect2: ld returned 1 exit status




Changes

Upgrading glibc from version 2.2 to version 2.3



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