Home » Developer & Programmer » Precompilers, OCI & OCCI » Unable to connect to oracle when compiling the demo proc program with 32bit (10.2.0.3 Sun Solaris x86-64)
Unable to connect to oracle when compiling the demo proc program with 32bit [message #410149] Thu, 25 June 2009 08:18 Go to next message
Orna
Messages: 62
Registered: November 2008
Member
Hi

I have a 10.2.0.3 server installation on Solaris x86-64.
I am trying to compile the sample1 proc demo program with the 32 bit make file :
compilation is successfull, however - I am unable to connect to Oracle ( TNS error )
my TWO_TASK is set correctly.

rstnyc01:>make -f demo_proc32.mk sample1
/usr/ccs/bin/make -f /export/home/oracle/product/10.2_s/precomp/demo/proc/demo_proc32.mk OBJS=sample1.o EXE=sample1 build
/usr/ccs/bin/make -f /export/home/oracle/product/10.2_s/precomp/demo/proc/demo_proc32.mk PROCFLAGS="" PCCSRC=sample1 I_SYM=include= pc1
proc iname=sample1 include=. include=/export/home/oracle/product/10.2_s/precomp/public32 include=/export/home/oracle/product/10.2_s/precomp/public include=/export/home/oracle/product/10.2_s/rdbms/public include=/export/home/oracle/product/10.2_s/rdbms/demo include=/export/home/oracle/product/10.2_s/plsql/public include=/export/home/oracle/product/10.2_s/network/public

Pro*C/C++: Release 10.2.0.1.0 - Production on Thu Jun 25 13:04:43 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

System default option values taken from: /export/home/oracle/product/10.2_s/precomp/admin/pcscfg.cfg

cc -xO3 -Kpic -DPRECOMP -I. -I/export/home/oracle/product/10.2_s/precomp/public32 -I/export/home/oracle/product/10.2_s/precomp/public -I/export/home/oracle/product/10.2_s/rdbms/public -I/export/home/oracle/product/10.2_s/rdbms/demo -I/export/home/oracle/product/10.2_s/plsql/public -I/export/home/oracle/product/10.2_s/network/public -DSVR4 -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -D_REENTRANT -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -DSOLARISAMD64 -DSOL_X86 -DSVR4 -Di386 -DSOLARISX86 -c sample1.c
"sample1.c", line 117: warning: no explicit type given
"sample1.c", line 119: warning: no explicit type given
"sample1.c", line 121: warning: no explicit type given
"sample1.c", line 122: warning: no explicit type given
"sample1.c", line 123: warning: no explicit type given
cc -o sample1 sample1.o -L/export/home/oracle/product/10.2_s/lib32/ -lclntsh `cat /export/home/oracle/product/10.2_s/lib32/ldflags` `cat /export/home/oracle/product/10.2_s/lib32/sysliblist` -R/export/home/oracle/product/10.2_s/lib32 -laio -lposix4 -lm -lthread
rstnyc01:>./sample1

ORACLE error--

ORA-12154: TNS:could not resolve the connect identifier specified


However - when I am doing the exact same thing with the 64 bit make file, I am able to connect with no issues :

rstnyc01:>make -f demo_proc64.mk sample1
/usr/ccs/bin/make -f /export/home/oracle/product/10.2_s/precomp/demo/proc/demo_proc64.mk OBJS=sample1.o EXE=sample1 build
/usr/ccs/bin/make -f /export/home/oracle/product/10.2_s/precomp/demo/proc/demo_proc64.mk PROCFLAGS="" PCCSRC=sample1 I_SYM=include= pc1
proc iname=sample1 include=. include=/export/home/oracle/product/10.2_s/precomp/public include=/export/home/oracle/product/10.2_s/rdbms/public include=/export/home/oracle/product/10.2_s/rdbms/demo include=/export/home/oracle/product/10.2_s/plsql/public include=/export/home/oracle/product/10.2_s/network/public

Pro*C/C++: Release 10.2.0.1.0 - Production on Thu Jun 25 13:06:15 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

System default option values taken from: /export/home/oracle/product/10.2_s/precomp/admin/pcscfg.cfg

cc -xO3 -xarch=amd64 -xchip=opteron -Xa -xstrconst -xF -W2,-AKNR_S -W2,-Rglobal_hoist -W2,-Rloop -errtags=yes -v -Kpic -DPRECOMP -I. -I/export/home/oracle/product/10.2_s/precomp/public -I/export/home/oracle/product/10.2_s/rdbms/public -I/export/home/oracle/product/10.2_s/rdbms/demo -I/export/home/oracle/product/10.2_s/plsql/public -I/export/home/oracle/product/10.2_s/network/public -DSVR4 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -D_REENTRANT -DSOLARISAMD64 -DSS_64BIT_SERVER -DSOL_X86 -DSVR4 -Di386 -DSOLARISX86 -xarch=amd64 -c sample1.c
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
"sample1.c", line 117: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample1.c", line 119: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample1.c", line 121: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample1.c", line 122: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
"sample1.c", line 123: warning: no explicit type given (E_NO_EXPLICIT_TYPE_GIVEN)
cc -xarch=amd64 -xchip=opteron -o sample1 sample1.o -L/export/home/oracle/product/10.2_s/lib/ -lclntsh `cat /export/home/oracle/product/10.2_s/lib/ldflags` `cat /export/home/oracle/product/10.2_s/lib/sysliblist` -R/export/home/oracle/product/10.2_s/lib -laio -lposix4 -lm -lthread
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
rstnyc01:>./sample1

Connected to ORACLE as user: SCOTT

Enter employee number (0 to quit): 0


Any ideas?
thanks
Orna
Re: Unable to connect to oracle when compiling the demo proc program with 32bit [message #410197 is a reply to message #410149] Thu, 25 June 2009 11:25 Go to previous message
Orna
Messages: 62
Registered: November 2008
Member
Hi

Found the problem - bug in 10.2.0.3 ( bug # 5389730 )
I applied the patch and the problem was solved

Orna

[Updated on: Thu, 25 June 2009 11:28]

Report message to a moderator

Previous Topic: Oracle XML API for C (merged)
Next Topic: getColumnListMetaData problem
Goto Forum:
  


Current Time: Thu Mar 28 07:07:35 CDT 2024