Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2015 12:58:46 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Bernt Hansson <bah@bananmonarki.se>
Cc:        freeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: sysinfo.h
Message-ID:  <20150311125846.e1b7fdb5.freebsd@edvax.de>
In-Reply-To: <55002A42.4070608@bananmonarki.se>
References:  <55002A42.4070608@bananmonarki.se>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150311125846.e1b7fdb5.freebsd>