Re: esql core dumped !
Posted in 2003
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
>Hi Hobbes, Hi ! > I have been reading though the chain of mails. Just wanted to >clarify one more thing - you said that your include files are all #include >*.h (header files) right? That's right >They are not $include (header file). Am I right? That's right too >If this is the case, then ideally you should not be getting a core >dump when trying to compile your *.ec application. One thing you might >want to try to understand if this is an ESQL/C issue for sure is to do - >% esql -e <filename>. The -e option does a preprocess only, and no >compilation or linking. Since ESQL/C basically is just a preprocessor, >this will indicate if this is an ESQL/C issue. If ESQL/C still core dumps, >you can be sure that there is an ESQL/C problem. See the generated *.c >file is correct, or has some issues. Our compilation process is in 3 step. 1) Preprocessing with one of our proprietary preprocessor 2) Preprocessing the esql embedded with the appropriate tool (proc/c or oracle, esqlc for informix....) 3) Finally linking and compiling with a c compiler . This time gcc. So, the only thing i'm trying to do is preprocessing (so i use -e and -ansi options) That's why i thought of an esql/c issue. >A small repro, indicating of what exactly is happing in your repro,,, like >a psuedo code, would help. I could try some stuff at my end, and see if I >find anything suspicious. The code is pretty simple. ========================== #include <stdio.h> #include <time.h> #include <string.h> #include <stdlib.h> exec sql begin declare section; exec sql include "tab_one.h"; exec sql include "tab_two.h"; .... .... exec sql include "tab_250.h"; exec sql end declare section; extern void DEFAULT_tab_one(struct tab_one_ *_elt); ....and so on.... void TEST_DEF_tab_one(long _user, struct tab_one_ *_elt) { /* DEFAULT initialising */ (void) DEFAULT_tab_one(_elt); /* init from user */ switch(_user) { default: break; } } ... and so on .... ========================== A very repetitive source since it is auto-generated. The core happens in the exec sql include part. I know that include between declare section is not recommended. But: 1) i 've got declaration of string type in my .h so i do not have any other choice 2) Some version of esql/c are ok with that, and others are not... >Also make sure that you do not have $include statements but instead >#include. Having $include would mean that they would be preprocesed. Not >that it should throw an error either ways, but it would help eliminate >some options and narrow down your problem area. OK :) My first message is certainly not really clear.... since i do exec sql include. I need preprocessing for having access to variable in this part of code... The declaration of type string => do not let me any other choice :) >Third - Yes, there seems to be some problem with the product put up at the >"passport advantage" web site that you pointed in the mail below. The >problem has been reported to the concerned department, and we should have >a resolution on that sometime soon. OK :) thx for the test and for the "action" :) And thank you for the time you spend to give me ways to explore. Arnaud
Hi ! Thx again for the answer ... i do not have so much time to try it today... maybe tonight or tomorrow... But another things happens => i succeed compiling an executable.... I launch it and ... and .... i do a core at connect time ... I reproduce it with demo1.ec build it up => and core dump when executing >>>>>>>>>>>>>>>>>>>>>>>>>> serv8 - /home/informix/demo/esqlc> ./demo1.exe DEMO1 Sample ESQL Program running. Illegal instruction(coredump) <<<<<<<<<<<<<<<<<<<<<<<<<< Pretty amazing isn't it ? I will try to track down this strange thing :) But if somebody have already seen this .... i would be helpful to see exactly what happened... I use gdb to see that it's exactly on the "exec sql connect" command I try different syntax, source code.... If somebody have experienced this ! :) thx