newbe compiling kde-lite problem

walt wa1ter at myrealbox.com
Mon Jan 10 10:54:28 PST 2005


Joerg Sonnenberger wrote:
On Fri, Jan 07, 2005 at 01:05:21PM +0100, Tomas wrote:

CPU.c:47: `CPUSTATES' undeclared here (not in a function)
[snip]

If you want to fix this, change the port to include kinfo.h instead
of sys/dkstat.h, link against libkinfo and get the data via
kinfo_get_sched_cputime. The structure kinfo_cputime has a field
for any of this stats, have a look at src/usr.bin/systat/iostat.c rev 1.4
for how to use this.
Of course, if you write patches, submit them back for the next KDE version
Okay, I'm almost there -- ksysguard compiles, but I'm still missing
one critical step:  the linking step.
My question is how to link libkinfo only for DFly, so that I don't cause
'lib not found' errors for FreeBSD, which doesn't have libkinfo.
I have tried to follow the logic of how the upstream developers solve
this problem -- and it seems the long-term solution would be to treat
DFly as a separate OS instead of a flavor of FreeBSD.  But doing that
is still way beyond what I know how to do.
So, is there any easier way to make the linker flags conditional on
which OS we are?




More information about the Bugs mailing list