c4gl with gcc problem
Posted in 2000
A user compiling I4GL 4.20 programs with c4gl and gcc 2.95.1 on AIX 4.2.1 got clean compiles but core dumps at runtime on INPUT BY NAME / DISPLAY BY NAME, although the same code worked with I4GL 4.15 and the AIX C compiler. Jonathan Leffler identified the standard gcc/I4GL gotcha: the library writes into string constants, so gcc must be invoked with -fwriteable-strings. Another poster showed a build script setting C4GLFLAGS=-fwriteable-strings and INFORMIXC=gcc. Others suggested gdb debugging; the thread then drifted into banter about Informix fixing the underlying code.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Hi, I'm trying to use gcc 2.95.1 with AIX 4.2.1 to compile my *.4gl programs with c4gl. I'm using i4gl 4.20.. The program compiled fine, but when I tried to run crash and generated a core dumped when executed the "input by name or display by name" informix declaration. The forms load well.. My programs compiled and ran well with informix 4.15 and AIX C compiler. Anybody have comments? Thank you for your help.
Jesus Ruiz wrote: > I'm trying to use gcc 2.95.1 with AIX 4.2.1 to compile my *.4gl programs > with c4gl. I'm using i4gl 4.20.. The program compiled fine, but when I > tried to run crash and generated a core dumped when executed the "input > by name or display by name" informix declaration. The forms load well.. > My programs compiled and ran well with informix 4.15 and AIX C > compiler. Anybody have comments? Thank you for your help. Did you include -fwriteable-strings (or -fwritable-strings, whichever is accepted) in the command line? If not, do so. Standard (but annoying) rule for GCC with I4GL. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Jesus Ruiz wrote: > Hi, > > I'm trying to use gcc 2.95.1 with AIX 4.2.1 to compile my *.4gl programs > with c4gl. I'm using i4gl 4.20.. The program compiled fine, but when I > tried to run crash and generated a core dumped when executed the "input > by name or display by name" informix declaration. The forms load well.. > My programs compiled and ran well with informix 4.15 and AIX C > compiler. Anybody have comments? Thank you for your help. If you can compile your programs in a DEBUG mode, then you can use "gdb" to see where your program is crashing. Normally programs crash (core dump) because the program is over-writing some memory area dedicated to other data. It often happens because you have not initialized some variables. With gdb you should be able to identify the cause of the core dumps and remedy it. The fact that your programs compiled and run fine on another version of Informix 4gl is due to reallocation of fresh memory to the program variables with out freeing the old, in the earlier versions of 4GL, hence there was no memory over-writes, the draw back, the size of the process would grow and grow until overtaking all the resources, including the swap, and you had to re-boot. -- Compliments of QueriX -------------------------------------------------------------------------------------------------- QueriX 4GL Compilers are Informix 4GL Compatible, and Connection to other RDBMS such as Oracle. Hydra 4GL Compiler (Compatible with I4GL) Compile once, run everywhere Phoenix Windows GUI. (Front End to 4GL) Chimera Java GUI The only GUI you will ever need... (Front End to 4GL) Arachne Web Technology (Front End to 4GL on the Web) For more details visit: http://www.querix.com/ ---------------------------------------------------------------------------------------------------
Jonathan Leffler <jleffler@earthlink.net> writes: > Did you include -fwriteable-strings (or -fwritable-strings, > whichever is accepted) in the command line? If not, do so. > Standard (but annoying) rule for GCC with I4GL. Why doesn't Informix just quit writing into string constants and be done with it? -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412 Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142 President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B
Because I'm not in charge of the coding. If I were, it would have been fixed several years ago. Ronald Cole wrote: > Jonathan Leffler <jleffler@earthlink.net> writes: > > Did you include -fwriteable-strings (or -fwritable-strings, > > whichever is accepted) in the command line? If not, do so. > > Standard (but annoying) rule for GCC with I4GL. > > Why doesn't Informix just quit writing into string constants and > be done with it? -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Jonathan Leffler wrote: > Because I'm not in charge of the coding. If I were, it would have been > fixed > several years ago. > > Take charge and teach the guys a lessen. ;-) -- Compliments of QueriX -------------------------------------------------------------------------------------------------- QueriX 4GL Compilers are Informix 4GL Compatible, and Connection to other RDBMS such as Oracle. Hydra 4GL Compiler (Compatible with I4GL) Compile once, run everywhere Phoenix Windows GUI. (Front End to 4GL) Chimera Java GUI The only GUI you will ever need... (Front End to 4GL) Arachne Web Technology (Front End to 4GL on the Web) For more details visit: http://www.querix.com/ ---------------------------------------------------------------------------------------------------
QueriX 4GL / Mehdi wrote: > Jonathan Leffler wrote: > > > Because I'm not in charge of the coding. If I were, it would have been > > fixed > > several years ago. > > > > > > Take charge and teach the guys a lessen. ;-) Or even a lesson! Though I suppose less IS more! Art S. Kagel
"Art S. Kagel" wrote: > QueriX 4GL / Mehdi wrote: > > > Jonathan Leffler wrote: > > > > > Because I'm not in charge of the coding. If I were, it would have been > > > fixed > > > several years ago. > > > > > > > > > > Take charge and teach the guys a lessen. ;-) > > Or even a lesson! Though I suppose less IS more! > > Art S. Kagel You see Art people are thought a "lessen" rather than a "lesson", they would for evevr come of their mighty know it all places and "listen". get it? -- Compliments of QueriX -------------------------------------------------------------------------------------------------- QueriX 4GL Compilers are Informix 4GL Compatible, and Connection to other RDBMS such as Oracle. Hydra 4GL Compiler (Compatible with I4GL) Compile once, run everywhere Phoenix Windows GUI. (Front End to 4GL) Chimera Java GUI The only GUI you will ever need... (Front End to 4GL) Arachne Web Technology (Front End to 4GL on the Web) For more details visit: http://www.querix.com/ ---------------------------------------------------------------------------------------------------
Hi,
For comiling in RDS a have this script: "makego"
export C4GLFLAGS=-fwriteable-strings
export INFORMIXC=gcccp $INFORMIXDIR/bin/cfglgo .
cfglgo fgiusr.c unixfile.c
mv a.out fglgo_dos
In article <38832A9E.50D6C705@earthlink.net>,
Jonathan Leffler <jleffler@earthlink.net> wrote:
>
>
> Jesus Ruiz wrote:
>
> > I'm trying to use gcc 2.95.1 with AIX 4.2.1 to compile my *.4gl
programs
> > with c4gl. I'm using i4gl 4.20.. The program compiled fine, but
when I
> > tried to run crash and generated a core dumped when executed
the "input
> > by name or display by name" informix declaration. The forms load
well..
> > My programs compiled and ran well with informix 4.15 and AIX C
> > compiler. Anybody have comments? Thank you for your help.
>
> Did you include -fwriteable-strings (or -fwritable-strings, whichever
is
> accepted) in
> the command line? If not, do so. Standard (but annoying) rule for
GCC with
> I4GL.
>
> --
> Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
> Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
> #include <disclaimer.h>
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.