1824971 Members
3623 Online
109678 Solutions
New Discussion юеВ

Problems compiling Pro*C

 
Kams_1
New Member

Problems compiling Pro*C

I have a strange problem in compiling pro*C programs under HP unix.

Actually we are trying to migrate pro*C programs from Digital UNIX V4.0D to Hp-Unix.

I am using the pro*C compiler for HP-Unix. When I tried to compile the proc program, it gives me the following error,


/usr/ccs/bin/make -f demo_proc.mk OBJS=updon.o EXE=updon build LIBHOME="/prod/applc/oracle817/lib/" PRODLIBHOME="/prod/applc
/oracle817/precomp/lib/" CFLAGS=" -I. -I/prod/applc/oracle817/precomp/public -I/prod/applc/oracle817/rdbms/public -I/prod/applc/
oracle817/rdbms/demo -I/prod/applc/oracle817/plsql/public -I/prod/applc/oracle817/network/public " LFLAGS=
proc iname=updon

Pro*C/C++: Release 8.1.7.2.0 - Production on Mon Mar 22 11:06:02 2004

(c) Copyright 2000 Oracle Corporation. All rights reserved.

System default option values taken from: /prod/applc/oracle817/precomp/admin/pcscfg.cfg

cc -Aa +DD64 -I. -I/prod/applc/oracle817/precomp/public -I/prod/applc/oracle817/rdbms/public -I/prod/applc/oracle817/rdbms/d
emo -I/prod/applc/oracle817/plsql/public -I/prod/applc/oracle817/network/public -c updon.c
cc -Aa +DD64 -o updon updon.o fwslib.o -L/prod/applc/oracle817/lib/ -lclntsh `cat /prod/applc/oracle817/lib/sysliblist`
-lm -lpthread -lpthread -call_shared -lsnatprm -lc_r
cc: warning 422: Unknown option "a" ignored.


I am getting this problem while linking. Am not sure whether it is a problem with the proc compiler or do i need to change something..?

I have been fighting with this problem for quite some time and itz really driving me nuts...
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Problems compiling Pro*C

A few recommendations:

1) Make sure HP-UX is fully patches, especially cc and such. It would appear your compiler is feeding cc a bad option. Patching may help.

2) Carefully consider applying oracle patches, this could be a bug in their products.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kams_1
New Member

Re: Problems compiling Pro*C

Thankx...

But, would there be any specific reasons behind that..? I got the answer from the unix admin, that all the patches were applied to the anci-c. And there were some other applications that run fine in the same server.

Ken_109
Advisor

Re: Problems compiling Pro*C

Try compiling installed samples in: $ORACLE_HOME/precomp/demo/proc make -f demo_proc.mk sample1If this works, then the problem is in your make file, or compiler !!! Also, note that in 817 I believe defaults to 32 bit... with 64 bit libs installed. And linking will require you to attach and link using SHLIB_PATH=$ORACLE_HOME/lib64... You'll probably need to run chatr +s to enable the binary to search the SHLIB_PATH...My $ORACLE_HOME/precomp/admin/pcscfg.cfg contains the following:sys_include=(/usr/include,/usr/local/include)include=($ORACLE_HOME/precomp/public)include=($ORACLE_HOME/precomp/public)include=$ORACLE_HOME/rdbms/publicinclude=$ORACLE_HOME/rdbms/demoinclude=$ORACLE_HOME/network/publicinclude=$ORACLE_HOME/plsql/publicltype=short
susan gregory_1
Valued Contributor

Re: Problems compiling Pro*C

Have you checked to make sure that you have the purchased compiler C/Ansi C?
If you do "ll /usr/bin/cc" does that point to /opt/ansic/bin/cc?
Kams_1
New Member

Re: Problems compiling Pro*C

Thanks for all your effort! I got the problem solved for the time being. There were some problems (some sections were missing in the make file). Now, I could compile my pro*c files using my compiler.
Seema Ahuja
New Member

Re: Problems compiling Pro*C

Could you please specify what was missing from makefile.
I am doing same and getting linking eroors too.
::: Linking...
/usr/ccs/bin/ld: cdw420g0.o: Not a valid object file (invalid system id)
*** Error exit code 1


Your experience might be helpful for me to debug the problem.

thanks
ranganath ramachandra
Esteemed Contributor

Re: Problems compiling Pro*C

seema,

can you run 'file cdw420g0.o' and post the output ?

if you have a question it is better to post it separately, it may not get attention if it is posted as a reply to someone else's question.

regards
ranga
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo