sysinfo.h
Polytropon
freebsd at edvax.de
Wed Mar 11 11:58:57 UTC 2015
On Wed, 11 Mar 2015 12:42:58 +0100, Bernt Hansson wrote:
> Hello list!
>
> Trying to build a program (freecad)
>
> I have got cmake to find libs and other programs it needs.
>
> running cmake -DFREECAD_USE_EXTERNAL_PIVY=1 -DCMAKE_BUILD_TYPE=Release .
>
> results is this
> -- Configuring done
> -- Generating done
> -- Build files have been written to:
> /usr/home/bernt/vebbnerladdningar/FreeCAD_sf_master-master/FreeCAD_sf_master-master
>
> Then one should run make.
>
> make gives this error
>
> /usr/home/bernt/vebbnerladdningar/FreeCAD_sf_master-master/FreeCAD_sf_master-master/src/3rdParty/salomesmesh/src/SMDS/SMDS_MemoryLimit.cpp:32:25:
> error: sys/sysinfo.h: No such file or directory
>
> Guess it's linuxism.
>
> What is sysinfo.h called in freebsd?
FreeBSD has a sysinfo utility, see "man 8 sysinfo", which can
be obtained with the "sysinfo" package. But as far as I can see,
it's implemented via shell scripts. On Linux systems, sysinfo.h
is a system-level header file.
>From this file (example of a sysinfo.h file):
http://www.scs.stanford.edu/histar/src/pkg/uclibc/include/sys/sysinfo.h
More precisely: sysinfo.h is part of the GNU C library (glibc)
include files, where sysinfo() is a library function, not an
external program.
See for example:
http://www.informit.com/articles/article.aspx?p=23618&seqNum=15
Also see:
http://man7.org/linux/man-pages/man2/sysinfo.2.html
Let me quote: "This function is Linux-specific, and should not
be used in programs intended to be portable."
Summary: It's a Linuxism. :-)
But maybe you can "fake" the required functionality somehow through
FreeBSD's Linux ABI... There are also ports which seem to install
a sysinfo.h file (search for *.plist containing "sysinfo.h"), for
example devel/libgtop or lang/gnatdroid-sysroot. Maybe that's a
way to get the required files?
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list