Can't compile TOP on Power-7 AIX 6.1

  • Anonymous - 2010-04-12

    ./configure -with-module=aix5
    ./make install

    # make install
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c color.c
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c commands.c
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c display.c
    display.c: In function 'i_message':
    display.c:1378: warning: suggest parentheses around && within ||
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c screen.c
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c top.c
    top.c: In function 'do_command':
    top.c:658: warning: suggest parentheses around && within ||
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c username.c
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c utils.c
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall  -c version.c
            gcc -DHAVE_CONFIG_H  -I. -I. -g -O2 -Wall   -fno-strict-aliasing -o m_aix5.o -c ./machine/m_aix5.c
    In file included from /usr/include/sys/corral.h:25,
                     from /usr/include/libperfstat.h:28,
                     from ./machine/m_aix5.c:71:
    /usr/include/netinet/in6_var.h:65: error: array type has incomplete element type
    make: 1254-004 The error code from the last command is 1.
  • JAH

    JAH - 2010-04-22

    I successfully compiled Top 3.7 on AIX 6.1 this morning.  It was on Power 5 chip though…here's the steps that worked…

    Compiling Top 3 on AIX 6.1

    • download top-3.7 from Sourceforge at
         saved bravo:/aixdata/sw/sources

    • unzip / untar

    • read INSTALL

    • ./configure failed first pass, had to go with "./configure -module-name=aix5", this

    • "make install" failed with "/usr/include/netinet/in6_var.h:65: error: array type has incomplete element type"
          followed reference to "net-snmp" fix from…
          edited the /usr/include/netinet/in6_var.h file at line 65
          from… "extern  CONST struct protosw inet6sw;"
          to… "extern  CONST struct protosw *inet6sw;"

    • "make install" failed again, but got further with an exciting new error "ld: 0711-317 ERROR: Undefined symbol: .floor"
         read up, looks like the ld needs an argument to pull in the libm, so I added "-lm" to line 34 in the Makefile
         from… LDFLAGS=
         to … LDFLAGS=-lm

    • "make install" failed again, new error "collect2: library libm not found"
         add libm via "bos.adt.libm" package for AIX 6.1 from /nim/lpp_source

    • "make install"; worked and runs!


Log in to post a comment.