RE: cfgldb error on Linux
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues
shouldn't the line "map",map,0, show one parameter passed. i.e. "map",map,1, ???? also I've no idea if this is relevant but I have had core dumps on AIX whilst doing creating a customised runner/debugger. My solution was as follows: I copied the cfgldb/cfglgo script from $INFORMIXDIR/bin and modified the line that sets the LIBES1 variable to include some libraries that where showing up as errors whilst linking. LIBES1="$LIBDB4GL $LIBDBGO $LIB4GL $LIBDB4IO $LIBNMENU $LIBRDS $LIBFE $LIBSQL /usr/lib/libtli.a /usr/lib/libcurses.a /usr/lib/libc.a" I initially had libtli.a, libcurses.a and libc.a at the beginning of the line which was causing a core dump. When I put it at the end I ended up with a perfectly working debugger. Rekaish -----Original Message----- From: Cecilio Albero [mailto:eos@ctv.es] Sent: Wednesday, October 13, 1999 9:05 AM To: informix-list@iiug.org Subject: RE: cfgldb error on Linux I have tested this stupid fgiusr.c, with the same results: #include "fgicfunc.h" int map() { int k; popint(&k); retint( k*8); return 1; } cfunc_t usrcfuncs[] = { "map",map,0, 0, 0, 0 }; Art S. Kagel <kagel@bloomberg.net> escribi' en el mensaje de noticias 38020E88.DE3309FB@bloomberg.net... > Post your fgiuser.c in case the problem is there. > > Art S. Kagel > > Cecilio Albero wrote: > > > > I have fgldb 7.20UD7 under RedHat 6.0, and I'm trying to generate a new > > fgldb (myfgldb) with my own C functions. > > (I know about libc 2.2 problem, because cfglgo has worked using gcc20 > > compiler !! ) > > > > If I use a fgiusr.c with no added functions, myfgldb works !! > > But If I add some function to fgiusr.c, I get an Segmentation fault running > > myfgldb. > > > > Doing an "gdb myfgldb core", the output of bt command is: > > #0 0x806adf9 in _addstr () > > #1 0x806adba in addgstr () > > #2 0x806a315 in addfunc () > > #3 0x806a363 in addcf () > > #4 0x806a415 in addcfuncs () > > #5 0x806e6dd in loadone () > > #6 0x806e5c6 in loadfile () > > #7 0x806ed9b in loadprog () > > #8 0x8059c9a in initload () > > #9 0x804f041 in main () > > > > Some idea? > > Thanks in advance
Rekaish Bhardwaj <RekaishB@compans.com> escribi' en el mensaje de noticias
7u1nsi$862$1@news.xmission.com...
>
> shouldn't the line
> "map",map,0,
> show one parameter passed.
> i.e.
> "map",map,1, ????
********yes, it was a mistake, but, this is not the problem.
>
> also I've no idea if this is relevant but I have had core dumps on AIX
> whilst doing creating a customised runner/debugger.
> My solution was as follows:
>
> I copied the cfgldb/cfglgo script from $INFORMIXDIR/bin and modified the
> line that sets the LIBES1 variable to include
> some libraries that where showing up as errors whilst linking.
>
> LIBES1="$LIBDB4GL $LIBDBGO $LIB4GL $LIBDB4IO $LIBNMENU $LIBRDS $LIBFE
> $LIBSQL /usr/lib/libtli.a /usr/lib/libcurses.a /usr/lib/libc.a"
>
> I initially had libtli.a, libcurses.a and libc.a at the beginning of the
> line which was causing a core dump.
> When I put it at the end I ended up with a perfectly working debugger.
>
******* I haven't these libraries on my cfgldb !!. My cfgldb is as follows:
CC=${CC:-i386-glibc20-linux-gcc}
INFORMIXC=${INFORMIXC:-${CC}}
INFDIR=${INFORMIXDIR:=/usr/informix}
INFLIB=$INFDIR/lib/tools
INFINC1=$INFDIR/incl/esql
INFINC2=$INFDIR/incl/tools
ESQLC=$INFDIR/lib/esql/esqlc
FGESQLC=$INFLIB/i4glc3
LIBDBGO=$INFLIB/libdbgo.a
LIBDB4GL=$INFLIB/libfgldb.a
LIB4GL=$INFLIB/lib4gl.a
LIBDB4IO=$INFLIB/libdb4io.a
LIBNMENU=$INFLIB/libnmenu.a
LIBRDS=$INFLIB/librdsterm.a
LIBFE=$INFLIB/libfe.a
LIBSQL=$INFLIB/libfesql.a
LIBASF=$INFLIB/libasf.a
LIBGEN=$INFLIB/libgen.a
LIBOS=$INFLIB/libos.a
#ifdef ASIAN
LIBGLS="$INFDIR/lib/tools/libgls.a $INFDIR/lib/tools/libglx.a"
#endif /* ASIAN */
LIBASFN=${INFDIR}/lib/tools/libasf.a
SYSLIB="-lm"
SYSNLIB=" -lcrypt"
TLILIB=
# define network libraries
NETTLISTUB="$INFLIB/nettlistub.a "
nettli="FALSE"
# check to see if the TLI library exists.
if [ "$TLILIB" != "" -a -f "$TLILIB" ]
then
#file exists
nettli="TRUE"
fi
# build network library
# for the system that does not provided TLI library, we have to use
nettlistub.a
if [ $nettli = "FALSE" ]
then
SYSNLIB=`echo $SYSNLIB | sed -e s:-lstr:: -e
s:-lnsl_s:"$NETTLISTUB": -e s:-lnsl:"$NETTLISTUB":`
fi
LIBES1="$LIBDB4GL $LIBDBGO $LIB4GL $LIBDB4IO $LIBNMENU $LIBRDS $LIBFE
$LIBSQL"
LIBES2="$LIBASF $LIBGEN $LIBOS $LIBASFN $LIBOS $LIBGEN"
LIBES3="$SYSLIB $SYSNLIB"
#ifdef ASIAN
LIBES="$LIBES1 $LIBES2 $LIBES3 $LIBGLS"
#else
#
# LIBES="$LIBES1 $LIBES2 $LIBES3"
#
#endif /* ASIAN */
ECHO=
A=""
for F
do
case $F in
-n )
ECHO="echo $A"
;;
*.ec )
if test -f $ESQLC
then
$ECHO $ESQLC $F
A="$A `basename $F .ec`.c"
elif test -f $FGESQLC
then
$ECHO $FGESQLC $F
A="$A `basename $F .ec`.c"
else
echo "No ESQL/C preprocessor is found."
echo ".ec files require I4GL (compiled) or ESQL/C."
exit 1
fi
;;
* )
A="$A $F"
;;
esac
done
$ECHO exec ${INFORMIXC} -I$INFINC2 -I$INFINC1 $A $LIBES