http://www.perlmonks.org?node_id=1152065


in reply to Proc::ProcessTable compilation error on AIX

Perl-Proc-ProcessTable


All is well. I learn by answering your questions...

Replies are listed 'Best First'.
Re^2: Proc::ProcessTable compilation error on AIX
by narasimp (Novice) on Jan 06, 2016 at 09:51 UTC
    Thanks, but i need to build it manually. this is one of the multiple modules which we need to build on all platforms. any idea on how to fix this error?
      "OS.c", line 60.10: 1506-007 (S) "struct userinfo" is undefined.

      Some observations that may or may not be helpful to you:
      In the Proc-ProcessTable-0.53 source, the file os/aix.c #includes just the one header:
      #include "os/aix.h"
      Further down, in the same file, we find the declaration:
      struct userinfo uinfo;
      and the error messages you got tell us that "struct userinfo" is not defined. This suggests that neither os/aix.h nor any of the header files that it pulls in define the "userinfo" struct.
      Yet, google suggests that the "userinfo" struct is to be found in /usr/include/procinfo.h, and os/aix.h definitely contains the line #include <procinfo.h>

      First, check to see whether your /usr/include/procinfo.h does define the userinfo struct.
      If it does not, then the question that needs to be answered is "Why is it missing ?".
      But if it does, then the question that needs to be answered is "How come I then get that error ?". (Is there another procinfo.h that gets loaded instead ?)

      There's a few guys on p5p who are familiar with (and interested in) aix, so I think it's worth asking there if you strike out here.

      Cheers,
      Rob
        Thanks, this could be the root cause here. I shall fix this now.