GNOME Bugzilla – Bug 116461
Errors while compiling libgtop on solaris
Last modified: 2004-12-22 21:47:04 UTC
Hi, I was trying to install gnome2.2 in solaris, but faced some issues with libgtop. I wanted to know if the debug effort I did to get libgtop working on solaris was proper (Or will i get some errors later on ?) I got the following errors when trying to compile libgtop on solaris. 1) cpu.c In directory : sysdeps/solaris cpu.c:39: `GLIBTOP_XCPU_FLAGS' undeclared here (not in a function) cpu.c:41: initializer element is not constant cpu.c: In function `glibtop_get_cpu_s': cpu.c:84: structure has no member named `xcpu_flags' I corrected this by adding the following to include/glibtop/cpu.h - #define GLIBTOP_XCPU_FLAGS 12 - In struct _glibtop_cpu, added the field: xcpu_flags 2) In directory : sysdeps/solaris uptime.c:31: `GLIBTOP_UPTIME_BOOT_TIME' undeclared here (not in a function) uptime.c:33: initializer element is not constant uptime.c: In function `glibtop_get_uptime_s': uptime.c:53: structure has no member named `boot_time' I corrected this by adding the following to include/glibtop/uptime.h - #define GLIBTOP_UPTIME_BOOT_TIME 3 - In struct _glibtop_uptime, added the field: boot_time 3) In directory : sysdeps/solaris procstate.c:31: `GLIBTOP_PROC_STATE_HAS_CPU' undeclared here (not in a function) procstate.c:31: `GLIBTOP_PROC_STATE_PROCESSOR' undeclared here (not in a function) procstate.c:32: `GLIBTOP_PROC_STATE_LAST_PROCESSOR' undeclared here (not in a function) procstate.c:35: `GLIBTOP_PROC_STATE_RUID' undeclared here (not in a function) procstate.c:35: `GLIBTOP_PROC_STATE_RGID' undeclared here (not in a function) procstate.c:38: initializer element is not constant procstate.c: In function `glibtop_get_proc_state_s': procstate.c:67: structure has no member named `ruid' procstate.c:68: structure has no member named `rgid' procstate.c:78: structure has no member named `has_cpu' procstate.c:79: structure has no member named `processor' procstate.c:83: `GLIBTOP_PROCESS_RUNNING' undeclared (first use in this function) procstate.c:83: (Each undeclared identifier is reported only once procstate.c:83: for each function it appears in.) procstate.c:90: `GLIBTOP_PROCESS_ZOMBIE' undeclared (first use in this function) procstate.c:97: `GLIBTOP_PROCESS_INTERRUPTIBLE' undeclared (first use in this function) procstate.c:104: `GLIBTOP_PROCESS_STOPPED' undeclared (first use in this function) procstate.c:111: `GLIBTOP_PROCESS_UNINTERRUPTIBLE' undeclared (first use in this function) procstate.c:117: structure has no member named `last_processor' I corrected this by adding the following to include/glibtop/procstate.h - #define GLIBTOP_PROC_STATE_HAS_CPU 5 - #define GLIBTOP_PROC_STATE_PROCESSOR 6 - #define GLIBTOP_PROC_STATE_LAST_PROCESSOR 7 - #define GLIBTOP_PROC_STATE_RUID 8 - #define GLIBTOP_PROC_STATE_RGID 9 - In struct _glibtop_proc_state, added the field: ruid, rgid, has_cpu, processor, last_processor and in procstate.c, I removed the lines having the undeclared identifiers and used the code as if LIBGTOP_VERSION_CODE was < 1001002. Since these identifiers have not been defined anywhere else, I removed them. Have I done something wrong ? What should I do ? 4) In directory : sysdeps/solaris procuid.c:39: `GLIBTOP_PROC_UID_GROUPS' undeclared here (not in a function) procuid.c:41: `GLIBTOP_PROC_UID_SUID' undeclared here (not in a function) procuid.c:41: `GLIBTOP_PROC_UID_SGID' undeclared here (not in a function) procuid.c:42: `GLIBTOP_PROC_UID_NGROUPS' undeclared here (not in a function) procuid.c:42: initializer element is not constant procuid.c: In function `glibtop_get_proc_uid_s': procuid.c:66: `GLIBTOP_MAX_GROUPS' undeclared (first use in this function) procuid.c:66: (Each undeclared identifier is reported only once procuid.c:66: for each function it appears in.) procuid.c:108: structure has no member named `suid' procuid.c:109: structure has no member named `sgid' procuid.c:110: structure has no member named `ngroups' procuid.c:115: structure has no member named `groups' procuid.c:115: structure has no member named `ngroups' procuid.c:120: structure has no member named `ngroups' procuid.c:121: structure has no member named `groups' I corrected this by adding the following to include/glibtop/procuid.h - #define GLIBTOP_PROC_UID_GROUPS 13 - #define GLIBTOP_PROC_UID_SUID 14 - #define GLIBTOP_PROC_UID_SGID 15 - #define GLIBTOP_PROC_UID_NGROUPS 16 - #define GLIBTOP_MAX_GROUPS 17 In struct _glibtop_proc_uid, added the field: suid,sgid, ngroups, groups [GLIBTOP_MAX_GROUPS] Is there anything wrong that I have done? Or is this fine ? Regards, Krishnan
*** This bug has been marked as a duplicate of 89432 ***