If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Problems in installing Gcc compilers for db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-27-03, 21:07
manga manga is offline
Registered User
 
Join Date: Oct 2003
Posts: 18
Problems in installing Gcc compilers for db2

I downloaded Gcc compiler and set the path and db2path...when i tested with one stored procedure, I got the result as

************************************************** *********

-- LOG FILE P6592513.log FOR PROCEDURE DB2ADMIN.TESTPROCEDURE

-- DB2_SQLROUTINE_PREPOPTS=

-- PREP/BIND MESSAGES FOR E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp\P6592513.sqc

LINE MESSAGES FOR P6592513.sqc
------ --------------------------------------------------------------------
SQL0060W The "C" precompiler is in progress.
SQL0091W Precompilation or binding was ended with "0"
errors and "0" warnings.

-- DB2_SQLROUTINE_COMPILE_COMMAND=D:\cygwin\bin\db2gc c.bat SQLROUTINE_FILENAME

-- CONTENTS OF E:\PROGRA~1\IBM\SQLLIB\function\routine\sr_cpath.b at

-- CONTENTS OF E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp\P6592513.BAT

@echo on
set SQLROUTINE_FILENAME=P6592513
set db2path=E:\PROGRA~1\IBM\SQLLIB

-- COMPILATION COMMAND:

D:\cygwin\bin\db2gcc.bat P6592513

-- CONTENTS OF E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp\P6592513.def

LIBRARY P6592513
EXPORTS _pgsjmp@8
pgsjmp=_pgsjmp@8

-- COMPILATION MESSAGES FOR E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp\P6592513.c
-- C COMPILATION ERROR CODES: 0 0 1

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>set SQLROUTINE_FILENAME=P6592513

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>set db2path=E:\PROGRA~1\IBM\SQLLIB

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>D:\cygwin\bin\db2gcc.bat P6592513

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>setlocal

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>REM Set the DB2PATH variable to your DB2 base path, e.g., c:\ibm\sqllib

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>REM Set CYGWIN to your top-level CYGWIN directory.

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>set DB2PATH=E:\Program Files\IBM\SQLLIB

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>set CYGWIN=D:\cygwin

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>gcc -c -g -mno-cygwin -IE:\Program Files\IBM\SQLLIB\include -ID:\cygwin\usr\include P6592513.c -o P6592513.o

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>sed -e s/\_// P6592513.def 1>P6592513_m.def

E:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\SA MPLE\DB2ADMIN\tmp>dllwrap -mno-cygwin -target i386-mingw32 -o P6592513.dll P6592513.o E:\Program Files\IBM\SQLLIB\lib\db2api.lib --def P6592513_m.def
'gcc' is not recognized as an internal or external command,
operable program or batch file.
'dllwrap' is not recognized as an internal or external command,
operable program or batch file.

-- END OF LOG FILE (SQLCODE: -7032)

*******************************

Didn't know what is the problem..can anyone help?

-manga
Reply With Quote
  #2 (permalink)  
Old 10-27-03, 21:18
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Sorry if this is repetitive, but did you check out this article?
http://www7b.software.ibm.com/dmdd/l...306haungs.html
Reply With Quote
  #3 (permalink)  
Old 10-27-03, 21:59
chuzhoi chuzhoi is offline
Registered User
 
Join Date: Dec 2002
Posts: 134
Re: Problems in installing Gcc compilers for db2

It seems like gcc is not in a PATH. Could you modify you global path (or local in db2gcc.bat) to include c:\cygwin\bin (or whatever is appropriate)

regards,
dmitri
Reply With Quote
  #4 (permalink)  
Old 10-28-03, 14:35
manga manga is offline
Registered User
 
Join Date: Oct 2003
Posts: 18
Gcc Installation problem

I set my path to D:\cygwin\bin globally and db2 path to ..prog files\ibm\sqllib. also I included that in db2gcc.bat which is in d:\cygwin\examples....when i entered ,
db2 -td! -v -fsample.clp
I am getting this error.
I followed as it said in the URl mentioned by Marcus.
Looking forward for ur help in solving this!

-manga
Reply With Quote
  #5 (permalink)  
Old 10-28-03, 20:13
manga manga is offline
Registered User
 
Join Date: Oct 2003
Posts: 18
Problem solved!

Thanks for all ur help...

I played around with files and suddenly it worked.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On