Re: Error during Pro*C compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sven,

Thanks a lot of the piece of advice. That helped to solve our problem and
we were successfully able to compile the sample file provided by Oracle.

Now, while compiling our application related code, we are successfully able
to convert .pc to .c. While compiling .c file, we are getting the following
error:

Code.c: In function `ProcessSelectList':
Code.c:2240: warning: passing arg 2 of `sqlprc' from incompatible pointer
type
Code.c:2240: warning: passing arg 3 of `sqlprc' from incompatible pointer
type
Code.c: In function `WriteResultToTable':
Code.c:3806: error: break statement not within loop or switch
Code.c: In function `strtok2':
Code.c:4462: warning: comparison of distinct pointer types lacks a cast

When I saw my Pro*C code, I could not find an equivalent 'break' statement.
Attached below is the Pro*C section of the code where this error is
generated:

(See attached file: ProC.txt)

Attached below is the section of the C file that is generated.

(See attached file: ConvertedC.txt)

Could you please let us know any work around or rather a possible reason
for this error? Do we need to include any flag in this case also in order
to compile the C file successfully?


Warm Regards,
______________________________________________
Rachit Verma
External: +44 1455 89 5644
______________________________________________





                                                                                                                                        
                      Sven Eschenberg                                                                                                   
                      <eschenb@xxxxxxxxx                                                                                                
                      ankfurt.de>               To:       Rachit.Verma@xxxxxxxxxxxxx                                                    
                                                cc:       gcc-help@xxxxxxxxxxx                                                          
                      06/06/06 18:13            Subject:  Re: Error during Pro*C compilation                                            
                                                                                                                                        
                                                                                                                                        




Hi,

let's have a look at the output you posted:

gcc: unrecognized option `-q64'
gcc: unrecognized option `-qwarn64'
gcc: unrecognized option `-qinfo=uni'


Some Options are not recognized, obviously they have to do with 64-Bit
support, especially, ifg we consider:

ld: 0711-736 ERROR: Input file /lib/crt0_64.o:

        XCOFF64 object files are not allowed in 32-bit mode.

collect2: ld returned 8 exit status


A short google search gives us the following page:

http://www-128.ibm.com/developerworks/eserver/articles/gnu.html

You might want to check the page, but there is one thing, that jumps
quite at you:

To compile an application in 64 bit mode, one should use the option
|-maix64|, which enables the 64-bit AIX ABI such as: 64-bit pointers,
64-bit long type, and the infrastructure needed to support them.
Specifying |-maix64| implies |-mpowerpc64| and |-mpowerpc|, while
|-maix32| disables the 64-bit ABI and implies |-mno-powerpc64|. GCC
defaults to -maix32.

Which would let me conclude:

the 3 unrecognized options are intended for 64-bit mode on another (the
native) compiler or rather maybe linker and that maybe the -maix64
option is missing.

check the makefile, the native compiler's options and see if this helps
you ....

-Sven


Rachit.Verma@xxxxxxxxxxxx wrote:
> Hi,
>
> We are compiling the sample Pro*C programs provided by Oracle and are
using
> GCC 3.3.2. Our database is Oracle 10.2.0 and environment is on IBM AIX
5.3.
> We are successfully able to convert the .pc to .c file and then .c to .o,
> but while linking the .o file to generate executable, we are getting the
> following output/error:
>
>
> $ make -f demo_proc.mk build OBJS=sample1.o EXE=sample1
>
>         /bin/make -f
> /fsoracle/product/10.2.0/precomp/demo/proc/demo_proc.mk PROCFLAGS=""
> PCCSRC=sample1 I_SYM=include= pc1
>
>         proc  iname=sample1 include=.
> include=/fsoracle/product/10.2.0/precomp/public
> include=/fsoracle/product/10.2.0/rdbms/public
> include=/fsoracle/product/10.2.0/rdbms/demo
> include=/fsoracle/product/10.2.0/plsql/public
> include=/fsoracle/product/10.2.0/network/public
>
> Pro*C/C++: Release 10.2.0.2.0 - Production on Tue Jun 6 16:28:13 2006
>
> Copyright (c) 1982, 2005, Oracle.  All rights reserved.
>
> System default option values taken from:
> /fsoracle/product/10.2.0/precomp/admin/pcscfg.cfg
>
>         /usr/local/bin/gcc  -O3  -q64 -DSS_64BIT_SERVER -qwarn64
-qinfo=uni
> -DAIXRIOS -I. -I/fsoracle/product/10.2.0/precomp/public
> -I/fsoracle/product/10.2.0/rdbms/public
> -I/fsoracle/product/10.2.0/rdbms/demo
> -I/fsoracle/product/10.2.0/plsql/public
> -I/fsoracle/product/10.2.0/network/public     -c sample1.c
>
> gcc: unrecognized option `-q64'
> gcc: unrecognized option `-qwarn64'
> gcc: unrecognized option `-qinfo=uni'
>
> sample1.c: In function `main':
> sample1.c:241: warning: return type of `main' is not `int'
>
>         /usr/local/bin/gcc  -o sample1 sample1.o
> -L/fsoracle/product/10.2.0/lib/ -lclntsh  -lld -lm `cat
> /fsoracle/product/10.2.0/lib/sysliblist`  -lm  -lc_r -lpthreads
>
> ld: 0711-736 ERROR: Input file /lib/crt0_64.o:
>
>         XCOFF64 object files are not allowed in 32-bit mode.
>
> collect2: ld returned 8 exit status
>
> make: The error code from the last command is 1.
>
>
>
>
>
> Stop.
>
>
> Are we using the correct version of GCC? Is a 64 bit version of GCC
> available for use with IBM AIX 5.3? Could you please suggest the possible
> solution to this problem? Please let me know in case you require any more
> details.
>
>
> Warm Regards,
> ______________________________________________
> Rachit Verma
> External: 01455 89 5644
> ______________________________________________
>
>
>
>
>
>
>
>
> Unless expressly stated to the contrary, the views expressed in this
email
> are not necessarily the views of National Grid plc or any of its
> subsidiaries or affiliates (Group Companies), and the Group Companies,
> their directors, officers and employees make no representation and accept
> no liability for its accuracy or completeness.
>
> This e-mail, and any attachments are strictly confidential and intended
for
> the addressee(s) only. The content may also contain legal, professional
or
> other privileged information. If you are not the intended recipient,
please
> notify the sender immediately and then delete the e-mail and any
> attachments.  You should not disclose, copy or take any action in
reliance
> on this transmission.
>
> You may report the matter by calling us on 0800 085 4806.
>
> Please ensure you have adequate virus protection before you open or
detach
> any documents from this transmission.  The Group Companies do not accept
> any liability for viruses. An e-mail reply to this address may be subject
> to monitoring for operational reasons or lawful business practices.
>





Unless expressly stated to the contrary, the views expressed in this email
are not necessarily the views of National Grid plc or any of its
subsidiaries or affiliates (Group Companies), and the Group Companies,
their directors, officers and employees make no representation and accept
no liability for its accuracy or completeness. 

This e-mail, and any attachments are strictly confidential and intended for
the addressee(s) only. The content may also contain legal, professional or
other privileged information. If you are not the intended recipient, please
notify the sender immediately and then delete the e-mail and any
attachments.  You should not disclose, copy or take any action in reliance
on this transmission.

You may report the matter by calling us on 0800 085 4806.

Please ensure you have adequate virus protection before you open or detach
any documents from this transmission.  The Group Companies do not accept
any liability for viruses. An e-mail reply to this address may be subject
to monitoring for operational reasons or lawful business practices.

Attachment: ProC.txt
Description: Binary data

Attachment: ConvertedC.txt
Description: Binary data


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux