Board index FlightGear Support Compiling

osg::GLExtensions has not been declared  Topic is solved

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

osg::GLExtensions has not been declared

Postby daveculp » Fri Oct 27, 2017 2:22 am

Yesterday and today's attempts to build using download_and_compile.sh fail when trying to compile CanvasWidget.cxx


Code: Select all
[ 50%] Building CXX object src/Main/CMakeFiles/fgfs.dir/__/GUI/CanvasWidget.cxx.o
/home/dave/FG/flightgear/src/GUI/CanvasWidget.cxx: In member function ‘virtual void CanvasWidget::draw(int, int)’:
/home/dave/FG/flightgear/src/GUI/CanvasWidget.cxx:201:3: error: ‘GLExtensions’ is not a member of ‘osg’
   osg::GLExtensions* extensions = osg::GLExtensions::Get(0, true);
   ^
/home/dave/FG/flightgear/src/GUI/CanvasWidget.cxx:201:22: error: ‘extensions’ was not declared in this scope
   osg::GLExtensions* extensions = osg::GLExtensions::Get(0, true);
                      ^
/home/dave/FG/flightgear/src/GUI/CanvasWidget.cxx:201:40: error: ‘osg::GLExtensions’ has not been declared
   osg::GLExtensions* extensions = osg::GLExtensions::Get(0, true);
                                        ^
src/Main/CMakeFiles/fgfs.dir/build.make:2302: recipe for target 'src/Main/CMakeFiles/fgfs.dir/__/GUI/CanvasWidget.cxx.o' failed
make[2]: *** [src/Main/CMakeFiles/fgfs.dir/__/GUI/CanvasWidget.cxx.o] Error 1
CMakeFiles/Makefile2:3318: recipe for target 'src/Main/CMakeFiles/fgfs.dir/all' failed
make[1]: *** [src/Main/CMakeFiles/fgfs.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Any ideas for a fix?

Dave
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: osg::GLExtensions has not been declared

Postby wkitty42 » Sat Oct 28, 2017 6:27 pm

it seems to be working fine for me, dave... what are your commit hashes?? mine are
Code: Select all
********** 2017-10-28 14:27:19 **********
********** Total elapsed update and compile time is 0 days 0 hours 5 minutes 19 seconds **********

PLib:    a542b8a03f8de1fe844af6ab4734b64d11e272e9
OSG 3.4: cf044027a7f1f124d7bae7e2d046fa2c05c8c0bc
Simgear: 880c063d0411400cf71a25e20695a17927cac3e9
FGFS:    86aaaf6de9a6e516ce04dd51be2dc011f2d06502
FGData:  f4acff53ee7562952069018dc823ce93d33c5dd2
FGAddon: r3067 | rleibner | 2017-10-28 10:24:06 -0400 (Sat, 28 Oct 2017)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4746
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: osg::GLExtensions has not been declared

Postby Hooray » Sun Oct 29, 2017 5:38 am

Note that this is unrelated to the Canvas system, it's probably just that someone is using OSG APIs without checking if they are available in your OSG version.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11186
Joined: Tue Mar 25, 2008 8:40 am

Re: osg::GLExtensions has not been declared  

Postby daveculp » Sun Nov 05, 2017 10:15 pm

I removed OSG from my system (Mint 18.2) then downloaded and built OSG 3.4.1 stable directly from the OSG site. I was then able to build FG successfully using download_and_compile.sh.

The OSG version on my system was 3.4.1, but apparently there was a difference.
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: osg::GLExtensions has not been declared

Postby wkitty42 » Mon Nov 06, 2017 3:59 am

you might want to mention that to the mint maintainers... regardless if you do or not, i'm glad you found a solution... i'm looking for them quite a lot lately...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4746
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: osg::GLExtensions has not been declared

Postby abassign » Mon Nov 06, 2017 1:21 pm

For Ubuntu or Linux Mint operating systems, but also with other derived Debian distributions, you can download an OpenSceneGraph 3.4 from source Ubuntu.
At this link I found this solution:

https://askubuntu.com/questions/823007/building-openscenegraph-3-4-from-source-ubuntu

And this is the step to do:

Code: Select all
sudo add-apt-repository ppa:openmw/openmw
sudo apt update
sudo apt install openscenegraph-3.4


All of this worked well and I finally managed to compile the programs.
I always use the script: download_and_compile.sh version (October 2017) on LinuxMint 18.2

I hope this note can be useful.
abassign
 
Posts: 737
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: osg::GLExtensions has not been declared

Postby wkitty42 » Mon Nov 06, 2017 3:16 pm

why use a PPA when the d&c script already has a method of acquiring OSG and keeping it up to date? it is quite easy, also, to adjust the script to use a different branch of OSG... that is what i did when i adjusted my local d&c to use OSG 3.4...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4746
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: osg::GLExtensions has not been declared

Postby abassign » Mon Nov 06, 2017 9:40 pm

wkitty42 wrote in Mon Nov 06, 2017 3:16 pm:why use a PPA when the d&c script already has a method of acquiring OSG and keeping it up to date? it is quite easy, also, to adjust the script to use a different branch of OSG... that is what i did when i adjusted my local d&c to use OSG 3.4...


... easy to respond ...

not work, the script s&c not install the OSG 3.4 because the Linux-Mint 18.2 is based on Ubuntu version 16.10 and the standard OSG is 3.2. The installer d&c found one OSG version that is not compatible to OSG 3.4 and stop the compilation.

:)
abassign
 
Posts: 737
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: osg::GLExtensions has not been declared

Postby wkitty42 » Tue Nov 07, 2017 2:15 am

ummm... no... the d&c script has a connection to the OSG repository... there is no install into the system's base layout... d&c builds OSG from the official OSG repository in the existing flightgear development tree where everything else related to flightgear is stored in their repos...

Code: Select all
myuser@mymachine:~/flightgear-dev/next/openscenegraph$ git branch
  OpenSceneGraph-3.2
* OpenSceneGraph-3.4
  master


as you can see, i've checked out the OpenSceneGraph-3.4 branch and am compiling my flightgear with that...
Last edited by wkitty42 on Sat Sep 08, 2018 1:06 pm, edited 1 time in total.
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4746
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: osg::GLExtensions has not been declared

Postby Hooray » Fri Dec 29, 2017 7:05 pm

Okay, I can now confirm that this is actually correct: FlightGear does no longer build with OSG 3.2.1 (i.e. Ubuntu LTS) - despite the commit logs suggesting that:

Code: Select all
/home/hooray/sources/flightgear/src/GUI/CanvasWidget.cxx: In member function ‘virtual void CanvasWidget::draw(int, int)’:
/home/hooray/sources/flightgear/src/GUI/CanvasWidget.cxx:203:5: error: ‘Extensions’ is not a member of ‘osg’
     osg::Extensions* extensions = osg::getExtensions(0, true);
     ^
/home/hooray/sources/flightgear/src/GUI/CanvasWidget.cxx:203:22: error: ‘extensions’ was not declared in this scope
     osg::Extensions* extensions = osg::getExtensions(0, true);
                      ^
/home/hooray/sources/flightgear/src/GUI/CanvasWidget.cxx:203:35: error: ‘getExtensions’ is not a member of ‘osg’
     osg::Extensions* extensions = osg::getExtensions(0, true);
                                   ^



you can work around the problem by including <osg/GLBlendFunc> and using BlendFunc::Extensions instead.

But it's not just the osg::GLExtensions changes, but also other changes made recently:

Code: Select all
/home/hooray/sources/flightgear/src/Viewer/PUICamera.cxx: In member function ‘void flightgear::PUICamera::init(osg::Group*)’:
/home/hooray/sources/flightgear/src/Viewer/PUICamera.cxx:291:22: error: ‘class osg::Geometry’ has no member named ‘setNodeMask’
     _fullScreenQuad->setNodeMask(SG_NODEMASK_GUI_BIT);
                      ^
/home/hooray/sources/flightgear/src/Viewer/PUICamera.cxx: In member function ‘void flightgear::PUICamera::resizeUi(int, int)’:
/home/hooray/sources/flightgear/src/Viewer/PUICamera.cxx:339:5: error: ‘resize’ is not a member of ‘osg::Camera’
     osg::Camera::resize(scaledWidth, scaledHeight);
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11186
Joined: Tue Mar 25, 2008 8:40 am

Re: osg::GLExtensions has not been declared

Postby hamzaalloush » Sat Dec 30, 2017 7:01 am

openmw osg had problems reported when compiled with FG, maybe it's specific to that system: viewtopic.php?f=37&t=31744&p=311673&hilit=openmw#p311673

Have you tried James osg fork? it's no PPA but i guess you might tweak to download with d&c, haven't tried in a while https://github.com/zakalawe/osg

/ot, abassign it might be the cause of your AA issues?
hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: osg::GLExtensions has not been declared

Postby Hooray » Sat Dec 30, 2017 10:04 am

I think they were discussing on the devel list making 3.4 a requirement - which seems more and more common lately, i.e. simply raising the required version number of a dependency to "deal" with such problems
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11186
Joined: Tue Mar 25, 2008 8:40 am

Re: osg::GLExtensions has not been declared

Postby rominet » Sun Dec 31, 2017 8:47 am

Yes, James mentioned big hurdles trying to fix the problem(s) with OSG 3.2, even asking on the OSG mailing-list where OSG 3.2 was apparently considered obsolete and essentially unsupported, so since most distros seem to offer OSG 3.4, it is likely to remain a requirement from now on. I can't say if this is the final word, but it seems plausible.

For old Ubuntu releases that don't have OSG 3.2, someone mentioned the fact that people who want a recent FG on these systems use Saikrishna's (“saiarcot”) PPA most of the times, and that backporting OSG 3.4 to such releases would be “trivial”. The backported packages could be shipped in the PPA. The only thing is that Saikrishna may not want to maintain an OSG backport forever, so he or she (don't know, sorry) needs to ensure that the backported packages can be smoothly replaced by official ones when upgrading to next Ubuntu releases. If the first of these future upgraded-to releases has OSG packages with the same names and higher versions, this should be automatic.
rominet
 
Posts: 550
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: osg::GLExtensions has not been declared

Postby Thorsten » Sun Dec 31, 2017 10:22 am

Yes, James mentioned big hurdles trying to fix the problem(s) with OSG 3.2


I'm not sure that's the right description as OSG 3.2 was (and is) running fine for pretty much all in-sim rendering and OSG 3.4 is in fact causing trouble with the OSGText feature - it's more like James wants to do some new (launcher-related?) stuff which seems easier with 3.4.

So I think 'raising dependency to solve problems' is not an unfair description.
Thorsten
 
Posts: 9993
Joined: Mon Nov 02, 2009 8:33 am

Re: osg::GLExtensions has not been declared

Postby rominet » Sun Dec 31, 2017 10:37 am

From James' message 1:
I’m struggling to fix the current issue with OSG 3.2, and the responses I’m getting on the OSG users list give me the feeling, they don’t have much interest in supporting it at all, for them it’s ancient history. So I’m wondering if we should finally say we require OSG 3.4.x.

From James' message 2:
Yeah I am aware of that balancing act, indeed. What’s prompted me to suggest this is not such much the particular software issue, but the response or really disinterest from the OSG user list - from their POV, OSG 3.4 is not ‘latest and greatest’, rather it’s the ‘long-standing and stable’, with OSG 3.2 being considered something out of support at this point.
rominet
 
Posts: 550
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Next

Return to Compiling

Who is online

Users browsing this forum: No registered users and 3 guests