Board index FlightGear Support Compiling

Simgear v 2019.2.0 : build failed

Building FlightGear from source, and in the need for help?

Simgear v 2019.2.0 : build failed

Postby yanes » Tue Dec 03, 2019 9:08 pm

Hi ,
I'm trying to compile/build flightgear on Ubuntu 18.04 ,
The SimGear build failed at : ""[ 62%] Building CXX object simgear/CMakeFiles/SimGearScene.dir/scene/tgdb/ReaderWriterSTG.cxx.o"".
log
Code: Select all
[ 62%] Building CXX object simgear/CMakeFiles/SimGearScene.dir/scene/tgdb/ReaderWriterSTG.cxx.o
In file included from /home/yanes/Documents/fg-source/flightgear-simgear/simgear/scene/tgdb/ReaderWriterSTG.cxx:54:0:
/home/yanes/Documents/fg-source/flightgear-simgear/simgear/scene/tgdb/SGBuildingBin.hxx:38:10: fatal error: osg/VertexAttribDivisor: No such file or directory
 #include <osg/VertexAttribDivisor>
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
simgear/CMakeFiles/SimGearScene.dir/build.make:2246: recipe for target 'simgear/CMakeFiles/SimGearScene.dir/scene/tgdb/ReaderWriterSTG.cxx.o' failed
make[2]: *** [simgear/CMakeFiles/SimGearScene.dir/scene/tgdb/ReaderWriterSTG.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:1146: recipe for target 'simgear/CMakeFiles/SimGearScene.dir/all' failed
make[1]: *** [simgear/CMakeFiles/SimGearScene.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2


I dont have any previous experience with cmake ,
can anyone help me with this ?

Thanks in advance ,
Yanes Bechir
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Simgear v 2019.2.0 : build failed

Postby icecode » Tue Dec 03, 2019 9:33 pm

Which version of OSG are you using?
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Simgear v 2019.2.0 : build failed

Postby yanes » Tue Dec 03, 2019 10:42 pm

Thanks for your reply
In my package manager I can see :

openscenegraph-3.4 (3.4.1+dfsg1-3)
libopenscenegraph-dev 3.2 (3.2.3+dfsg1-2ubuntu8)

interesting !!
the dev package is still at 3.2 ,

I think I have to update the the dev package to 3.4
thanks again for your interest
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Simgear v 2019.2.0 : build failed

Postby yanes » Tue Dec 03, 2019 11:00 pm

Thanks ,@Icecode GL it worked ,

however , when compiling fg it raises another error :
""fatal error: GL/glew.h: No such file or directory
#include <GL/glew.h> // Must be included before <GL/gl.h>""
Here's the log :
Code: Select all
Scanning dependencies of target fgpanel
[ 15%] Building CXX object utils/fgpanel/CMakeFiles/fgpanel.dir/main.cxx.o
In file included from /home/yanes/Documents/fg-source/flightgear-flightgear/utils/fgpanel/FGDummyTextureLoader.hxx:23:0,
                 from /home/yanes/Documents/fg-source/flightgear-flightgear/utils/fgpanel/FGCroppedTexture.hxx:24,
                 from /home/yanes/Documents/fg-source/flightgear-flightgear/utils/fgpanel/FGPanel.hxx:37,
                 from /home/yanes/Documents/fg-source/flightgear-flightgear/utils/fgpanel/FGPanelApplication.hxx:24,
                 from /home/yanes/Documents/fg-source/flightgear-flightgear/utils/fgpanel/main.cxx:18:
/home/yanes/Documents/fg-source/flightgear-flightgear/utils/fgpanel/FGTextureLoaderInterface.hxx:28:10: fatal error: GL/glew.h: No such file or directory
 #include <GL/glew.h> // Must be included before <GL/gl.h>
          ^~~~~~~~~~~
compilation terminated.
utils/fgpanel/CMakeFiles/fgpanel.dir/build.make:62: recipe for target 'utils/fgpanel/CMakeFiles/fgpanel.dir/main.cxx.o' failed
make[2]: *** [utils/fgpanel/CMakeFiles/fgpanel.dir/main.cxx.o] Error 1
CMakeFiles/Makefile2:683: recipe for target 'utils/fgpanel/CMakeFiles/fgpanel.dir/all' failed
make[1]: *** [utils/fgpanel/CMakeFiles/fgpanel.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 15%] Linking CXX executable fgelev
[ 15%] Built target fgelev
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

Am I missing something ?

Thanks in advance

Yanes Bechir
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Simgear v 2019.2.0 : build failed

Postby slawekmikula » Wed Dec 04, 2019 12:03 am

yanes wrote in Tue Dec 03, 2019 11:00 pm:however , when compiling fg it raises another error :
""fatal error: GL/glew.h: No such file or directory
#include <GL/glew.h> // Must be included before <GL/gl.h>""


Missing -dev package. When something like this arises and you don't know in which packages it is look into : https://packages.ubuntu.com/ then "Search contents of packages", select distro and provide file glew.h. Result https://packages.ubuntu.com/search?sear ... o&arch=any. I suppose you are missing libglew-dev package :)
slawekmikula
 
Posts: 128
Joined: Sun Feb 19, 2017 10:31 am

Re: Simgear v 2019.2.0 : build failed

Postby yanes » Wed Dec 04, 2019 1:02 pm

slawekmikula wrote in Wed Dec 04, 2019 12:03 am:Missing -dev package. When something like this arises and you don't know in which packages it is look into : https://packages.ubuntu.com/ then "Search contents of packages", select distro and provide file glew.h. Result https://packages.ubuntu.com/search?sear ... o&arch=any.

Thanks , you really saved my day ,
good hint for headers hunt ! :D :D
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Simgear v 2019.2.0 : build failed

Postby yanes » Wed Dec 04, 2019 1:26 pm

Strange ??!

Code: Select all
fg-source/fg-install/bin$ ./fgfs
    0.00 [INFO]:general    FlightGear:  Version 2019.2.0
    0.00 [INFO]:general    FlightGear:  Build Type Dev
    0.00 [INFO]:general    Built with GNU C++ version 7.4
    0.00 [INFO]:general    Jenkins number/ID 0:none
    0.00 [INFO]:general    platform default fg_root = Path "/lib/FlightGear"
FATAL: Required data files not found, please check your installation.
( Looking for base-package files at: '/lib/FlightGear')
    0.00 [WARN]:general    SGSubsystemMgr::remove: not found: scenery


is it looking for fgdata here ??
In '/lib/FlightGear' ??
It worked after I copied FGDATA to the specified path , Also fg was built without QT support
Code: Select all
   0.00 [INFO]:general    FlightGear:  Version 2019.2.0
    0.00 [INFO]:general    FlightGear:  Build Type Dev
    0.00 [INFO]:general    Built with GNU C++ version 7.4
    0.00 [INFO]:general    Jenkins number/ID 0:none
    0.00 [INFO]:general    platform default fg_root = Path "/lib/FlightGear"
    0.00 [INFO]:general    Reading global defaults
    0.03 [INFO]:input      Reading user settings from Path "/home/yanes/._fgfs/autosave_2019_2.xml"
    0.03 [ALRT]:general   
!Launcher requested, but FlightGear was compiled without Qt support!                                  <==============xx

    0.03 [INFO]:general    init package root at:Path "/home/yanes/._fgfs/Aircraft"
    0.03 [INFO]:input      No user specified aircraft, using default
    0.03 [INFO]:general    Loading aircraft -set file from:Path "/lib/FlightGear/Aircraft/c172p/c172p-set.xml"

Note : I changed nothing into the source , nor cmake scripts , and fg 2019.1.1 installed from Saraicot PPA works fine !
Please help !!
"MayBe" this is a normal behaviour since it should ask for the proper path with a qt5 dialog , which is not supported in this resulted build .
Please help me restore the qt support !
thanks in advance
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Simgear v 2019.2.0 : build failed

Postby FlugHund » Wed Dec 04, 2019 2:51 pm

A list of packages for Debian/Devuan: http://wiki.flightgear.org/Building_Fli ... eparations
There are some qt5 related packages listed which are required for the launcher. Names should be the same or at least very similar, on ubuntu.

The default path for fgdata ($FG_ROOT) is $prefix/share/fgdata/
To specify it at startup use: --fg-root=enter_path_here
To specify it when building use: -D FG_DATA_DIR:PATH="enter_path_here"
User avatar
FlugHund
 
Posts: 568
Joined: Thu Mar 01, 2007 4:27 pm
Location: Inside ground effect
Callsign: D-HUND
IRC name: D-HUND / debdog
Version: next
OS: Devuan


Return to Compiling

Who is online

Users browsing this forum: No registered users and 5 guests