In this line from the make log:

/opt/tools/nagios/perl/bin/perl /opt/tools/nagios/perl/lib/5.2 +0.1/ExtUtils/xsubpp -noprototypes -typemap /opt/tools/nagiosc

the -typemap param of xsubpp specifies a file which contains data-type mappings between C and XS (see xsubpp). My default typemap file (in /usr/share/perl5/ExtUtils/typemap) starts with these:

# basic C types int T_IV unsigned T_UV unsigned int T_UV long T_IV unsigned long T_UV ...

The above command line specifies the typemap file to be /opt/tools/nagiosc. If this is indeed a file and a typemap file then you could try adding a line like this:

u_longlong_t T_UV

or, if indeed T_ULONGLONG exists in Perl,:

u_longlong_t T_ULONGLONG

The type u_longlong_t most likely refers to C's unsigned long long (a long is 4 bytes, this must be 8 but that's probably system dependent). And must be known to AIX as it is mentioned in libperfstat.h which contains the function signature for perfstat_memory_total() used by arch/aix.xs in Sys::MemInfo.

The XS files for other systems in Sys::Meminfo, e.g. linux.xs etc. use a double for the return type of the meminfo functions e.g. arch/linux.xs.

The quick hack would be to replace u_longlong_t with double in file arch/aix.xs

So, either get a typemap file which contains said datatype mapping (googling got me one for CORBA::omniORB at https://metacpan.org/source/HOUSEL/CORBA-omniORB-0.9/typemap) or replace mapping with a double like the other os's do and see if that works.

bw, bliako


In reply to Re: Sys::MemInfo on AIX by bliako
in thread Sys::MemInfo on AIX by rgren925

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.