dostats on AIX with gcc
Posted in 2006
Neil Truby couldn't build Art Kagel's dostats utility on AIX 5.3 with IDS 10.0FC5 using gcc: the Informix esql script passes xlc-specific flags (-q64, -qlanglvl=ansi, etc.) that gcc rejects, plus a link failure for a mysterious libmsaa. Advice given: buy/use xlc, or copy $INFORMIXDIR/bin/esql and strip the xlc-only options (an 'ESQLC for GCC/AIX' script exists at oninit.com), or simply preprocess with 'esql -e' and compile/link the generated .c with gcc using $(esql -libs) and the Informix lib paths. Neil sidestepped it by building dostats on Linux and running it remotely; libmsaa was never identified.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues, Versions, Editions & End-of-Life
AIX 5.3, gcc compiler, IDS 10.0 FC5.
Anyone come across this before in compiling dostats?:
$ export INFORMIXC=gcc
$ esql dostats.ec > dostats.ogcc: '-b' must come at the start of the command line
I mean, of all the uninformative drivel!
thx
--
Neil
IDS 10.0FC5 on AIX 5.3L, using gcc
has anyone succesfully got dostats to work on this combination? I seem to
be missing a mysetrious library, libmsaa, which is nowhere to be found on my
system.
Thanks
Neil
$ make dostats
INFORMIXC=gcc esql -DHAVE_GNU_GETOPT=1 -o dostats dostats.ec
getopt.cgcc: unrecognized option '-qchars=signed'
gcc: unrecognized option '-q64'
gcc: unrecognized option '-qlanglvl=ansi'
gcc: unrecognized option '-qalign=natural'
gcc: unrecognized option '-qcheck=nullptr'
gcc: unrecognized option '-qmaxmem=-1'
gcc: unrecognized option '-qspill=2000'
collect2: library libmsaa not found
make: 1254-004 The error code from the last command is 1.
Stop.
Neil Truby wrote:
> IDS 10.0FC5 on AIX 5.3L, using gcc
>
> has anyone succesfully got dostats to work on this combination? I seem to
> be missing a mysetrious library, libmsaa, which is nowhere to be found on my
> system.
>
> Thanks
> Neil
>
> $ make dostats
> INFORMIXC=gcc esql -DHAVE_GNU_GETOPT=1 -o dostats dostats.ec
> getopt.c> gcc: unrecognized option '-qchars=signed'
> gcc: unrecognized option '-q64'
> gcc: unrecognized option '-qlanglvl=ansi'
> gcc: unrecognized option '-qalign=natural'
> gcc: unrecognized option '-qcheck=nullptr'
> gcc: unrecognized option '-qmaxmem=-1'
> gcc: unrecognized option '-qspill=2000'
> collect2: library libmsaa not found
> make: 1254-004 The error code from the last command is 1.
These are all of the 64bit xlc options I mentioned in the prior post. Also
Neil seems to be missing some mathematics package that ESQL/C wants to use.
All in all it's easier to just use xlc. I find that if you include the -O2
and -qmaxmem=16384 options on the commandline performance is acceptable and
the executable is not overly large. (FYI: I don't trust xlc optimizer
levels beyond 2 - I've had the code fail in testing occassionally.)
Art S. Kagel
"Art S. Kagel" <kagel@bloomberg.net> wrote in message news:45590614.8080301@bloomberg.net... > Neil Truby wrote: >> IDS 10.0FC5 on AIX 5.3L, using gcc >> > > These are all of the 64bit xlc options I mentioned in the prior post. > Also Neil seems to be missing some mathematics package that ESQL/C wants > to use. > > All in all it's easier to just use xlc. You have to pay '700 per server for XL C though!
> >> IDS 10.0FC5 on AIX 5.3L, using gcc > >> > > > > These are all of the 64bit xlc options I mentioned in the > prior post. > > Also Neil seems to be missing some mathematics package that ESQL/C > > wants to use. > > > > All in all it's easier to just use xlc. > > You have to pay '700 per server for XL C though! Don't be so tight - spend the money. You'll waste more that sorting out the problem I take it you have 'fixed' the esqlc script to work correctly with gcc ? Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 Web: www.oninit.com GO FURTHER with DB2 GET THERE FASTER with Informix. Attend IDUG 2007 San Jose, North America May 6-10, 2007 Visit http://www.iiug.org/conf for more information.
"Paul Watson" <paul@oninit.com> wrote in message news:301801c70783$9053a6e0$0700a8c0@arnold... >> >> IDS 10.0FC5 on AIX 5.3L, using gcc >> >> >> > >> > These are all of the 64bit xlc options I mentioned in the >> prior post. >> > Also Neil seems to be missing some mathematics package that ESQL/C >> > wants to use. >> > >> > All in all it's easier to just use xlc. >> >> You have to pay '700 per server for XL C though! > > Don't be so tight - spend the money. You'll waste more that sorting out > the problem It's not my money, it's my customers! You and I know that '700 is a pittance with which to pay homage to dostats! But customers generally neither know nor care about update stats and won't understand the need. Especially as I should have thought of it months ago when the kit was first bought!
Neil Truby said: > Especially as I should have thought of it months ago when the kit was > first > bought! Ah. So we're sparing your blushes now, are we? -- Bye now, Obnoxio "... no bill is required as no value was provided." -- Christine Normile -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.
"Obnoxio The Clown" <obnoxio@serendipita.com> wrote in message news:mailman.259.1163496200.29126.informix-list@iiug.org... > > Neil Truby said: >> Especially as I should have thought of it months ago when the kit was >> first >> bought! > > Ah. So we're sparing your blushes now, are we? Either that or my money!
Neil Truby wrote: > "Paul Watson" <paul@oninit.com> wrote in message > news:301801c70783$9053a6e0$0700a8c0@arnold... >>>>> IDS 10.0FC5 on AIX 5.3L, using gcc >>>>> >>>> These are all of the 64bit xlc options I mentioned in the >>> prior post. >>>> Also Neil seems to be missing some mathematics package that ESQL/C >>>> wants to use. >>>> >>>> All in all it's easier to just use xlc. >>> You have to pay '700 per server for XL C though! >> Don't be so tight - spend the money. You'll waste more that sorting out >> the problem > > It's not my money, it's my customers! You and I know that '700 is a > pittance with which to pay homage to dostats! But customers generally > neither know nor care about update stats and won't understand the need. > Especially as I should have thought of it months ago when the kit was first > bought! Well, the first step is to take a copy of the esql script from $INFORMIXDIR/bin, and sanitize it so it works with GCC instead of xls. That means remove -qlanglevel=ansi or whatever other options GCC complains about. Then, when you've demonstrated you can compile and run simple ESQL/C programs using the hacked esql script, you can consider trying to compile dostats with it. If you need a simple ESQL/C program, look for esqlbasic.ec in the DBD::Informix source code. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
"Jonathan Leffler" <jleffler@earthlink.net> wrote in message news:FNy6h.6859$L6.3528@newsread3.news.pas.earthlink.net... > Neil Truby wrote: >> "Paul Watson" <paul@oninit.com> wrote in message >> news:301801c70783$9053a6e0$0700a8c0@arnold... >>>>>> IDS 10.0FC5 on AIX 5.3L, using gcc >>>>>> >>>>> These are all of the 64bit xlc options I mentioned in the >>>> prior post. >>>>> Also Neil seems to be missing some mathematics package that ESQL/C >>>>> wants to use. >>>>> >>>>> All in all it's easier to just use xlc. >>>> You have to pay '700 per server for XL C though! >>> Don't be so tight - spend the money. You'll waste more that sorting out >>> the problem >> >> It's not my money, it's my customers! You and I know that '700 is a >> pittance with which to pay homage to dostats! But customers generally >> neither know nor care about update stats and won't understand the need. >> Especially as I should have thought of it months ago when the kit was >> first bought! > > Well, the first step is to take a copy of the esql script from > $INFORMIXDIR/bin, and sanitize it so it works with GCC instead of xls. > > That means remove -qlanglevel=ansi or whatever other options GCC complains > about. > > Then, when you've demonstrated you can compile and run simple ESQL/C > programs using the hacked esql script, you can consider trying to compile > dostats with it. > > If you need a simple ESQL/C program, look for esqlbasic.ec in the > DBD::Informix source code. Thanks. I actually gave up and compiled dostats on a Linux server and ran it remotely from there. Never could find, even from Google, what libmsaa is.
"Neil Truby" <neil.truby@ardenta.com> wrote in message news:4s034vFsvihnU1@mid.individual.net... > "Jonathan Leffler" <jleffler@earthlink.net> wrote in message > news:FNy6h.6859$L6.3528@newsread3.news.pas.earthlink.net... >> Neil Truby wrote: >>> "Paul Watson" <paul@oninit.com> wrote in message >>> news:301801c70783$9053a6e0$0700a8c0@arnold... >>>>>>> IDS 10.0FC5 on AIX 5.3L, using gcc >>>>>>> >>>>>> These are all of the 64bit xlc options I mentioned in the >>>>> prior post. >>>>>> Also Neil seems to be missing some mathematics package that ESQL/C >>>>>> wants to use. >>>>>> >>>>>> All in all it's easier to just use xlc. >>>>> You have to pay '700 per server for XL C though! >>>> Don't be so tight - spend the money. You'll waste more that sorting >>>> out >>>> the problem >>> >>> It's not my money, it's my customers! You and I know that '700 is a >>> pittance with which to pay homage to dostats! But customers generally >>> neither know nor care about update stats and won't understand the need. >>> Especially as I should have thought of it months ago when the kit was >>> first bought! >> >> Well, the first step is to take a copy of the esql script from >> $INFORMIXDIR/bin, and sanitize it so it works with GCC instead of xls. >> >> That means remove -qlanglevel=ansi or whatever other options GCC >> complains about. >> >> Then, when you've demonstrated you can compile and run simple ESQL/C >> programs using the hacked esql script, you can consider trying to compile >> dostats with it. >> >> If you need a simple ESQL/C program, look for esqlbasic.ec in the >> DBD::Informix source code. > > Thanks. I actually gave up and compiled dostats on a Linux server and ran > it remotely from there. Never could find, even from Google, what libmsaa > is. Someday, if you find the time, you might want to take a look at the 'Scripts' area at www.oninit.com for an 'ESQLC for GCC/AIX' script. While your solution worked, if you are anything like me, I wouldn't be able to let it go at that. I do admit that I have been called stubborn - once or twice. :-) June
[cutting] > > Thanks. I actually gave up and compiled dostats on a Linux > server and > > ran it remotely from there. Never could find, even from > Google, what > > libmsaa is. > > Someday, if you find the time, you might want to take a look > at the 'Scripts' area at www.oninit.com for an 'ESQLC for > GCC/AIX' script. While your solution worked, if you are > anything like me, I wouldn't be able to let it go at that. I > do admit that I have been called stubborn - once or twice. > :-) While I'd love to take all the credit for the script, the basic script was JLs, and since then it's been tweaked by a few people Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 Web: www.oninit.com GO FURTHER with DB2 GET THERE FASTER with Informix. Attend IDUG 2007 San Jose, North America May 6-10, 2007 Visit http://www.iiug.org/conf for more information.
On Wed, 2006-11-15 at 06:51 +0000, Jonathan Leffler wrote: > Well, the first step is to take a copy of the esql script from > $INFORMIXDIR/bin, and sanitize it so it works with GCC instead of xls. Is there a reason I don't see why Neil couldn't simply preprocess-only the file with "esql -e" and then manually compile/link the resulting .c file with gcc? -Carsten
Carsten Haese wrote: > On Wed, 2006-11-15 at 06:51 +0000, Jonathan Leffler wrote: > >>Well, the first step is to take a copy of the esql script from >>$INFORMIXDIR/bin, and sanitize it so it works with GCC instead of xls. > > > Is there a reason I don't see why Neil couldn't simply preprocess-only > the file with "esql -e" and then manually compile/link the resulting .c > file with gcc? Oh, sure, propose a completely logical solution! Who asked you? ;-} Seriously though, it's not THAT simple. The steps would be (assuming ksh or bash): esql -e dostats.ec gcc -o dostats dostats.ec -L$INFORMIXDIR/lib/esql -L$INFORMIXDIR/lib $(esql -libs ) You need the esql/c library list to link. Art S. Kagel
Carsten Haese wrote: > On Wed, 2006-11-15 at 06:51 +0000, Jonathan Leffler wrote: > >>Well, the first step is to take a copy of the esql script from >>$INFORMIXDIR/bin, and sanitize it so it works with GCC instead of xls. > > > Is there a reason I don't see why Neil couldn't simply preprocess-only > the file with "esql -e" and then manually compile/link the resulting .c > file with gcc? Oh, sure, propose a completely logical solution! Who asked you? ;-} Seriously though, it's not THAT simple. The steps would be (assuming ksh or bash): esql -e dostats.ec gcc -o dostats dostats.ec -L$INFORMIXDIR/lib/esql -L$INFORMIXDIR/lib $(esql -libs ) You need the esql/c library list to link. Art S. Kagel
On Wed, 2006-11-15 at 09:30 -0500, Art S. Kagel wrote: > Carsten Haese wrote: > > On Wed, 2006-11-15 at 06:51 +0000, Jonathan Leffler wrote: > > > >>Well, the first step is to take a copy of the esql script from > >>$INFORMIXDIR/bin, and sanitize it so it works with GCC instead of xls. > > > > > > Is there a reason I don't see why Neil couldn't simply preprocess-only > > the file with "esql -e" and then manually compile/link the resulting .c > > file with gcc? > > Oh, sure, propose a completely logical solution! Who asked you? ;-} > > Seriously though, it's not THAT simple. The steps would be (assuming ksh or > bash): > > esql -e dostats.ec > gcc -o dostats dostats.ec -L$INFORMIXDIR/lib/esql -L$INFORMIXDIR/lib $(esql > -libs ) I know. I left the gory details of the gcc invocation as an exercise for the reader. ;-) -Carsten