- Code: Select all
../fgmeta/download_and_compile.sh -an -pn -j3 --fg-cmake-arg=-DENABLE_QT=OFF PLIB OSG DATA SIMGEAR FGFS
Actually, I was using the above line every now and then, to refresh the whole install. Much more frequently it was a case of, for example
- Code: Select all
cd simgear
git pull
make
make install
But both approaches were working for a long time without issues (other than me sometimes forgetting to manually update FGData ).
Anyway, a couple of days ago I noticed two distinct problems (using DnC script):
1 - simgear compilation step fails, complaining that OSG is not found. I can get around that by first compiling OSG alone, and then exporting
- Code: Select all
$ export CMAKE_PREFIX_PATH=/opt/fg/compile/fg_next/install/openscenegraph
$ ../fgmeta/download_and_compile.sh -an -pn -j3 --fg-cmake-arg=-DENABLE_QT=OFF --sg-cmake-arg=-DENABLE_VIDEO_RECORD=OFF SIMGEAR
then simgear compilation finds OSG, but a second problem occurs:
2 - wrong include:
- Code: Select all
[ 5%] Building C object 3rdparty/expat/CMakeFiles/FGExpat.dir/xmltok.c.o
/opt/fg/compile/fg_next/simgear/3rdparty/expat/xmlparse.c:103:14: fatal error: sys/random.h: No such file or directory
103 | # include <sys/random.h> /* getrandom */
| ^~~~~~~~~~~~~~
compilation terminated.
'man getrandom' returns:
- Code: Select all
NAME
getrandom - obtain a series of random bytes
SYNOPSIS
#include <linux/random.h>
int getrandom(void *buf, size_t buflen, unsigned int flags);
and the random.h is indeed located on my system in /usr/include/linux/random.h
but patching the simgear/3rdparty/expat/xmlparse.c with new location will make compilation fail later, at linking stage.
So both issues seem to point to a problem with the configuration step by cmake?