After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 89432 - Compile problems in sysdeps/solaris
Compile problems in sysdeps/solaris
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: solaris
2.0.x
Other Solaris
: Normal blocker
: ---
Assigned To: Martin Baulig
Martin Baulig
: 76792 76817 104664 105863 105864 106032 106045 106109 116461 117808 125399 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-07-30 16:29 UTC by Judith Pemberton
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for compiling libgtop on Solaris 8 and 9 (7.26 KB, patch)
2003-02-15 14:08 UTC, the_h1ghlander
none Details | Review
patch for libgtop-2.0.1 to work with solaris 8 and 9 (8.19 KB, patch)
2003-02-18 13:17 UTC, the_h1ghlander
none Details | Review
Patch for compiling libgtop 2.0.2 under Solaris 8/9 (15.46 KB, patch)
2003-07-18 03:55 UTC, Cory Omand
none Details | Review

Description Judith Pemberton 2002-07-30 16:29:44 UTC
Hi,

I'm having problems building a number of the modules in 
libgtop-2.0.0/sysdeps/solaris from libgtop-2.0.0.tar.gz.  It looks as tho 
some of the .c files (e.g. cpu.c, uptime.c, procstate.c, procuid.c) have 
had new variables added but these are not declared in their corresponding 
header files.

Thank you for any help you can give.
Judith

My build environment
o------------------o

O-S:
  SunOS 5.6 Generic_105181-30 sun4u sparc SUNW,Ultra-Enterprise

Compiler:
  gcc 3.0.3

Other software:
  gnumake  3.79.1
  pkgconf  0.12.0
  glib     2.0.4
  gtk      2.0.5
  jpeg     6b
  png      1.2.3
  atk      1.0.2
  pango    1.0.3
  zlib     1.1.4

The sort of errors I'm getting
o----------------------------o

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_IN_LIBGTOP -D_GNU_SOURCE -
DGLIBTOP_NAMES -I../.. -I../.. -I../../sysdeps/solaris -I../../include -
DNEED_GNOMESUPPORT_H -I../../support -I../../support -
I/sbcimp/run/pd/gtk/2.0.5/include/glib-2.0 -I/sbc
imp/run/pd/gtk/2.0.5/lib/glib-2.0/include -g -O2 -I/usr/openwin/include -
DGTOPLOCALEDIR=\"/sbcimp/run/pd/libgtop/2.0.0/share/locale\" -
DLIBGTOP_VERSION=\"2.0.0\
" -DLIBGTOP_SERVER_VERSION=\"5\" -DLIBGTOP_VERSION_CODE=2000000 -
DLIBGTOP_SERVER
=\"/sbcimp/run/pd/libgtop/2.0.0/bin/libgtop_server\" 
-I/sbcimp/run/pd/gtk/2.0.5/include/glib-2.0 
-I/sbcimp/run/pd/gtk/2.0.5/lib/glib-2.0/include 
-I/sbcimp/run/pd/atk/1.0.2/include -I/sbcimp/run/pd/pango/1.0.3/include 
-I/sbcimp/run/pd/jpeg/6b/include 
-I/sbcimp/run/pd/png/1.2.3/include 
-I/sbcimp/run/pd/zlib/1.1.4/include
 -g -O2 -c cpu.c  -fPIC -DPIC -o cpu.o
In file included from ../../glibtop.h:33,
                 from cpu.c:24:
glibtop_machine.h:78:8: warning: extra tokens at end of #endif directive
In file included from cpu.c:31:
glibtop_private.h:68:8: warning: extra tokens at end of #endif directive
cpu.c:39: `GLIBTOP_XCPU_FLAGS' undeclared here (not in a function)
cpu.c: In function `glibtop_get_cpu_s':
cpu.c:84: structure has no member named `xcpu_flags'
make[3]: *** [cpu.lo] Error 1

...

uptime.c:31: `GLIBTOP_UPTIME_BOOT_TIME' undeclared here (not in a function)
uptime.c: In function `glibtop_get_uptime_s':
uptime.c:53: structure has no member named `boot_time'
make[3]: *** [uptime.lo] Error 1

...

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: 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'

...

In file included from procuid.c:27:
glibtop_private.h:68:8: warning: extra tokens at end of #endif directive
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: 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'
make[3]: *** [procuid.lo] Error 1
Comment 1 Luis Villa 2002-07-31 02:15:16 UTC
Hrm. We should really remove martin from the maintainership assign
here. Kevin, any idea if anyone works on this ATM?
Comment 2 Kevin Vandersloot 2002-07-31 02:28:52 UTC
Luis: I don't have access to any Sun machines so I'm no help here (nor
do I know anything really about libgtop ;)
Comment 3 Peter O'Shea 2002-07-31 18:28:57 UTC
I can confirm similar compile problems on my Solaris 8 machine.  I had
limited success in getting it to compile by playing with the
VERSION_CODE, but then wasn't able to get anything that uses ligbtop
to compile successfully.

If anyone can point me in the right direction, I'd be glad to help.  
Comment 4 Jonas Jonsson 2002-08-20 13:31:12 UTC
I have the same problems, both on sparc and x86 Solaris.  I also have
problems with building the libgtop_server (or something like that,
can't recall right now..). After a little examination of the created
Makefiles I fixed it. 

Also had to add "typedef unsigned long long u_int64_t;" in the
beginning of libgtop.h after installation, otherwise other stuff
wouldn't compile.  I "fixed" the buildproblems by changing the version
string that is tested in the c-files to something like "2001002"....

And yes, the whole package doesn't work as well as it should (at least
not on a Solaris-box), so perhaps the guys at wipro/Sun could take a
look at it??
Comment 5 Krishnan B 2002-11-22 06:05:33 UTC
I have the same problems in compliling libgtop on solaris 8. I traced
it to:
 
In file <basedir>/sysdeps/solaris/cpu.c cpu.c line 54,  function
glibtop_get_cpu_s calls a structure glibtop_cpu and on line 84, does
this:
	buf->xcpu_flags |= (1L << cpu);

However, in file <basedir>/include/glibtop/cpu.h, where the structure
glibtop_cpu is defined, xcpu_flags is NOT a member of the structure. 

I assume that it is due to this that we see an error.

Also, in file cpu.c, a file <basedir>/sys/processor.h is included by
saying :  #include <sys/processor.h>
but I found no file in this name in the distribution ( I got the
distribution from ftp.gnome.org)

In file cpu.c, the above instruction is executed only if the version
code is  >= 1001002. So, we can compile this by making the version
code less than 1001002. But, i dont know what implications it will
have on codes complied using glibtop libraries.

I have not done much C programming, so do correct me if I am wrong.


Krishnan
Comment 6 David Kennedy 2002-12-14 04:08:32 UTC
*** Bug 76817 has been marked as a duplicate of this bug. ***
Comment 7 David Kennedy 2002-12-14 04:09:34 UTC
76817 brings up the u_int64_t issue - I'm assuming if this bug is
resolved, that issue will be fixed.
Comment 8 David Kennedy 2002-12-14 04:11:45 UTC
*** Bug 76792 has been marked as a duplicate of this bug. ***
Comment 9 David Kennedy 2002-12-14 04:12:51 UTC
bug 76792 also mentions issues compiling which are brought up here
Comment 10 David Kennedy 2002-12-14 04:13:17 UTC
*** Bug 76792 has been marked as a duplicate of this bug. ***
Comment 11 Peter O'Shea 2003-02-14 14:41:57 UTC
This bug is seriously stagnating.  Does anyone know if there are Sun
people that could be pointed at it?  I thought Sun was intending to
put Gnome2 into Solaris 10, they should have at least a few of their
thousands of people working on Gnome bugs.
Comment 12 Kevin Vandersloot 2003-02-14 15:37:03 UTC
Sun won't ship libgtop nor gnome-system-monitor with Solaris now so
that's why they aren't fixing this bug (rest assured that they are
fixing a lot of bugs in other modules :)

We just need to find someone with a Solaris box to look at this bug
(the gnome-system-monitor compile bug is simple to fix).
Comment 13 the_h1ghlander 2003-02-14 23:51:40 UTC
I've run into the same problem, and what I did to get around the
compile problems was to change the #ifdef LIBGTOP_VERSION_CODE to read

#ifdef LIBGTOP_VERSION_CODE >= 1001002 && LIBGTOP_VERSION_CODE < 2000000

This gets the compiles working in cpu.c, and several of the other
files that are required.  Until I can get a compiled build going,
I won't really know if these changes are functional, or just
hiding a problem.

I also hacked in a #define for GLIBTOP_MAX_GROUPS so that procdata.c
would compile.  These were easy fixes, but the one that will take
a little bit more resolution is to figure out where the linkage
dependency isn't getting referenced, as shown by this linker error:

Undefined			first referenced
 symbol  			    in file
_glibtop_init_hook_p               
/export/src/Garnome/garnome-0.21.2/gnome/libgtop/work/main.d/libgtop-2.0.1/sysdeps/solaris/.libs/libgtop_sysdeps_suid-2.0.sold:
fatal: Symbol referencing errors. No output written to .libs/mkinodedb2
Comment 14 the_h1ghlander 2003-02-14 23:52:19 UTC
*** Bug 106032 has been marked as a duplicate of this bug. ***
Comment 15 the_h1ghlander 2003-02-14 23:52:50 UTC
*** Bug 106045 has been marked as a duplicate of this bug. ***
Comment 16 the_h1ghlander 2003-02-15 14:08:00 UTC
Created attachment 14349 [details] [review]
Patch for compiling libgtop on Solaris 8 and 9
Comment 17 the_h1ghlander 2003-02-15 14:10:36 UTC
I looked at the original changes in the libgtop-1.1.2.1-solaris
and ported all the changes into the new framework.  It compiles
for both Solaris 8 and 9 (well, X86 anyway). The patch precedes this
note because I didn't realize that the patch would be uploaded as
a separate entity.
Comment 18 the_h1ghlander 2003-02-15 14:30:35 UTC
Follow on this build - 

u_int64_t is defined in config.h, but should probably live in
glibtop.h, since immediately following this successful build in
garnome, it broke gnome-system-monitor.

Is it appropriate to add this define using autoconf, and 
a glibtop.h.in to setup this define for other systems?

Comment 19 the_h1ghlander 2003-02-17 01:44:49 UTC
*** Bug 106109 has been marked as a duplicate of this bug. ***
Comment 20 Jonas Jonsson 2003-02-17 08:14:25 UTC
Look at 104664.

The version of serveral files in the distributed tarball is antique. 
Isn't that the *real* problem?  Shouldn't it be possible to merge the
newer stuff into this package without breaking other builds, and still
get the Solaris stuff working a little better??

I picked out the latest version from CVS, and built it on my Solaris
box at home (x86) but that wasn't good.  Still, I believe our main
problem here is a version mismatch ....
Comment 21 the_h1ghlander 2003-02-17 14:33:29 UTC
It's mostly just data structures, and #defines that make up this
patch, with a fix for Solaris 9 shared memory variables that went
away in the change from Solaris 8 to Solaris 9.  The main data
structure that I added is for is in lib/sysdeps.c, and from my
read of the code, almost all the other architectures besides
Linux reference this data structure. 

My initial cut at fixing this was to do what you did, and change
the #ifdefs to leave out things.  However, that was going nowhere
fast, and then I found the old code that was for Solaris.  By
adding the appropriate #defines (adding to the 2.0.1 code as
opposed to changing the existing 2.0.1 code to match the
1.1.2.1-solaris code) to several of the .h files, and fixing a
few problems along the way, I finally got everything compiling
with the exception of a linker error for _glibtop_init_hook_p.
After reading through the code several times, and understanding
what this data structure does, I felt confident that this would
not impact Linux code, and I believe it has the possiblity of
improving the other systems which also use the _glibtop_init_hook_p.

I believe by only adding to the data structures, and #defines
to this code base, there should be little danger in breaking
other code trees.

Comment 22 the_h1ghlander 2003-02-18 13:17:25 UTC
Created attachment 14415 [details] [review]
patch for libgtop-2.0.1 to work with solaris 8 and 9
Comment 23 Peter O'Shea 2003-02-18 16:02:10 UTC
I tried the patch on my sparc solaris 8 machine, and the compile fails
at cpu.c:

In file included from ../../glibtop.h:37,
                 from cpu.c:24:
glibtop_machine.h:78:8: warning: extra tokens at end of #endif directive
In file included from cpu.c:31:
glibtop_private.h:68:8: warning: extra tokens at end of #endif directive
cpu.c:39: `GLIBTOP_XCPU_FLAGS' undeclared here (not in a function)
cpu.c: In function `glibtop_get_cpu_s':
cpu.c:84: structure has no member named `xcpu_flags'
gmake[3]: *** [cpu.lo] Error 1
gmake[3]: Leaving directory
`/home/poshea/usr/source/gnome2/libgtop-2.0.1/sysdeps/solaris'


BTW, what is the easy way to apply the patch on Solaris?  I had to do
it file-by-file.
Comment 24 the_h1ghlander 2003-02-18 19:42:28 UTC
On solaris, you need to use gpatch instead of patch (It's the Gnu patch).

The command to run is "gpatch -p0 < patchfile" above the libgtop-2.0.1
directory.  (I just verified the patchfile id-14415 patches the
current tree with the command I just gave you)
Comment 25 Peter O'Shea 2003-02-18 20:21:42 UTC
Ok, using GNU patch, it compiled fine (I must've missed patching a
file), except in the /doc directory where I got the following error:

Making info file `libgtop2.info' from `libgtop2.texi'.
libgtop2.texi:45: Unknown info command `dircategory'.
libgtop2.texi:46: Unknown info command `direntry'.
libgtop2.texi:51: Bad argument to `end', `direntry', using `format'.
libgtop2.texi:52: `@end' expected `ifinfo', but saw `format'.
./about.texi:11: Unknown info command `uref'.
./about.texi:11: Misplaced `{'.
./about.texi:11: Misplaced `}'.
./about.texi:26: Unknown info command `uref'.
./about.texi:26: Misplaced `{'.
./about.texi:26: Misplaced `}'.
./about.texi:30: Unknown info command `uref'.
./about.texi:30: Misplaced `{'.
./about.texi:30: Misplaced `}'.
./about.texi:90: Unknown info command `email'.
./about.texi:90: Misplaced `{'.
./about.texi:90: Misplaced `}'.
./about.texi:103: Unknown info command `uref'.
./about.texi:103: Misplaced `{'.
./about.texi:103: Misplaced `}'.
gmake[2]: *** [libgtop2.info] Error 2
gmake[2]: Leaving directory
`/home/poshea/usr/source/gnome2/libgtop-2.0.1/doc'

I assume this is harmless to the function of the libraries.

After compiling this and gnome-system-monitor (with highlander's patch
for system-monitor, in bug 106164) successfully, it all seems to work.
Comment 26 Peter O'Shea 2003-05-15 19:12:19 UTC
Is there some reason a new release of libgtop was made without this
patch in it?  What is needed to get this patch checked into CVS?
Comment 27 Kjartan Maraas 2003-06-10 16:54:46 UTC
If it's working on Solaris with the patch and nothing else is affected
by it I'm sure it's no problem to put it in. Say yay or nay
Comment 28 Kjartan Maraas 2003-06-10 17:27:46 UTC
*** Bug 105863 has been marked as a duplicate of this bug. ***
Comment 29 Ali Akcaagac 2003-06-10 18:21:01 UTC
This patch causes problems for normal Linux users and thus needs to ge
reworked. I was kindly asked by Kjartan to test the patches, compile
and run some tests with it. Here the results:

1) patches apply seamless
2) configure and make process works perfectly
3) installing works perfectly
4) running gnome-system-monitor shows wrong values.

CPU and MEMORY show always '0'

Without this patch applied everything works normally on my Linux box,
memory and cpu content shown correctly. Patch applied against todays
(see date of my comment) anoncvs checkout (with correct branch) of
libgtop.

For further comments please contact me (email above and not on the cc
list).
Comment 30 Cory Omand 2003-07-18 03:55:36 UTC
Created attachment 18403 [details] [review]
Patch for compiling libgtop 2.0.2 under Solaris 8/9
Comment 31 Rolf Sponsel 2003-08-14 12:47:17 UTC
(SunOS myhost 5.7 Generic_106541-25 sun4m sparc SUNW,SPARCstation-5)

Hi,

I'm new to GNOME Bugzilla. Just registered.

I have GNOME 2.2.x running on SPARC/Solaris 7,
compiled with gcc-3.2.2, on my SPARCStation 5.

So far without libgtop due to compile problems
similar to those reported in this Bug Report.

I've, some time ago, tried to compile libgtop
versions 2.0.0, 2.0.1, and 2.0.2 without success
:-(without applying any patches, because I just
   found out about their existance :-)

Now that 2.0.3 is out, I've just tried to build
that one too. Unfortunately this still fails.

My findings so far are the following:

1). during configure I got the following warning
    (otherwise it went through fine):

# ./configure


checking build system type... sparc-sun-solaris2.7

checking host system type... sparc-sun-solaris2.7

checking target system type... sparc-sun-solaris2.7

checking for a BSD-compatible install... ./install-sh -c

checking whether build environment is sane... yes

/tmp/libgtop-2.0.3/missing: Unknown `--run' option

Try `/tmp/libgtop-2.0.3/missing --help' for more information

configure: WARNING: `missing' script is too old or missing

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for style of include used by make... GNU

checking for gcc... gcc

checking for C compiler default output... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables... 

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking dependency style of gcc... gcc3

...

2). during the make stage the compilation of cpu.c failed,
    returning the following messages:

...
mv -f .libs/siglist.lo siglist.lo
source='cpu.c' object='cpu.lo' libtool=yes \
depfile='.deps/cpu.Plo' tmpdepfile='.deps/cpu.TPlo' \
depmode=gcc3 /bin/ksh ../../depcomp \
/bin/ksh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
-I../.. -D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I../.. -I../..
-I../../sysdeps/solaris -I../../include -DNEED_GNOMESUPPORT_H
-I../../support -I../../support -I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include   -g -O2  -I/usr/openwin/include 
-DGTOPLOCALEDIR=\"/usr/local/share/locale\"
-DLIBGTOP_VERSION=\"2.0.3\" -DLIBGTOP_SERVER_VERSION=\"5\"
-DLIBGTOP_VERSION_CODE=2000003
-DLIBGTOP_SERVER=\"/usr/local/bin/libgtop_server2\"    -g -O2 -c -o
cpu.lo `test -f 'cpu.c' || echo './'`cpu.c
rm -f .libs/cpu.lo
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_IN_LIBGTOP -D_GNU_SOURCE
-DGLIBTOP_NAMES -I../.. -I../.. -I../../sysdeps/solaris
-I../../include -DNEED_GNOMESUPPORT_H -I../../support -I../../support
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -g -O2
-I/usr/openwin/include "-DGTOPLOCALEDIR=\"/usr/local/share/locale\""
"-DLIBGTOP_VERSION=\"2.0.3\"" "-DLIBGTOP_SERVER_VERSION=\"5\""
-DLIBGTOP_VERSION_CODE=2000003
"-DLIBGTOP_SERVER=\"/usr/local/bin/libgtop_server2\"" -g -O2 -c cpu.c
-MT cpu.lo -MD -MP -MF .deps/cpu.TPlo  -fPIC -DPIC -o .libs/cpu.lo
cpu.c:39: `GLIBTOP_XCPU_FLAGS' undeclared here (not in a function)
cpu.c: In function `glibtop_get_cpu_s':
cpu.c:84: structure has no member named `xcpu_flags'
make[3]: *** [cpu.lo] Error 1
make[3]: Leaving directory `/tmp/libgtop-2.0.3/sysdeps/solaris'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/libgtop-2.0.3/sysdeps'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/libgtop-2.0.3'
make: *** [all] Error 2
#


It is surprising to me, because of the GLIBTOP_XCPU_FLAGS error,
that this error still remains in the new 2.0.3 distribution.
From what I can understand, by reading this Bug Report, that
problem has been spotted long ago (several releases) and even
has a patch submitted. It seems to me that the patch has still
not made it into the distribution 'tar.gz'. Is that right? If
so - why not?



Now, since I seem to have GNOME 2.2.x running on an ancient ;-)
platform, without libgtop though, I'm willing to verify the
functionality of the build process on the SPARC/Solaris (7)
platform IF SOMEONE is willing to merge the required patches
into the next release of libgtop, i.e. 2.0.4. But please act
soon, before I have lost focus again. I'm sorry that I won't
be able to help with the actual patching of the software due
to lack of time. :-(

Please contact me (email above and not on the cc list).



My next step is, when time allow, to try to apply the posted
patch, which is claimed to work for libgtop-2.0.2 on Solaris 8/9,
and see if it can be applied to libgtop-2.0.3 (on Solaris 7) too.

So, I guess, another reasonable (and leading) question would be;
do one need the patch when compiling libgtop-2.0.3 on Solaris 8/9,
and does it work (at least compile)? Or will there be a separate
patch for libgtop-2.0.3 on Solaris 8/9? If so, when?

Please let me know.
Comment 32 Peter O'Shea 2003-08-14 14:02:25 UTC
The patch submitted by Cory applies and works on version 2.0.3, at
least under Solaris 8 (on a SunBlade 100).  You'll need the GNU
version of patch instead of the native Solaris patch.

As for why this hasn't been given any attention by the maintainer in
over a year, that's a mystery.
Comment 33 Rolf Sponsel 2003-08-15 22:12:06 UTC
Okay, Thanks!

I can hereby confim that the patch for libgtop-2.0.2 by Cory seems to
work for ligtop-2.0.3 too. At least after patching libgtop-2.0.3
builds with gcc-3.2.2 under Solaris 7 (on a SPARCstation 5).

I downloaded the patch and replaced all occurences of "libgtop-2.0.2"
with "libgtop-2.0.3" in the patch, and then followed the instructions
for patching given by the_h1ghlander@yahoo.com earlier in this thread.

Now, let's hope it finds it's way into the libgtop-2.0.4 tar ball.
Comment 34 Kevin Vandersloot 2003-10-12 17:53:15 UTC
*** Bug 116461 has been marked as a duplicate of this bug. ***
Comment 35 Kevin Vandersloot 2003-10-12 17:53:19 UTC
*** Bug 117808 has been marked as a duplicate of this bug. ***
Comment 36 Kevin Vandersloot 2003-10-12 18:14:38 UTC
I tried Cory's patch and it breaks binary compatibility, so it can't
go into the 2.0.x releases.

I tried it though on linux and it seems to work fine. Is there anyway
someone can rework it to not break compatibility? Otherwise it would
have to go into un unstable branch to be releases with GNOME 2.6
Comment 37 Bastien Nocera 2003-10-20 21:27:35 UTC
Applied to HEAD, you're responsible if you broke everything, thank you :)

2003-10-20  Bastien Nocera  <hadess@hadess.net>
                                                                     
         
        * include/glibtop/cpu.h:
        * include/glibtop/procstate.h:
        * include/glibtop/procuid.h:
        * include/glibtop/uptime.h:
        * lib/sysdeps.c:
        * sysdeps/names/cpu.c:
        * sysdeps/names/procstate.c:
        * sysdeps/names/procuid.c:
        * sysdeps/names/uptime.c: Apply patch by
the_h1ghlander@yahoo.com and
        Cory Omand <cory.omand@Sun.com> for Solaris support
Comment 38 Bastien Nocera 2003-10-20 21:29:21 UTC
*** Bug 104664 has been marked as a duplicate of this bug. ***
Comment 39 Bastien Nocera 2003-10-20 21:29:42 UTC
*** Bug 105864 has been marked as a duplicate of this bug. ***
Comment 40 Peter O'Shea 2003-10-21 13:17:03 UTC
Did the patches get into libgtop-2.5.0?  Because I still get compile
problems:

/home/poshea/usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_IN_LIBGTOP
-D_GNU_SOURCE -DGLIBTOP_NAMES -I../.. -I../.. -I../../sysdeps/solaris
-I../../include -DORBIT2=1 -threads
-I/home/poshea/usr/include/glib-2.0
-I/home/poshea/usr/lib/glib-2.0/include
-I/home/poshea/usr/include/libgnome-2.0
-I/home/poshea/usr/include/orbit-2.0
-I/home/poshea/usr/include/libbonobo-2.0
-I/home/poshea/usr/include/gconf/2
-I/home/poshea/usr/include/gnome-vfs-2.0
-I/home/poshea/usr/lib/gnome-vfs-2.0/include
-I/home/poshea/usr/include/bonobo-activation-2.0 -O3 -mcpu=ultrasparc
-I/home/poshea/usr/include -I/usr/openwin/include
-DGTOPLOCALEDIR=\"/home/poshea/usr/share/locale\"
-DLIBGTOP_VERSION=\"2.5.0\" -DLIBGTOP_SERVER_VERSION=\"5\"
-DLIBGTOP_VERSION_CODE=2005000
-DLIBGTOP_SERVER=\"/home/poshea/usr/bin/libgtop_server2\"
-I/home/poshea/usr/include -O3 -mcpu=ultrasparc
-I/home/poshea/usr/include -c cpu.c  -fPIC -DPIC -o .libs/cpu.lo
cpu.c:39: `GLIBTOP_XCPU_FLAGS' undeclared here (not in a function)
cpu.c: In function `glibtop_get_cpu_s':
cpu.c:84: structure has no member named `xcpu_flags'
gmake[2]: *** [cpu.lo] Error 1
Comment 41 Kevin Vandersloot 2003-10-24 14:46:30 UTC
*** Bug 125399 has been marked as a duplicate of this bug. ***
Comment 42 Kevin Vandersloot 2003-10-24 14:46:55 UTC
No, it will be in 2.5.1
Comment 43 Peter O'Shea 2003-12-15 16:32:06 UTC
Any ETA on 2.5.1?  Still waiting to test out the Solaris fixes.
Comment 44 Peter O'Shea 2004-01-19 15:37:35 UTC
Pretty please?  2.5.1?

Other packages, such as gnome-applets, now depend on libgtop>2.5.0. 
Not all of us have cvs access, some of us depend on package releases.
Comment 45 Peter O'Shea 2004-02-05 21:39:39 UTC
It's now been over three months since these fixes were committed, are
we going to get a release incorporating them soon?  
Comment 46 Kevin Vandersloot 2004-02-15 19:14:48 UTC
OK, Peter there is now a 2.5.1 release available. So sorry for taking
so long.
Comment 47 Peter O'Shea 2004-02-17 15:24:32 UTC
Trying out the new 2.5.1, I get this compile-time error:

 /home/poshea/usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I../..
-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I../.. -I../..
-I../../sysdeps/solaris -I../../include -DORBIT2=1 -threads
-I/home/poshea/usr/include/glib-2.0
-I/home/poshea/usr/lib/glib-2.0/include
-I/home/poshea/usr/include/libgnome-2.0
-I/home/poshea/usr/include/orbit-2.0
-I/home/poshea/usr/include/libbonobo-2.0
-I/home/poshea/usr/include/gconf/2
-I/home/poshea/usr/include/gnome-vfs-2.0
-I/home/poshea/usr/lib/gnome-vfs-2.0/include
-I/home/poshea/usr/include/bonobo-activation-2.0 -O2 -mcpu=ultrasparc
-I/home/poshea/usr/include -I/usr/openwin/include
-DGTOPLOCALEDIR=\"/home/poshea/usr/share/locale\"
-DLIBGTOP_VERSION=\"2.5.1\" -DLIBGTOP_SERVER_VERSION=\"5\"
-DLIBGTOP_VERSION_CODE=2005001
-DLIBGTOP_SERVER=\"/home/poshea/usr/bin/libgtop_server2\"
-I/home/poshea/usr/include -O2 -mcpu=ultrasparc
-I/home/poshea/usr/include -c procargs.c  -fPIC -o .libs/procargs.o
procargs.c: In function `glibtop_get_proc_args_s':
procargs.c:63: warning: passing arg 1 of `g_malloc' makes integer from
pointer without a cast
procargs.c:63: error: too many arguments to function `g_malloc'
procargs.c:71: warning: passing arg 1 of `g_malloc' makes integer from
pointer without a cast
procargs.c:71: error: too many arguments to function `g_malloc'
gmake[3]: *** [procargs.lo] Error 1
gmake[3]: Leaving directory
`/home/poshea/usr/source/gnome2.4/libgtop-2.5.1/sysdeps/solaris'
Comment 48 Peter O'Shea 2004-02-20 15:57:35 UTC
Looking a little deeper, and excuse me if I'm missing something
obvious, but in glib-2.3.2/glib/gmem.c, g_malloc seems to have only
one argument.  But if I look in
libgtop-2.5.1/sysdeps/solaris/procargs.c lines 63 and 71, g_malloc is
being called with two arguments:

	   	ret = g_malloc(server, max_len + 1);
and 

	   ret = g_malloc(server, len + 1);


How does this code compile for anybody else?  I can't be the only
person trying it on Solaris.
Comment 49 Ivan Noris 2004-06-11 14:09:42 UTC
Hello Peter,
I'm reading this by accident, and I'm the second person building GNOME for Sol :)
In 2.6.0, the calls you're referencing have only one argument.

...
       if(max_len)
        {
                ret = g_malloc(max_len + 1);
                if(max_len < len)
                        len = max_len;
                memcpy(ret, pinfo.pr_psargs, len);
                ret[len] = 0;
        }
        else
        {
           ret = g_malloc(len + 1);
...