Re: GCC Compiler Problem!!!! Hi Jan,
Thanks for the response. Actually in sun machine GCC was installed and set the
DB2_SQLROUTINE_COMPILE_COMMAND in sr_cpath file also. But still the same problem.
Thanks,
Praveen
"Jan M. Nelken" <Unknown.User@Invalid.Domain> wrote in message news:<40054a38_2@news1.prserv.net>...
> Praveen wrote:
> > Hi All,
> >
> > We have installed DB2 UDB V8 on Sun SPARC 9. The GCC compiler also
> > installed on this system. So, when i try to create SQL procedure, it
> > says CC not found. So,
> > I set the following compiler options..
> >
> > 1. db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin
> >
> > 2. db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -xarch=v8plusa -mt
> > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o
> > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib
> > -R/export/home/db2inst1/sqllib/lib -ldb2"
> >
> > After setting this options, if i try to build the SQL procedure, it
> > gives me..
> > DB2INST1.PROC1 - Create stored procedure returns -7032.
> >
> > DB2INST1.PROC1:
> > -- LOG FILE P7535277.log FOR PROCEDURE DB2INST1.PROC1
> >
> > -- DB2_SQLROUTINE_PREPOPTS=
> >
> > -- PREP/BIND MESSAGES FOR
> > /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P7535277.sqc
> >
> > LINE MESSAGES FOR P7535277.sqc
> > ------ --------------------------------------------------------------------
> > SQL0060W The "C" precompiler is in progress.
> > SQL0091W Precompilation or binding was ended with "0"
> > errors and "0" warnings.
> >
> > -- DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin
> >
> > -- DB2_SQLROUTINE_COMPILE_COMMAND=cc -xarch=v8plusa -mt
> > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o
> > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib
> > -R/export/home/db2inst1/sqllib/lib -ldb2
> >
> > -- CONTENTS OF /usr/local/bin
> >
> > .9-g++^F\265\322$^Xsparc-sun-solaris2.9-gcc^F\265\322' unexpected
> >
> > -- END OF LOG FILE (SQLCODE: -7032)
> >
> > Please Can anyone tell me, Where i'm going wrong?
> >
> > Thanks in advance,
> > Praveen
>
> You did not check the DB2 documentation; read the fragment called
> "Setting Up the UNIX SQL Procedures Environment".
>
> -------------------------------------------------------------------------
> The first time you compile a stored procedure, DB2 will generate the
> executable script file $HOME/sqllib/function/routine/sr_cpath (which
> contains the default values for the compiler environment variables). If
> the default values are not appropriate for your compiler, do one of the
> following:
>
> * edit the sr_cpath script file.
> * set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable to
> contain the full path name of another executable script that specifies
> the desired settings.
>
> -------------------------------------------------------------------------
>
> Jan M. Nelken |