Home » Developer & Programmer » Precompilers, OCI & OCCI » Debian: Pro*C doesn't work well with gcc 4.1 system?
icon9.gif  Debian: Pro*C doesn't work well with gcc 4.1 system? [message #222608] Mon, 05 March 2007 11:35 Go to next message
jmbatista
Messages: 2
Registered: March 2007
Location: Portugal
Junior Member
Hi people,

I'm a newbie, so please be patient... Wink

I've downloaded the Oracle 10g 10.0.2.0.1 tarball and installed it locally. Now I'm trying to compile some *.pc files in a downloaded source code, but it seems that proc is choking on some system header files, rather than the source code files I have...

Namely, here's the transcript of the error:
Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Mar 5 17:10:07 2007

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

System default option values taken from: /usr/local/oracle/u01/app/oracle/oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg

Syntax error at line 30, column 33, file /usr/include/linux/compiler.h:
Error at line 30, column 33 in file /usr/include/linux/compiler.h
#  define __builtin_warning(x, y...) (1)
................................1
PCC-S-02014, Encountered the symbol "..." when expecting one of the following:

   , )
The symbol ")" was substituted for "..." to continue.



Other error messages follow for other lines, but this one seems as a good place as any other to start with...


This is my system, I hope it's enough to help your kind guidance:
- Linux atlas06 2.6.20.1-slh-up-2 #1 Tue Feb 20 11:32:07 CET 2007 i686 GNU/Linux
- gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
- GNU ld version 2.17 Debian GNU/Linux
- ldd (GNU libc) 2.3.6
- ii linux-kernel-headers 2.6.18-7 Linux Kernel Headers for development


So, does this mean that Pro*C chokes on the system's header files that I have to downgrade? Where can I find Pro*C's specifications and requirements? Or is there another way to configure Pro*C so that it doesn't get confused with my system's header files?


Thank you in advance! Smile
jmbatista
Re: Debian: Pro*C doesn't work well with gcc 4.1 system? [message #223509 is a reply to message #222608] Fri, 09 March 2007 04:20 Go to previous messageGo to next message
jmbatista
Messages: 2
Registered: March 2007
Location: Portugal
Junior Member
To answer my own question:

This appears to be an issue with the Pro*C/C++ precompiler. This has solved the problem:

1) Copy the header file to another location (or make a backup of the original) and edit the corresponding line, removing the "...".

2) Edit the psgcfg.cfg configuration file to include the new location (in this case, the location of the linux/compiler.h file, so it's the folder where the "linux" folder with the new compiler.h is).

3) Run the compiler again.

I'm not sure if this the valid procedure, but at least the remaining of the Makefile in the software I was using can go forward.
Re: Debian: Pro*C doesn't work well with gcc 4.1 system? [message #293032 is a reply to message #223509] Thu, 10 January 2008 11:48 Go to previous message
JoseQ
Messages: 1
Registered: January 2008
Junior Member
Edit the file $ORACLE_HOME/precomp/admin/pscfg.cfg and add /usr/lib/gcc/i486-linux-gnu/4.1.2/include to the list for sys_include. You can remove the RedHat and Suse specific paths, if you like. It won't hurt anything if you leave them in.
Previous Topic: sql connection
Next Topic: SQLCODE diffs. between Informix and Oracle
Goto Forum:
  


Current Time: Sat Dec 14 17:30:30 CST 2024