Hi,
In my test-compile I run into a problem with AIX 5.2 on PowerPC64:
$ cc -qlanglvl=extended -q64 -ma -O2 -g -qstrict -qoptimize=2
-qmaxmem=8192 -DDISABLE_VISIBILITY -Isigar/include/ -Isigar/src/os/aix/
-o sigar-test-all sigar-test-all.c sigar/src/sigar_signal.c
sigar/src/sigar_version.c sigar/src/sigar_fileinfo.c sigar/src/sigar.c
sigar/src/sigar_getline.c sigar/src/sigar_cache.c sigar/src/sigar_ptql.c
sigar/src/sigar_util.c sigar/src/os/aix/aix_sigar.c
sigar/src/os/aix/perfstat/sigar_perfstat.c -lodm -lcfg
sigar-test-all.c:
sigar/src/sigar_signal.c:
sigar/src/sigar_version.c:
sigar/src/sigar_fileinfo.c:
sigar/src/sigar.c:
sigar/src/sigar_getline.c:
sigar/src/sigar_cache.c:
sigar/src/sigar_ptql.c:
sigar/src/sigar_util.c:
sigar/src/os/aix/aix_sigar.c:
"/usr/include/sys/user.h", line 380.25: 1506-194 (S) Incomplete type is
not allowed.
sigar/src/os/aix/perfstat/sigar_perfstat.c:
make: *** [sigar-test-all] Error 1
I tried to dive into the internals, but fails to find the reason why it
fails [struct rlimit32 is missing, ...]
AIX5.2 32bit, on the same machine compiles fine.
cheers,
Jan
--
Jan Kneschke, Enterprise Tools Dev, MySQL GmbH, D-81373 München
Radlkoferstr. 2, GF: Hans von Bell, Kaj Arnö - HRB München 162140
Indeed. I just made the change below which removes the getuser() reference in 64-bit mode. We'll have to see if there's another way to get the fd count for a process.I'm only stuck with a linking error now:
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR
Import-File{Shared-object}
RLD: Address Section Rld-type
Referencing Symbol
----------------------------------------------------------------------------------------------
ld: 0711-317 ERROR: Undefined symbol: .getuser
.getuser [2748] ER PR
sigar/src/os/aix/aix_sigar.c(aix_sigar.o)
00004048 .text R_RBR [2178]
.sigar_proc_fd_get
I tried to find a header in /usr/include/ which declares getuser(), but
there is no header for it.
bash-2.05a$ nm -X64 /usr/lib/libc.a | grep '\.getuser'
.getuserattr T 1060216
.getuserpw T 1133080
.getusershell T 1581804
bash-2.05a$ nm -X32 /usr/lib/libc.a | grep '\.getuser'
.getuser T 1549176
.getuserattr T 977136
.getuserpw T 1044796
.getusershell T 1444764
Unbelievable. getuser() only exists as 32bit symbol.
According to:
http://search.cpan.org/src/DURIST/Proc-ProcessTable-0.41/README.aix
o Documentation under AIX is rather cryptic and incomplete. I managed to
read the process table using undocumented calls : getproc, getuser,
getargs.
Looks like they are undocumented for a reason 🙂