[netperf-talk] Request for help in compiling netperf in Solaris 2.7
Andrew Gallatin
gallatin at cs.duke.edu
Fri Jan 4 05:55:19 PST 2008
Jay Kim writes:
>
> Hi, I'm a newbie in using netperf.
>
> After downloading the source code (v2.4.4), I've successfully compiled it in Solaris 2.8.
> However, when I did the same compile in Solaris 2.7, I've encountered the following error message in compiling netlib.c.
> Since the include file does nothing wrong, I'm really stuck here. Could you help me out?
>
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c `test -f 'netlib.c' || echo './'`netlib.c
> In file included from netlib.c:1968:
> /usr/include/sys/processor.h: In function `bind_to_specific_processor':
> /usr/include/sys/processor.h:29: parse error before `typedef'
> /usr/include/sys/processor.h: At top level:
> /usr/include/sys/processor.h:58: warning: data definition has no type or storage class
Apparently the header files are different between 2.7 and later
Solaris versions and the include files specified by netperf are
insufficient in old solaris versions. This is strange, because an
earlier (2.6) man page for processor_bind() found through google shows
the same 3 include files as netperf uses.
If you have a moderate knowledge of C programming, you may be able to
fix the problem yourself by including whatever header file(s)
sys/processor.h requires in order to compile. Later versions
include <sys/types.h> (already included by netperf), and
<sys/procset.h>. As a first guess, I'd try adding
#include <sys/procset.h> just above #include <sys/processor.h>
around line 1967 of netlib.c
To fix the problem with a big hammer, just edit
config.h and comment out or remove the line:
#define HAVE_PROCESSOR_BIND
Drew
More information about the netperf-talk
mailing list