octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DLD-FUNCTIONS/nprocs.cc:29:25: error: sys/sysinfo.h: No such file or


From: Rik
Subject: Re: DLD-FUNCTIONS/nprocs.cc:29:25: error: sys/sysinfo.h: No such file or directory
Date: Wed, 16 Mar 2011 19:19:44 -0700

On 03/16/2011 06:12 PM, Ben Abbott wrote:
> After the changset below ...
> 
>       http://hg.savannah.gnu.org/hgweb/octave/rev/a1b2da4967ac
> 
> ... I encounter an error ...
> 
> libtool: compile:  g++-4.2 -DHAVE_CONFIG_H -I. -I.. -D__LISTS__ 
> -I/sw/lib/flex/include -I/sw/include -m32 -I/sw/include/freetype2 
> -I/sw/include/qhull -I/usr/include -I../libgnu -I../libgnu -I../libcruft/misc 
> -I../liboctave -I../liboctave -I. -I. -D__LISTS__ -I/sw/lib/flex/include 
> -I/sw/include -m32 -I/sw/include/freetype2 -I/sw/include/qhull -I/usr/include 
> -I/sw/include -m32 -O1 -g -D_THREAD_SAFE -DHAVE_CONFIG_H -mieee-fp 
> -I/sw/include -I/sw/include/freetype2 -I/sw/include -I/usr/X11/include -Wall 
> -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings 
> -Wcast-align -Wcast-qual -I/sw/include -m32 -O1 -g -D_THREAD_SAFE 
> -D_THREAD_SAFE -pthread -I/sw/include -m32 -O1 -g -D_THREAD_SAFE -MT 
> DLD-FUNCTIONS/nprocs.lo -MD -MP -MF DLD-FUNCTIONS/.deps/nprocs.Tpo -c 
> DLD-FUNCTIONS/nprocs.cc  -fno-common -DPIC -o DLD-FUNCTIONS/.libs/nprocs.o
> DLD-FUNCTIONS/nprocs.cc:29:25: error: sys/sysinfo.h: No such file or directory
> DLD-FUNCTIONS/nprocs.cc: In function 'octave_value_list Fnprocs(const 
> octave_value_list&, int)':
> DLD-FUNCTIONS/nprocs.cc:48: error: 'get_nprocs' was not declared in this scope
> DLD-FUNCTIONS/nprocs.cc: In function 'octave_value_list Fnprocs_conf(const 
> octave_value_list&, int)':
> DLD-FUNCTIONS/nprocs.cc:72: error: 'get_nprocs_conf' was not declared in this 
> scope
> make[3]: *** [DLD-FUNCTIONS/nprocs.lo] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> 
> There is no sysinfo.h for MacOS. I can help determine what the MacOS 
> equivalent is, but need someone to give me some hints.
> 
> Ben 
3/16/11

Ben,

On a Linux system the file is at /usr/include/sys/sysinfo.h.
Unfortunately, it seems to be very Linux-specific.  According to 'man
sysinfo' I get

NAME
       sysinfo - returns information on overall system statistics

SYNOPSIS
       #include <sys/sysinfo.h>

       int sysinfo(struct sysinfo *info);

...

CONFORMING TO
       This function is Linux-specific, and should not be used in programs
intended to be portable.


This is sort of a drag as the whole point was to have access to the
underlying gnulib module which should be portable.  The documentation from
gnulib is here:
http://www.gnu.org/s/hello/manual/gnulib/get_005fnprocs.html.  I don't
really understand it.  It might be saying that it doesn't provide portable
implementations for MacOS and a host of other platforms.  If this is the
case, I'm not sure why it needs to be in gnulib.  We can revert the change
if gnulib does not in fact offer any portable versions for non-Linux platforms.

--Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]