Re: ESQL, 4GL and C/gcc on Solaris
Posted in 2005
Once more unto the breach, dear friends... On 7/27/05, Neil Truby <neil.truby@ardenta.com> wrote: > Thanks to Jonathan and thomas, past the initial errors. Now I get ..... > :-( > > gcc -static -xc -m64 -mcpu=v9 -DSPARCV9 -DINFORMIX_RDS \\ > -ltermlib \\ > -liffgisql \\ > -lifasf \\ > -lifgen \\ > -lifos \\ > -lifgls \\ > -lnsl \\ > -lsocket \\ > -laio \\ > -lm \\ > -ldl \\ > -lelf \\ > -lifglx \\ > -lm \\ > -I/opt/informix/10.0/incl/tools \\ > -I/opt/informix/10.0/incl/esql \\ > -Xlinker \\ > -L/opt/informix/10.0/lib \\ > -L/opt/informix/10.0/lib/esql \\ > /opt/informix/10.0/lib/esql/checkapi.o \\ # gcc complains here onwards / > all the Informix libs > -L/opt/informix/10.0/lib/tools \\ > /opt/informix/10.0/lib/tools/libfglgo.a \\ > /opt/informix/10.0/lib/tools/lib4gl.a \\ > /opt/informix/10.0/lib/tools/lib4io.a \\ > /opt/informix/10.0/lib/tools/libnmenu.a \\ > /opt/informix/10.0/lib/tools/lib4io.a \\ > /opt/informix/10.0/lib/tools/librdsterm.a \\ > /opt/informix/10.0/lib/tools/libfmain.a \\ > /opt/informix/10.0/lib/tools/libfe.a \\ > /opt/informix/10.0/lib/tools/libfmain.a \\ > fgiusr.c extras.o nfile.o ndates.o getakey.o read_ln.o scan_weeks.o > read_merged.o last_access.o \\ > -o /home/caps/tabs/bin/run4gl It seems odd listing a bunch of libraries before the object files. Whether that truly matters is open, but certainly, most frequently, you list the object files (especially the one containing the main program) before the libraries. There is one obvious reason for an exception here - the main program of the I4GL-RDS runner is *in* on of the libraries - possibly even libfmain.a, though I'd reserve judgement on that. I'd be tolerably confident that you need neither '-laio' nor '-lelf' in the link lines - they are inherited from CSDK, and I've previously reported (as a bug, via PTS, the Problem Tracking System) that these are unnecessary. What does the -xc option do? What does the -Xlinker option do? > #Then loads of errors on the Informix libraries. First 30 lines of the gcc > error output .... > > 1 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\127' in > program > 2 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\2' in > program > 3 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\2' in > program > 4 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\1' in > program > 5 /opt/informix/10.0/lib/esql/checkapi.o:1:8: warning: null > character(s) ignored > 6 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\1' in > program > 7 /opt/informix/10.0/lib/esql/checkapi.o:1:19: warning: null > character(s) ignored > 8 /opt/informix/10.0/lib/esql/checkapi.o:1: error: parse error before > '+' token > 9 /opt/informix/10.0/lib/esql/checkapi.o:1:21: warning: null > character(s) ignored > 10 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\1' in > program > 11 /opt/informix/10.0/lib/esql/checkapi.o:1:25: warning: null > character(s) ignored > 12 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\3' in > program > 13 /opt/informix/10.0/lib/esql/checkapi.o:1:49: warning: null > character(s) ignored > 14 /opt/informix/10.0/lib/esql/checkapi.o:1:55: warning: null > character(s) ignored > 15 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '@' in > program > 16 /opt/informix/10.0/lib/esql/checkapi.o:1:61: warning: null > character(s) ignored > 17 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '@' in > program > 18 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\1' in > program > 19 /opt/informix/10.0/lib/esql/checkapi.o:1:65: warning: null > character(s) ignored > 20 /opt/informix/10.0/lib/esql/checkapi.o:1:75: warning: null > character(s) ignored > 21 /opt/informix/10.0/lib/esql/checkapi.o:1:81: warning: null > character(s) ignored > 22 /opt/informix/10.0/lib/esql/checkapi.o:1:89: warning: null > character(s) ignored > 23 /opt/informix/10.0/lib/esql/checkapi.o:1:104: warning: null > character(s) ignored > 24 /opt/informix/10.0/lib/esql/checkapi.o:1:116: warning: null > character(s) ignored > 25 /opt/informix/10.0/lib/esql/checkapi.o:1:124: warning: null > character(s) ignored > 26 /opt/informix/10.0/lib/esql/checkapi.o:1:132: warning: null > character(s) ignored > 27 /opt/informix/10.0/lib/esql/checkapi.o:1:141: warning: null > character(s) ignored > 28 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\128' in > program > 29 /opt/informix/10.0/lib/esql/checkapi.o:1: error: stray '\\162' in > program It appears, for some reason, that the compiler is confused about the checkapi.o file - thinking it is some sort of source code rather than a pre-compiled object file. First off, run the 'file' command on checkapi.o, and on your object files (say extras.o); if it doesn't say they are the same file type, then there's a problem. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.01 -- http://dbi.perl.org/ sending to informix-list