Top v3.7 and v3.8beta1 will not compile on Power7/AIX6.1 server.

Please help!

We are upgrading our server to a new Power7/AIX6.1 from Power5/AIX5.3. I have some programs that rely on output of the TOP command to do various things, however, I keep getting an error when I try to re-compile TOP on my new server (see below). I have tried TOP 3.7 (current release) and 3.8beta1 (latest beta) and neither one will compile.

I am using the m_aix5.c module since there is no module for TOP specific to AIX 6 yet. I was under this impression this would still work, however I'm getting the compile error below in the screen.c program.

Any help with debugging would be appreciated!!

Thanks,
Troy Morton
Senior Technical Analyst
Integration Team

[/opt/freeware/src/top-3.8beta1]
# ./configure --with-module=aix5
Configuring top 3.8beta1
checking build system type... rs6000-ibm-aix
checking host system type... rs6000-ibm-aix
checking target system type... rs6000-ibm-aix
checking for make... make
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for a BSD-compatible install... ./install-sh -c
checking for isainfo... no
checking for isaexec... no
checking for uname... /usr/bin/uname
checking OS revision number... 1
checking hardware platform... 00F607564C00
checking for elf32_getphdr in -lelf... no
checking for kstat_open in -lkstat... no
checking for kvm_open in -lkvm... no
checking for vm_statistics in -lmach... no
checking for library containing tgetent... -lcurses
checking for exp in -lm... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking getopt.h usability... no
checking getopt.h presence... no
checking for getopt.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking termcap.h usability... no
checking termcap.h presence... no
checking for termcap.h... no
checking for unistd.h... (cached) yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking for term.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for a good signal.h... /usr/include/sys/signal.h
checking for variadic macros...  c99 gnu
checking whether sys_errlist is declared... no
checking whether sys_signame is declared... no
checking whether tputs is declared... yes
checking whether tgoto is declared... yes
checking whether tgetent is declared... yes
checking whether tgetflag is declared... yes
checking whether tgetnum is declared... yes
checking whether tgetstr is declared... yes
checking argument type of tputs putc function... int
checking return type of signal handlers... void
checking for id_t... yes
checking for lwpid_t... no
checking for pid_t... yes
checking for time_t... yes
checking for uid_t... yes
checking for getopt... yes
checking for getopt_long... no
checking for gettimeofday... yes
checking for memcpy... yes
checking for setbuffer... yes
checking for setpriority... yes
checking for setvbuf... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strerror... yes
checking for snprintf... yes
checking for sighold... yes
checking for sigrelse... yes
checking for sigaction... yes
checking for sigprocmask... yes
checking for sysconf... yes
checking for uname... yes
checking for vsnprintf... yes
checking for correct ls options... ls -l
checking for a platform module... aix5
checking for perfstat_cpu_total in -lperfstat... yes
checking address space size... 64
checking whether compiler accepts -m64... no
checking for installation settings... mode=755
checking CFLAGS for maximum warnings... -Wall
checking MODULE_CFLAGS for gcc -fno-strict-aliasing... -fno-strict-aliasing
configure: creating ./config.status
config.status: creating Makefile
config.status: creating top.1
config.status: creating config.h
config.status: config.h is unchanged
 
[/opt/freeware/src/top-3.8beta1]
# make install
        gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c screen.c
screen.c: In function 'screen_init':
screen.c:368: error: 'struct sgttyb' has no member named 'sg_werase'
make: 1254-004 The error code from the last command is 1.
 
Stop.
[/opt/freeware/src/top-3.8beta1]
# ls -al |grep install

Googling for that structure member finds an AIX patch for top 3.8beta1.