Board index FlightGear Support Compiling

osg::GLExtensions has not been declared  Topic is solved

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

Re: osg::GLExtensions has not been declared

Postby Hooray » Sun Dec 31, 2017 4:30 pm

My impression here is that most of the frustration is due to people not using any HiDPI/Qt5 functionality, still being affected by attempts to make it work, despite not even linking it in - thus, the troubleshooting part is actually not obvious to people not closely following the devel list and commit logs - and I can relate to that, despite being able to revert the offending commits.

Besides, the change was announced and introduced as being a "no-op", and the talks/commit logs later on could also make people believe that the problem is actually sorted - which does not seem to be the case.

Anyway, being able to exclude PUI from the compilation would indeed be useful - if only for benchmarking/regression testing purposes (think effect/glsl issues that are attributed to PUI incompatibilities) - just like it would be good to be able to disable Nasal scripting altogether for pretty much the same reasons: http://wiki.flightgear.org/Howto:Disable_Nasal_entirely

Thus, I really don't think that the motivation here is unreasonable :D
But like Thorsten said, adding/raising required libs is generally something to be handled carefully.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: osg::GLExtensions has not been declared

Postby rominet » Sun Dec 31, 2017 5:55 pm

@Thorsten:

You seem to be of the opinion that the technical dependency on OSG 3.4+ was introduced for no good reason. I doubt this is the case, but feel free to discuss it with James, since he committed the changes in question.

Assuming there is a good technical reason to use an OSG 3.4 API, then your argument involving a Fortan lib is easily addressed: if either JSBSim or Yasim required a Fortran library to do their work better or simply to make the life of the JSBSim/Yasim maintainer(s) easier, I would be quite happy to spend some time installing that library.

@Thorsten and Hooray:

I am sad to see your frustration, but two solutions have been given here that don't require upgrading or changing the operating system (you may dislike them, but at least one of them is relatively clean). I'm afraid I have said everything I had to say on the matter, so the discussion is over for me. I'm not sure pursuing it here is going to be very fruitful, but you are certainly free to do it. :)
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: osg::GLExtensions has not been declared

Postby Hooray » Sun Dec 31, 2017 6:08 pm

I doubt that it makes much sense to make this specific to the people participating in this thread - the same issue has been raised on the devel list, and the "technical reason", too - I suppose, Thorsten is aware of everything, he participated in the discussion: https://sourceforge.net/p/flightgear/ma ... sg36167335

As far as I am concerned, at least for the time being, there is obviously no other technical reason whatsoever, because fgfs builds (and works) properly without the corresponding changes - and like I said, I never doubted that being able to exclude PUI form the build would be a worthwhile thing to do.

Nevertheless, the postings history on the forum (and the devel list archives) speaks for itself, we're approaching a situation where people literally need to be experienced C++ developers familiar with using git and building sg/fg from source to be able to build fgfs without the latest shebang of features that are intended to remain optional.

And that applies even if this particular issue should turn out to be a temporary regression that will be fixed within a few weeks time.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: osg::GLExtensions has not been declared

Postby Thorsten » Sun Dec 31, 2017 8:08 pm

You seem to be of the opinion that the technical dependency on OSG 3.4+ was introduced for no good reason.


I'm a moderately complex human being, and I'm capable of making a distinction in judging the result of a decision and the way it came to pass.

For instance, I would personally be much more comfy with FGAddon being a GIT repository and have always argued that way, but I approve of the way the decision in favour of SVN was made in a long discussion where everyone was heard and hence I support it.

In the event, I have stated a few times that I don't have enough information to judge whether the dependency on 3.4 was introduced for a good reason or not (and that I would dearly like to have that information and the discussion) - but I strongly disapprove of the way the issue appeared on the list and was presented by you here.

I would think it fair procedure to revert all commits accidentially introducing the dependency till a discussion and a decision in favour was made - regardless of whether I am ultimately in favour or not.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: osg::GLExtensions has not been declared

Postby swroop » Sun Jan 21, 2018 1:14 pm

I tried compiling flightgear on Ubuntu 16.04.3 LTS from a cloned GIT repository today and I got the following error message:

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

I have the latest version of OpenSceneGraph 3.4.1 installed. I checked it with osgversion. Please let me know what am I missing in order to compile successfully.
swroop
 
Posts: 5
Joined: Sun Jan 21, 2018 1:05 pm

Re: osg::GLExtensions has not been declared

Postby rominet » Sun Jan 21, 2018 1:36 pm

Hello swroop, welcome to the forum. :wink:

Presumably, FG is being compiled against another version of OSG. By passing -DCMAKE_VERBOSE_MAKEFILE=1 on your cmake commands, you can then watch the -I options passed to g++ to see whether they point to what you want to use. If you've already run CMake, you can run
Code: Select all
make VERBOSE=1

inside the build directories (SG & FG) for the same result.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: osg::GLExtensions has not been declared

Postby swroop » Sun Jan 21, 2018 3:42 pm

I tried something else, in CanvasWidget.cxx, I commented out the check for "less than OSG 3.4.0" as follows:

Code: Select all
//#if OSG_VERSION_LESS_THAN(3,4,0)
    //osg::Extensions* extensions = osg::getExtensions(0, true);
//#else
    osg::GLExtensions* extensions = osg::GLExtensions::Get(0, true);
//#endif


Hence I use osg::GLExtensions::Get() instead of osg::getExtensions()

But, I get the following error message:

Code: Select all
home/lionking/fgsrc/flightgear/src/GUI/CanvasWidget.cxx:203:5: error: ‘GLExtensions’ is not a member of ‘osg’
     osg::GLExtensions* extensions = osg::GLExtensions::Get(0, true);
     ^
/home/lionking/fgsrc/flightgear/src/GUI/CanvasWidget.cxx:203:24: error: ‘extensions’ was not declared in this scope
     osg::GLExtensions* extensions = osg::GLExtensions::Get(0, true);
                        ^
/home/lionking/fgsrc/flightgear/src/GUI/CanvasWidget.cxx:203:42: error: ‘osg::GLExtensions’ has not been declared
     osg::GLExtensions* extensions = osg::GLExtensions::Get(0, true);


Please let me know what is wrong with what I am doing...

Thanks!
swroop
 
Posts: 5
Joined: Sun Jan 21, 2018 1:05 pm

Re: osg::GLExtensions has not been declared

Postby rominet » Sun Jan 21, 2018 4:18 pm

The code you are trying to compile wants to use osg::GLExtensions::Get(), but that doesn't mean the osg::GLExtensions class is available in the include paths your compiler has been told to use, hence the error messages. Such include paths are set with the gcc/g++ -I option, that is why I told you how to examine the values passed for this option when the problematic file(s) is/are compiled (at least flightgear/src/GUI/CanvasWidget.cxx). If you don't want or don't know how to do that, I'd suggest to use the download_and_compile.sh script instead. Pass it the arguments SIMGEAR FGFS DATA OSG as in:
Code: Select all
download_and_compile.sh SIMGEAR FGFS DATA OSG

and it will download and build OSG 3.4 for you.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: osg::GLExtensions has not been declared

Postby wkitty42 » Sun Jan 21, 2018 4:54 pm

FWIW: additionally, when the d&c script pulls the OSG repo, it will be building OSG v3.4.2...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: osg::GLExtensions has not been declared

Postby swroop » Tue Jan 23, 2018 3:28 am

After some hiccups, I was finally able to build and run FGFS. Thanks a lot for the quick reply. :D
swroop
 
Posts: 5
Joined: Sun Jan 21, 2018 1:05 pm

Re: osg::GLExtensions has not been declared

Postby rominet » Tue Jan 23, 2018 8:22 am

Glad to hear that, swroop. :)
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: osg::GLExtensions has not been declared

Postby yanes » Fri Feb 16, 2018 3:20 am

I just cloned the 2017.04 from github and got the same compile error ,
But even after adding the openmw ppa, updating apt repos and installing the osg 3.4.1+dfsg1 , I still have the compiling issue ,
my machine runs Ubuntu 16.04 LTS , every thing updated ,
What to do now in order to build my fgfs ?

BTW : I want to set a different user Dir for settings and cache , can anyone please tell me where this string is hard-coded in order to change some chars & keep my official repos version safe ?
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: osg::GLExtensions has not been declared

Postby wkitty42 » Fri Feb 16, 2018 5:41 am

are you using the download_and_compile.sh script? if so, simply add OSG to your build options so that it downloads the OSG repo and builds that to be used for building your FGFS...

this is what i'm currently building with...
CFLAGS="-march=native" CPPFLAGS="-march=native" /home/myuser/flightgear-dev/dnc.sh -p n -j 8 -b RelWithDebInfo PLIB OSG SIMGEAR FGFS DATA

i normally build with this...
CFLAGS="-march=native" CPPFLAGS="-march=native" /home/myuser/flightgear-dev/dnc.sh -p n -j 8 -b Debug PLIB OSG SIMGEAR FGFS DATA

the problem is that the OSG that ubuntu is releasing does not have the GLExtensions compiled in... so you have to build OSG yourself to get all of it...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: osg::GLExtensions has not been declared

Postby yanes » Fri Feb 16, 2018 5:09 pm

I usually prefer to do things manually , I dont like automated ways to do things ,
so when compiling with cmake manually what are the directives to add to my commands ?

EDIT:

It compiled correctly after getting openscenegraph-3.4 bins and -dev packages from the openmw ppa & removing the official 3.2 versions from my system ,
I think you are good to go , guys with the new libs as requirements with the condition of providing the right informations about the new deps (since this step should take place today or in the future ).
That's just a user's opinion (I dont claim any comptence in c++ developpement or even cmake expertise ) :wink:

Thanks for your help .
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: osg::GLExtensions has not been declared

Postby wkitty42 » Fri Feb 16, 2018 8:29 pm

i don't know anything about cmake... thar be dragons in thar :mrgreen:

i don't know what that PPA is that you are using... i'm pulling the OSG code directly from the OSG git repo and compiling it here... the ONLY PPA i'm using for building FG is one that i found that provides the Qt stuff that Ubuntu 16.04.5 doesn't have access to... i have that Qt stuff in /opt/ and point the d&c script to it in my modifications...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

PreviousNext

Return to Compiling

Who is online

Users browsing this forum: No registered users and 3 guests