dostats and AIX
Posted in 2010
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Hi there, We will upgrade from version 10.00 to 11.50 within next days and I tried to compile latest version of Art's dostats on AIX 5.3. We use 64bit server and I have installed esql 3.50 with 32bit (we have a veryvery old C binary in place and it seems that sources are missing and this binary needs 32bit libraries to work). I installed gcc/g++ plus libraries and downloaded the 'esql for AIX' replacement from oninit.com. I have a dostats in place on AIX (Features Version 5.10, Source Revision: 1.146 !) which I managed to compile years ago. I remember it took me days to fight thru AIX and gcc. But know I'm stuck - I have no success compiling dostats on AIX. Here is what I get (and dozens of lines more): root@hacmp:"/home2/root/utils2"$ export INFORMIXC=g++ root@hacmp:"/home2/root/utils2"$ esql -o xxxx dostats_ng.ec dostats_ng.ec:100: warning: non-local variable '<anonymous struct> tabinfo' uses anonymous type dostats_ng.ec:100: warning: non-local variable '<anonymous struct> lastidx' uses anonymous type dostats_ng.ec:121: error: 'loc_t' does not name a type dostats_ng.ec:185: error: 'loc_t' was not declared in this scope ... If I use INFORMIXC=gcc I just get: root@hacmp:"/home2/root/utils2"$ esql -o xxxx dostats_ng.ec gcc: error trying to exec 'cc1': execvp: No such file or directory Unfortunately I'm a real C noob and don't know how to get this working. Any help possible? Q2: Or can I also use the old dosstats version for 11.50? Thanks in advance. Before I forgot. rpm list: libstdc++-4.2.4-2 gcc-c++-4.2.4-2 libstdc++-devel-4.2.4-2 libgcc-4.2.4-2 gcc-4.2.4-2
OK, the dostats_ng code is not C++ safe. There are C-ish things in there that a C++ compiler will complain about, that's just a given, so you'll have to use gcc. Now, it looks like your GCC installation is broken, it looks like while the compiler driver, gcc, is there the actual C compiler components (cc1, cc2, etc.) are missing. Probably gcc was installed along with g++ but gcc was never installed. Have you tried using the native AIX compiler - xlc? That should be installed on any AIX system normally. The makefile changes needed to use xlc are present in the makefile as comments and are explained somewhat in the BUILDING file. Let me know how it goes. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, Aug 23, 2010 at 10:01 AM, JOERG REDEMANN <joerg.redemann@sabre.com>wrote: > Hi there, > > We will upgrade from version 10.00 to 11.50 within next days and I tried to > compile latest version of Art's dostats on AIX 5.3. > We use 64bit server and I have installed esql 3.50 with 32bit (we have a > veryvery old C binary in place and it seems that sources are missing and > this > binary needs 32bit libraries to work). > > I installed gcc/g++ plus libraries and downloaded the 'esql for AIX' > replacement from oninit.com. > > I have a dostats in place on AIX (Features Version 5.10, Source Revision: > 1.146 !) which I managed to compile years ago. I remember it took me days > to > fight thru AIX and gcc. But know I'm stuck - I have no success compiling > dostats on AIX. > > Here is what I get (and dozens of lines more): > > root@hacmp:"/home2/root/utils2"$ export INFORMIXC=g++ > root@hacmp:"/home2/root/utils2"$ esql -o xxxx dostats_ng.ec > > dostats_ng.ec:100: warning: non-local variable '<anonymous struct> > tabinfo' > uses anonymous type > dostats_ng.ec:100: warning: non-local variable '<anonymous struct> > lastidx' > uses anonymous type > dostats_ng.ec:121: error: 'loc_t' does not name a type > dostats_ng.ec:185: error: 'loc_t' was not declared in this scope > .... > > If I use INFORMIXC=gcc I just get: > > root@hacmp:"/home2/root/utils2"$ esql -o xxxx dostats_ng.ec > gcc: error trying to exec 'cc1': execvp: No such file or directory > > Unfortunately I'm a real C noob and don't know how to get this working. > > Any help possible? > > Q2: Or can I also use the old dosstats version for 11.50? > > Thanks in advance. > > Before I forgot. rpm list: > > libstdc++-4.2.4-2 > gcc-c++-4.2.4-2 > libstdc++-devel-4.2.4-2 > libgcc-4.2.4-2 > gcc-4.2.4-2 > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001485f7c1764ef044048e7e3157
Thank you Art. Your point of broken gcc finally led me to the missing "extra"
package for AIX: gcc-cpp-4.2.4-2.aix5.3.ppc.rpm. This provides cc1. (Why the
hell is this extra? Anyway...)
Now I get the following (complete error list):
root@hacmp:"/home2/root/utils2"$ make dostats
INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dostatsdostats_ng.ec getopt.c
dostats_ng.ec:121: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'exprtext'
dostats_ng.ec:185: error: expected ')' before '*' token
dostats_ng.ec:186: error: expected ')' before '*' token
dostats_ng.ec:187: error: expected ')' before '*' token
dostats_ng.ec: In function 'main':
dostats_ng.ec:278: error: array type has incomplete element type
dostats_ng.ec:279: error: 'no_argument' undeclared (first use in this function)
dostats_ng.ec:279: error: (Each undeclared identifier is reported only once
dostats_ng.ec:279: error: for each function it appears in.)
dostats_ng.ec:280: error: 'required_argument' undeclared (first use in this
function)
dostats_ng.ec:2810: error: 'exprtext' undeclared (first use in this function)
dostats_ng.ec:2820: error: 'writeit' undeclared (first use in this function)
dostats_ng.ec:2821: error: 'openit' undeclared (first use in this function)
dostats_ng.ec:2822: error: 'closeit' undeclared (first use in this function)
dostats_ng.ec: At top level:
dostats_ng.ec:4275: error: expected ')' before '*' token
dostats_ng.ec:4297: error: expected ')' before '*' token
dostats_ng.ec:4314: error: expected ')' before '*' token
getopt.c: In function 'exchange':
getopt.c:270: warning: incompatible implicit declaration of built-in function
'malloc'
make: *** [dostats] Error 1
I red thru README/BUILDING and have no idea what to change. Only things I did
was to comment out this line in Makefile:
#PLTFM_FLAGS=-O2 -qmaxmem=16384 # For AIX to improve code optimization if
desired
And this line in .ec code:
/* #include "getopt.h" Not <getopt.h> need the delivered header. */
(Throws additional getopt error).
Many thanks again.
Joerg
The errors you are seeing are all caused by commenting out the #include
"getopt.h" line. The default getopt.h that AIX delivers is not compatible
with the customized GNU getopt.c file that is delivered with my package and
it needs the getopt.h that is also included. The line:
/* #include "getopt.h" Not <getopt.h> need the delivered header. */
Should read:
#include "getopt.h" /* Not <getopt.h> need the delivered header. */
Let me know if this helps.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Mon, Aug 23, 2010 at 10:42 AM, JOERG REDEMANN
<joerg.redemann@sabre.com>wrote:
> Thank you Art. Your point of broken gcc finally led me to the missing
> "extra"
> package for AIX: gcc-cpp-4.2.4-2.aix5.3.ppc.rpm. This provides cc1. (Why
> the
> hell is this extra? Anyway...)
>
> Now I get the following (complete error list):
>
> root@hacmp:"/home2/root/utils2"$ make dostats
> INFORMIXC=gcc esql -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dostats> dostats_ng.ec getopt.c
>
> dostats_ng.ec:121: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'exprtext'
> dostats_ng.ec:185: error: expected ')' before '*' token
> dostats_ng.ec:186: error: expected ')' before '*' token
> dostats_ng.ec:187: error: expected ')' before '*' token
> dostats_ng.ec: In function 'main':
> dostats_ng.ec:278: error: array type has incomplete element type
> dostats_ng.ec:279: error: 'no_argument' undeclared (first use in this
> function)
> dostats_ng.ec:279: error: (Each undeclared identifier is reported only
> once
> dostats_ng.ec:279: error: for each function it appears in.)
> dostats_ng.ec:280: error: 'required_argument' undeclared (first use in
> this
> function)
> dostats_ng.ec:2810: error: 'exprtext' undeclared (first use in this
> function)
> dostats_ng.ec:2820: error: 'writeit' undeclared (first use in this
> function)
> dostats_ng.ec:2821: error: 'openit' undeclared (first use in this
> function)
> dostats_ng.ec:2822: error: 'closeit' undeclared (first use in this
> function)
> dostats_ng.ec: At top level:
> dostats_ng.ec:4275: error: expected ')' before '*' token
> dostats_ng.ec:4297: error: expected ')' before '*' token
> dostats_ng.ec:4314: error: expected ')' before '*' token
> getopt.c: In function 'exchange':
> getopt.c:270: warning: incompatible implicit declaration of built-in
> function
> 'malloc'
> make: *** [dostats] Error 1
>
> I red thru README/BUILDING and have no idea what to change. Only things I
> did
> was to comment out this line in Makefile:
>
> #PLTFM_FLAGS=-O2 -qmaxmem=16384 # For AIX to improve code optimization if
> desired
>
> And this line in .ec code:
>
> /* #include "getopt.h" Not <getopt.h> need the delivered header. */
>
> (Throws additional getopt error).
>
> Many thanks again.
>
> Joerg
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0016e68ef43e39216e048e7f182a