[ 56%] Building CXX object simgear/CMakeFiles/SimGearScene.dir/canvas/elements/CanvasText.cxx.o
cd /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1_build/simgear && /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DHAVE_INTTYPES_H -DSimGearScene_EXPORTS -I/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1 -I/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1_build/simgear -I/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1_build -I/usr/include/AL -I/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/ShivaVG/include -I/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/3rdparty/utf8/source -DNDEBUG -march=native -mtune=native -O2 -pipe -Wall -Wno-unused-local-typedefs -DBOOST_BIMAP_DISABLE_SERIALIZATION -fPIC -std=gnu++11 -o CMakeFiles/SimGearScene.dir/canvas/elements/CanvasText.cxx.o -c /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.cxx
/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.cxx: In member function ‘SGVec2i simgear::canvas::Text::TextOSG::sizeForWidth(int) const’:
/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.cxx:501:73: error: no matching function for call to ‘osgText::Font::getKerning(unsigned int&, unsigned int&, const osgText::KerningType&)’
_kerningType ) );
^
In file included from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/canvas_fwd.hxx:26:0,
from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasElement.hxx:23,
from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.hxx:22,
from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.cxx:19:
/usr/include/osgText/Font:97:23: note: candidate: virtual osg::Vec2 osgText::Font::getKerning(const FontResolution&, unsigned int, unsigned int, osgText::KerningType)
virtual osg::Vec2 getKerning(const FontResolution& fontRes, unsigned int le
^
/usr/include/osgText/Font:97:23: note: candidate expects 4 arguments, 3 provided
/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.cxx:510:73: error: no matching function for call to ‘osgText::Font::getKerning(unsigned int&, unsigned int&, const osgText::KerningType&)’
_kerningType ) );
^
In file included from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/canvas_fwd.hxx:26:0,
from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasElement.hxx:23,
from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.hxx:22,
from /var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1/simgear/canvas/elements/CanvasText.cxx:19:
/usr/include/osgText/Font:97:23: note: candidate: virtual osg::Vec2 osgText::Font::getKerning(const FontResolution&, unsigned int, unsigned int, osgText::KerningType)
virtual osg::Vec2 getKerning(const FontResolution& fontRes, unsigned int le
^
/usr/include/osgText/Font:97:23: note: candidate expects 4 arguments, 3 provided
make[2]: *** [simgear/CMakeFiles/SimGearScene.dir/build.make:447: simgear/CMakeFiles/SimGearScene.dir/canvas/elements/CanvasText.cxx.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1_build'
make[1]: *** [CMakeFiles/Makefile2:258: simgear/CMakeFiles/SimGearScene.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-games/simgear-2017.1.1/work/simgear-2017.1.1_build'
make: *** [Makefile:152: all] Error 2
This is because of this commit in openscenegraph code.
The "getKerning" problem was fixed by this commit: [6f0c7d]
But I still can't compile "simgear/canvas/elements/CanvasText.cxx"
(at least with the osg git version)
My system is:
Debian (stretch), AMD64, gcc-6.3, mesa r600g
Error log from gcc:
simgear/canvas/elements/CanvasPath.cxx: In member function ‘virtual void simgear::canvas::Path::childChanged(SGPropertyNode)’:
simgear/canvas/elements/CanvasPath.cxx:869:10: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
else if ( name == "svg")
^~
simgear/canvas/elements/CanvasPath.cxx:871:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
_attributes_dirty |= SVG;
^~~~~~~~~~~~~~~~~
simgear/canvas/elements/CanvasText.cxx: In constructor ‘simgear::canvas::TextLine::TextLine(size_t, const simgear::canvas::Text::TextOSG)’:
simgear/canvas/elements/CanvasText.cxx:124:5: 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:125:17: error: ‘osgText::Text::GlyphQuads::LineNumbers’ has not been declared
GlyphQuads::LineNumbers::const_iterator begin_it =
^~~~~~~~~~~
simgear/canvas/elements/CanvasText.cxx:128:9: error: ‘begin_it’ was not declared in this scope
if( begin_it == line_numbers.end() || begin_it != _line )
^~~~~~~~
simgear/canvas/elements/CanvasText.cxx:128:21: error: ‘line_numbers’ was not declared in this scope
if( begin_it == line_numbers.end() || begin_it != _line )
^~~~~~~~~~~~
simgear/canvas/elements/CanvasText.cxx:132:14: error: ‘begin_it’ was not declared in this scope
_begin = begin_it - line_numbers.begin();
^~~~~~~~
simgear/canvas/elements/CanvasText.cxx:132: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:166:5: 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:167:17: error: ‘osgText::Text::GlyphQuads::Coords2’ has not been declared
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~~
simgear/canvas/elements/CanvasText.cxx:167:40: error: ‘coords’ was not declared in this scope
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~
simgear/canvas/elements/CanvasText.cxx:167:50: error: ‘refCoords’ was not declared in this scope
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~~~~
simgear/canvas/elements/CanvasText.cxx:183:21: error: ‘prev_r’ was not declared in this scope
if( prev_l == prev_r )
^~~~~~
simgear/canvas/elements/CanvasText.cxx:186:19: error: ‘cur_l’ was not declared in this scope
pos.x() = cur_l;
^~~~~
simgear/canvas/elements/CanvasText.cxx:189:35: error: ‘cur_l’ was not declared in this scope
pos.x() = 0.5 * (prev_r + cur_l);
^~~~~
simgear/canvas/elements/CanvasText.cxx: In member function ‘osg::Vec2 simgear::canvas::TextLine::nearestCursor(float) const’:
simgear/canvas/elements/CanvasText.cxx:205:5: 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:206:17: error: ‘osgText::Text::GlyphQuads::Coords2’ has not been declared
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~~
simgear/canvas/elements/CanvasText.cxx:206:40: error: ‘coords’ was not declared in this scope
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~
simgear/canvas/elements/CanvasText.cxx:206:50: error: ‘refCoords’ was not declared in this scope
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~~~~
simgear/canvas/elements/CanvasText.cxx: In member function ‘virtual void simgear::canvas::Text::TextOSG::computePositions(unsigned int) const’:
simgear/canvas/elements/CanvasText.cxx:646: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 include/osgText/Text:21:0,
from simgear/canvas/elements/CanvasText.hxx:23,
from simgear/canvas/elements/CanvasText.cxx:20:
include/osgText/TextBase:295:10: note: candidate: void osgText::TextBase::computePositions()
void computePositions();
^~~~~~~~~~~~~~~~
include/osgText/TextBase:295:10: note: candidate expects 0 arguments, 1 provided
simgear/canvas/elements/CanvasText.cxx:646:55: error: return-statement with a value, in function returning 'void' [-fpermissive]
return osgText::Text::computePositions(contextID);
^
simgear/canvas/elements/CanvasText.cxx:656:5: error: ‘Coords2’ is not a member of ‘osgText::Text::GlyphQuads’
GlyphQuads::Coords2 refCoords = quads._coords;
^~~~~~~~~~
simgear/canvas/elements/CanvasText.cxx:657:17: error: ‘osgText::Text::GlyphQuads::Coords2’ has not been declared
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~~
simgear/canvas/elements/CanvasText.cxx:657:40: error: ‘coords’ was not declared in this scope
GlyphQuads::Coords2::element_type &coords = refCoords.get();
^~~~~~
simgear/canvas/elements/CanvasText.cxx:657:50: error: ‘refCoords’ was not declared in this scope
GlyphQuads::Coords2::element_type &coords = *refCoords.get();
^~~~~~~~~
simgear/canvas/elements/CanvasText.cxx:660: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:669:37: error: ‘line_numbers’ was not declared in this scope
bool first_char = cur_line != line_numbers[i];
^~~~~~~~~~~~
simgear/canvas/elements/CanvasText.cxx:689: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:689:47: error: ‘width’ was not declared in this scope
float margin = 0.5f * (right - left - width),
^~~~~
simgear/canvas/elements/CanvasText.cxx:695:32: error: ‘cursor_x’ was not declared in this scope
if( cur_line == 0 || cursor_x < _textBB._min.x() )
^~~~~~~~
simgear/canvas/elements/CanvasText.cxx:701:28: error: ‘cursor_x’ was not declared in this scope
float cursor_w = cursor_x + glyphs[i]->getHorizontalAdvance() * wr;
^~~~~~~~
simgear/canvas/elements/CanvasText.cxx:704:32: error: lvalue required as left operand of assignment
_textBB._max.x() = cursor_w;
^~~~~~~~
simgear/canvas/elements/CanvasText.cxx:689:15: warning: unused variable ‘margin’ [-Wunused-variable]
float margin = 0.5f * (right - left - width),
^~~~~~
simgear/canvas/elements/CanvasText.cxx:709: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 include/osgText/Text:21:0,
from simgear/canvas/elements/CanvasText.hxx:23,
from simgear/canvas/elements/CanvasText.cxx:20:
include/osgText/TextBase:295:10: note: candidate: void osgText::TextBase::computePositions()
void computePositions();
^~~~~~~~~~~~~~~~
include/osgText/TextBase:295:10: note: candidate expects 0 arguments, 1 provided
simgear/canvas/elements/CanvasText.cxx:709:53: error: return-statement with a value, in function returning 'void' [-fpermissive]
return osgText::Text::computePositions(contextID);
Related
Commit: [6f0c7d]
Building Simgear with OSG 3.5.5 is OK now.
@Polynomial-C can you confirm this?
Building with OSG git version doesn't work.
Seems something changed again in the Text sub system.
Yes, I can confirm that simgear git now compiles against latest openscenegraph release.