Board index FlightGear Support Compiling

SimGear fails with OSG 3.6.3

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

SimGear fails with OSG 3.6.3

Postby Darkriser » Thu Oct 25, 2018 2:45 pm

On Arch Linux, the compilation of SimGear fails (see below for log) with newest OpenSceneGraph (ver. 3.6.3).
However, when I downgrade the openscenegraph package from 3.6.3-1 to 3.4.1-4, SimGear compiles perfectly.
I use git branch 'next' of SimGear and FlightGear, pulled today.

Here are the errors from compilation:
Code: Select all
..../simgear/canvas/elements/CanvasText.cxx:74:12: error: ‘void simgear::canvas::Text::TextOSG::computePositions(unsigned int) const’ marked ‘override’, but does not override
       void computePositions(unsigned int contextID) const override;
            ^~~~~~~~~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx: In constructor ‘simgear::canvas::TextLine::TextLine(size_t, const simgear::canvas::Text::TextOSG*)’:
..../simgear/canvas/elements/CanvasText.cxx:125:17: error: ‘LineNumbers’ is not a member of ‘simgear::canvas::TextLine::GlyphQuads’ {aka ‘osgText::Text::GlyphQuads’}
     GlyphQuads::LineNumbers const& line_numbers = _quads->_lineNumbers;
                 ^~~~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:126:17: error: ‘osgText::Text::GlyphQuads::LineNumbers’ has not been declared
     GlyphQuads::LineNumbers::const_iterator begin_it =
                 ^~~~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:129:9: error: ‘begin_it’ was not declared in this scope
     if( begin_it == line_numbers.end() || *begin_it != _line )
         ^~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:129:9: note: suggested alternative: ‘_begin’
     if( begin_it == line_numbers.end() || *begin_it != _line )
         ^~~~~~~~
         _begin
..../simgear/canvas/elements/CanvasText.cxx:129:21: error: ‘line_numbers’ was not declared in this scope
     if( begin_it == line_numbers.end() || *begin_it != _line )
                     ^~~~~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:133:14: error: ‘begin_it’ was not declared in this scope
     _begin = begin_it - line_numbers.begin();
              ^~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:133:14: note: suggested alternative: ‘_begin’
     _begin = begin_it - line_numbers.begin();
              ^~~~~~~~
              _begin
..../simgear/canvas/elements/CanvasText.cxx:133:25: error: ‘line_numbers’ was not declared in this scope
     _begin = begin_it - line_numbers.begin();
                         ^~~~~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx: In member function ‘osg::Vec2 simgear::canvas::TextLine::cursorPos(size_t) const’:
..../simgear/canvas/elements/CanvasText.cxx:167:17: error: ‘Coords2’ is not a member of ‘simgear::canvas::TextLine::GlyphQuads’ {aka ‘osgText::Text::GlyphQuads’}
     GlyphQuads::Coords2 refCoords = _quads->_coords;
                 ^~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:168:17: error: ‘osgText::Text::GlyphQuads::Coords2’ has not been declared
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                 ^~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:168:40: error: ‘coords’ was not declared in this scope
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                        ^~~~~~
..../simgear/canvas/elements/CanvasText.cxx:168:40: note: suggested alternative: ‘cross’
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                        ^~~~~~
                                        cross
..../simgear/canvas/elements/CanvasText.cxx:168:50: error: ‘refCoords’ was not declared in this scope
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                                  ^~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:168:50: note: suggested alternative: ‘glTexCoord4s’
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                                  ^~~~~~~~~
                                                  glTexCoord4s
..../simgear/canvas/elements/CanvasText.cxx:184:21: error: ‘prev_r’ was not declared in this scope
       if( prev_l == prev_r )
                     ^~~~~~
..../simgear/canvas/elements/CanvasText.cxx:184:21: note: suggested alternative: ‘prev_l’
       if( prev_l == prev_r )
                     ^~~~~~
                     prev_l
..../simgear/canvas/elements/CanvasText.cxx:187:19: error: ‘cur_l’ was not declared in this scope
         pos.x() = cur_l;
                   ^~~~~
..../simgear/canvas/elements/CanvasText.cxx:187:19: note: suggested alternative: ‘cbrtl’
         pos.x() = cur_l;
                   ^~~~~
                   cbrtl
..../simgear/canvas/elements/CanvasText.cxx:190:35: error: ‘cur_l’ was not declared in this scope
         pos.x() = 0.5 * (prev_r + cur_l);
                                   ^~~~~
..../simgear/canvas/elements/CanvasText.cxx:190:35: note: suggested alternative: ‘cbrtl’
         pos.x() = 0.5 * (prev_r + cur_l);
                                   ^~~~~
                                   cbrtl
..../simgear/canvas/elements/CanvasText.cxx: In member function ‘osg::Vec2 simgear::canvas::TextLine::nearestCursor(float) const’:
..../simgear/canvas/elements/CanvasText.cxx:206:17: error: ‘Coords2’ is not a member of ‘simgear::canvas::TextLine::GlyphQuads’ {aka ‘osgText::Text::GlyphQuads’}
     GlyphQuads::Coords2 refCoords = _quads->_coords;
                 ^~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:207:17: error: ‘osgText::Text::GlyphQuads::Coords2’ has not been declared
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                 ^~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:207:40: error: ‘coords’ was not declared in this scope
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                        ^~~~~~
..../simgear/canvas/elements/CanvasText.cxx:207:40: note: suggested alternative: ‘cross’
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                        ^~~~~~
                                        cross
..../simgear/canvas/elements/CanvasText.cxx:207:50: error: ‘refCoords’ was not declared in this scope
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                                  ^~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:207:50: note: suggested alternative: ‘glTexCoord4s’
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                                  ^~~~~~~~~
                                                  glTexCoord4s
..../simgear/canvas/elements/CanvasText.cxx: In member function ‘void simgear::canvas::Text::TextOSG::computePositions(unsigned int) const’:
..../simgear/canvas/elements/CanvasText.cxx:647:55: error: no matching function for call to ‘simgear::canvas::Text::TextOSG::computePositions(unsigned int&) const’
       return osgText::Text::computePositions(contextID);
                                                       ^
In file included from /usr/include/osgText/Text:21,
                 from ..../simgear/canvas/elements/CanvasText.hxx:24,
                 from ..../simgear/canvas/elements/CanvasText.cxx:22:
/usr/include/osgText/TextBase:302:10: note: candidate: ‘void osgText::TextBase::computePositions()’
     void computePositions();
          ^~~~~~~~~~~~~~~~
/usr/include/osgText/TextBase:302:10: note:   candidate expects 0 arguments, 1 provided
..../simgear/canvas/elements/CanvasText.cxx:647:55: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
       return osgText::Text::computePositions(contextID);
                                                       ^
..../simgear/canvas/elements/CanvasText.cxx:657:17: error: ‘Coords2’ is not a member of ‘osgText::Text::GlyphQuads’
     GlyphQuads::Coords2 refCoords = quads._coords;
                 ^~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:658:17: error: ‘osgText::Text::GlyphQuads::Coords2’ has not been declared
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                 ^~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:658:40: error: ‘coords’ was not declared in this scope
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                        ^~~~~~
..../simgear/canvas/elements/CanvasText.cxx:658:40: note: suggested alternative: ‘_coords’
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                        ^~~~~~
                                        _coords
..../simgear/canvas/elements/CanvasText.cxx:658:50: error: ‘refCoords’ was not declared in this scope
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                                  ^~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:658:50: note: suggested alternative: ‘getCoords’
     GlyphQuads::Coords2::element_type &coords = *refCoords.get();
                                                  ^~~~~~~~~
                                                  getCoords
..../simgear/canvas/elements/CanvasText.cxx:661:23: error: ‘LineNumbers’ in ‘struct osgText::Text::GlyphQuads’ does not name a type
     const GlyphQuads::LineNumbers& line_numbers = quads._lineNumbers;
                       ^~~~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:670:37: error: ‘line_numbers’ was not declared in this scope
       bool first_char = cur_line != line_numbers[i];
                                     ^~~~~~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:690:38: error: invalid operands of types ‘std::ios_base&(std::ios_base&)’ and ‘float’ to binary ‘operator-’
         float margin = 0.5f * (right - left - width),
                                ~~~~~~^~~~~~
..../simgear/canvas/elements/CanvasText.cxx:690:47: error: ‘width’ was not declared in this scope
         float margin = 0.5f * (right - left - width),
                                               ^~~~~
..../simgear/canvas/elements/CanvasText.cxx:690:47: note: suggested alternative: ‘wcwidth’
         float margin = 0.5f * (right - left - width),
                                               ^~~~~
                                               wcwidth
..../simgear/canvas/elements/CanvasText.cxx:696:32: error: ‘cursor_x’ was not declared in this scope
           if( cur_line == 0 || cursor_x < _textBB._min.x() )
                                ^~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:696:32: note: suggested alternative: ‘error_t’
           if( cur_line == 0 || cursor_x < _textBB._min.x() )
                                ^~~~~~~~
                                error_t
..../simgear/canvas/elements/CanvasText.cxx:702:28: error: ‘cursor_x’ was not declared in this scope
           float cursor_w = cursor_x + glyphs[i]->getHorizontalAdvance() * wr;
                            ^~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:702:28: note: suggested alternative: ‘cursor_w’
           float cursor_w = cursor_x + glyphs[i]->getHorizontalAdvance() * wr;
                            ^~~~~~~~
                            cursor_w
..../simgear/canvas/elements/CanvasText.cxx:705:32: error: lvalue required as left operand of assignment
             _textBB._max.x() = cursor_w;
                                ^~~~~~~~
..../simgear/canvas/elements/CanvasText.cxx:690:15: warning: unused variable ‘margin’ [-Wunused-variable]
         float margin = 0.5f * (right - left - width),
               ^~~~~~
..../simgear/canvas/elements/CanvasText.cxx:710:53: error: no matching function for call to ‘simgear::canvas::Text::TextOSG::computePositions(unsigned int&) const’
     return osgText::Text::computePositions(contextID);
                                                     ^
In file included from /usr/include/osgText/Text:21,
                 from ..../simgear/canvas/elements/CanvasText.hxx:24,
                 from ..../simgear/canvas/elements/CanvasText.cxx:22:
/usr/include/osgText/TextBase:302:10: note: candidate: ‘void osgText::TextBase::computePositions()’
     void computePositions();
          ^~~~~~~~~~~~~~~~
/usr/include/osgText/TextBase:302:10: note:   candidate expects 0 arguments, 1 provided
..../simgear/canvas/elements/CanvasText.cxx:710:53: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
     return osgText::Text::computePositions(contextID);
                                                     ^
make[2]: *** [simgear/CMakeFiles/SimGearScene.dir/build.make:271: simgear/CMakeFiles/SimGearScene.dir/canvas/elements/CanvasText.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:253: simgear/CMakeFiles/SimGearScene.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Darkriser
 
Posts: 64
Joined: Wed Dec 28, 2016 12:27 pm
Location: LZIB
Version: next
OS: Arch Linux

Re: SimGear fails with OSG 3.6.3

Postby legoboyvdlp » Thu Oct 25, 2018 2:49 pm

Hi,
We don't yet support OSG 3.6 - I think the maximum is 3.4.
Regards,
Jonathan
User avatar
legoboyvdlp
 
Posts: 6939
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: SimGear fails with OSG 3.6.3

Postby Darkriser » Thu Oct 25, 2018 3:22 pm

Good to know, thanks....any documentation about this so I can watch for changes?
The only restriction I found on wiki is
Code: Select all
people may have to build using at least OSG 3.4 due to


You know, when CMake was happy telling me
Code: Select all
(found suitable version "3.6.3", minimum required is "3.2.0")

I was happy too...

And I didn't expect that a minor version change (from 3.4 to 3.6) could break the backward compatibility....
Well, developers say "never assume"....and they are correct...
Darkriser
 
Posts: 64
Joined: Wed Dec 28, 2016 12:27 pm
Location: LZIB
Version: next
OS: Arch Linux

Re: SimGear fails with OSG 3.6.3

Postby wkitty42 » Fri Oct 26, 2018 12:47 am

it isn't that minor, really... 3.5, when it was being worked on, also tossed some spanners into the works... the dev team is very aware of the need to make some changes to support newer versions of some libraries but there's not enough time or people with interest in those areas to do the work... volunteers and patches are generally welcome... check into the dev mailing list to see what needs to be worked on... mailing list links are at the top of the pages on these forums ;)
"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: 5577
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: SimGear fails with OSG 3.6.3

Postby Hooray » Sat Oct 27, 2018 6:08 pm

I'd suggest to share your build errors via the issue tracker
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: SimGear fails with OSG 3.6.3

Postby Richard » Mon Oct 29, 2018 10:27 am

Darkriser wrote in Thu Oct 25, 2018 3:22 pm:Good to know, thanks....any documentation about this so I can watch for changes?

And I didn't expect that a minor version change (from 3.4 to 3.6) could break the backward compatibility....


1. Join the dev list https://sourceforge.net/projects/flight ... gear-devel and read the archive to see what's happening.

2. I've built against 3.6; it took me 20 mins to fixup the compile errors; however be aware that I'm experiencing unpleasant rendering effects which are related to higher quality rendering (higher shader levels); this could be some of the other experimental things I've been doing with OSG/FG/SG or it could just be that something changed in 3.6 that affects the way we do shadering.

The way that OSG uses version numbers means that the .4 isn't a minor version number; generally there are years of work between the 3.x releases. 3.4 was released 2015 and 3.6 in 2018.

My advice is to checkout the from 3.4.1 release tag and build using that.
Richard
 
Posts: 700
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: SimGear fails with OSG 3.6.3

Postby wkitty42 » Mon Oct 29, 2018 1:32 pm

3.4.1 or 3.4.2? i'm building 3.4.2 from the OpenSceneGraph-3.4 branch on the OSG git repo... admittedly, though, i do not know what their branches and tags are offhand...
"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: 5577
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: SimGear fails with OSG 3.6.3

Postby eatdirt » Sat Mar 30, 2019 2:19 pm

Landed on this thread from the same reason, with simgear-2018.3.2. But, I am also getting compilation failures with openscenegraph-3.4.0, and README.OSG in the source file only claim that it is necessary to have OSG > 3.0.0. That does not help to know what version is actually needed :)

Edit: OSG version 3.4.1 works though.

cheers,
Chris.
Last edited by eatdirt on Sat Mar 30, 2019 7:58 pm, edited 1 time in total.
eatdirt
 
Posts: 346
Joined: Wed Aug 15, 2018 2:06 pm

Re: SimGear fails with OSG 3.6.3

Postby wkitty42 » Sat Mar 30, 2019 4:55 pm

build with OSG 3.4.2... the readme files have obviously not been updated properly...
"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: 5577
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest