Bug 43268 - Issue in connecting to Oracle 11g from GCC compiler
Summary: Issue in connecting to Oracle 11g from GCC compiler
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-05 14:11 UTC by surajul
Modified: 2010-03-05 15:48 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description surajul 2010-03-05 14:11:59 UTC
Hi GCC team, 

We have problem in PRO C binary files, we are not able to connected to database (Oracle 11g). 

We have build file to generate PRO C executable file. When we run the make file we are getting below error 

/usr/bin/gcc -xarch=v9* -o fanpf005 fanpf005.o -L/ora11G/app/oracle/product/11.1.0/db_1/lib/ -lclntsh `cat /ora11G/app/oracle/product/11.1.0/db_1/lib/ldflags`   `cat /ora11G/app/oracle/product/11.1.0/db_1/lib/sysliblist` -ldl -lm

gcc: language arch=v9* not recognized
gcc: language arch=v9* not recognized

Could please help us what param value to be set for –xarch to connect to Oracle 11g database. And below is GCC version

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux

Thread model: posix

gcc version 4.1.2 20080704 (Red Hat 4.1.2-44) 

Could you please help us on resolving the Issue as we are struck with for very long time. Appreciate your early response.

Thanks & best regards,
Rahiman
Comment 1 Richard Biener 2010-03-05 14:41:34 UTC
drop -xarch=v9* completely (it looks like something thinks you are on a sparc
machine).
Comment 2 surajul 2010-03-05 14:51:39 UTC
(In reply to comment #1)
> drop -xarch=v9* completely (it looks like something thinks you are on a sparc
> machine).


Thanks for quick response.
 I have tried then I was not able to compile I am getting when running the make file.

I am running on linux 

Linux catom-gmapdvl06 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

Comment 3 surajul 2010-03-05 15:00:13 UTC
I removed the xarch as suggested still I have same issue not able to connect to DB.
Comment 4 Eric Botcazou 2010-03-05 15:03:12 UTC
-xarch is an option specific to the Sun Studio compiler, it cannot be used for GCC, you need to adjust your Makefile.
Comment 5 surajul 2010-03-05 15:35:37 UTC
Hi,

I have removed -xarch and executed the make file. I am still not able to connect database from PRO C files. I have seen the connectivity from the machine, I am able to connect to database, from PRO C its not able to connect to database.

/usr/bin/gcc -o  fanpf015 fanpf015.o -L/ora11G/app/oracle/product/11.1.0/db_1/lib/ -lclntsh `cat /ora11G/app/oracle/product/11.1.0/db_1/lib/ldflags`   `cat /ora11G/app/oracle/product/11.1.0/db_1/lib/sysliblist` -ldl -lm

I the above way the make file calls gcc with parameters

thanks Rahiman
Comment 6 Jonathan Wakely 2010-03-05 15:39:32 UTC
This is not a GCC bug, you need to port your makefile from solaris to Linux and you need to understand what you're doing, but that's your problem not GCC's.  Please stop opening this bug.

Comment 7 surajul 2010-03-05 15:46:08 UTC
(In reply to comment #6)
> This is not a GCC bug, you need to port your makefile from solaris to Linux and
> you need to understand what you're doing, but that's your problem not GCC's. 
> Please stop opening this bug.

Hi,

I am able to run Make file successfully, still the binary components are not able to connect to database, I feel in GCC do I need to pass anyother parameter which is different from Solaris to Linux. Please help me out.
Thanks
Comment 8 Jonathan Wakely 2010-03-05 15:48:07 UTC
You have not found a bug in GCC and this is not a forum for help connecting to databases.

Hint:  you cannot "connect to oracle from gcc compiler" ... it's a compiler.  You really need to understand what you're trying to achieve, or go to whoever assigned you the project and ask them to give it to someone who can do the job.

Please stop re-opening this bug.