Board index FlightGear Support Compiling

Can not compile simgear 2019.1 with openscenegraph 3.6.5

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

Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby Curtis » Tue Apr 07, 2020 2:27 am

Hello,

I use archlinux 64 bits, since a recent update of openscenegraph (to 3.6.5 version) : simgear 2019.1.1 can not be compiled, 2 errors occur related to the file simgear/canvas/elements/CanvasText.cxx :

Code: Select all
simgear/canvas/elements/CanvasText.cxx:324:47: error: passing 'const simgear::canvas::Text::TextOSG' as 'this' argument discards qualifiers [-fpermissive]
324 | osgText::Font const* font = getActiveFont();


Code: Select all
simgear/canvas/elements/CanvasText.cxx:351:74: error: passing 'const simgear::canvas::Text::TextOSG' as 'this' argument discards qualifiers [-fpermissive]
  351 |     osgText::Font* activefont = const_cast<osgText::Font*>(getActiveFont());


Do you know a workaround, like a patch for the file simgear/canvas/elements/CanvasText.cxx ?

Thanks.
Curtis
 
Posts: 152
Joined: Wed Jun 17, 2009 4:09 pm
OS: archlinux 64 bits

Re: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby wkitty42 » Tue Apr 07, 2020 4:09 am

you really should post these to the developers' mailing list... the knowledge and expertise is there...
"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: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby Curtis » Tue Apr 07, 2020 5:03 am

I have just posted a message in the developers' mailing list, but not sure if the message will be accepted (I don't see it in the mailing list) :

first posts are subject to moderator approval to catch the cases where people sign up for the sole purpose of posting spam


I have also created a bug report.
Curtis
 
Posts: 152
Joined: Wed Jun 17, 2009 4:09 pm
OS: archlinux 64 bits

Re: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby wkitty42 » Tue Apr 07, 2020 3:27 pm

it was accepted and there's at least one reply to it that i read just a few minutes ago as of the time stamp on this post...
"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: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby Curtis » Tue Apr 07, 2020 7:15 pm

The answer was to add the option "-fpermissive" when building simgear :

Code: Select all
-DCMAKE_CXX_FLAGS="-fpermissive"


Code: Select all

  cd "$srcdir"/simgear-$pkgver
  cmake -DCMAKE_CXX_FLAGS="-fpermissive" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=off ../simgear-${pkgver}
  make


Then I rebuilt flightgear, and it seems to work, I can launch flightgear 2019.1 without problems.
But not sure if the Canvas feature really works at 100% after this modification, the error is just disabled by the CXX_FLAGS "-fpermissive".
Last edited by Curtis on Tue Apr 07, 2020 8:41 pm, edited 1 time in total.
Curtis
 
Posts: 152
Joined: Wed Jun 17, 2009 4:09 pm
OS: archlinux 64 bits

Re: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby wkitty42 » Tue Apr 07, 2020 8:06 pm

yep, that was the suggestion... i have no idea what it does... i build my FG with the dnc script for my user only... not a system-wide installation...
"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: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby Hooray » Thu Apr 09, 2020 11:22 am

that's not a "proper" fix at all, it just tells the compiler to accept broken code assuming that it will be "okay" - it seems like the cast should be fixed properly.
On the other hand, there's apparently work going to, yet again, raise the version of the C++ standard that the fg/sg code bases are using - so this might be related to those changes.
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: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby wkitty42 » Thu Apr 09, 2020 6:46 pm

FWIW: i am seeing some SIGSEGVs with my self-built (via the dnc script) OSG 3.6.5... not sure, yet, what the problem is... i will likely rebuild OSG in full debug more to try to track down more of what is going on... this may be something to do with changes in FG/SG, though...

FWIW2: i have --prop:/sim/sim/nasal-gc-threaded=false...
FWIW3: i am using the DDS cache without compression (because there is no nvtt for my card or OS)...

just for whatever:
Code: Select all
Core was generated by `./fgfs --fg-root=/home/myuser/flightgear-dev/next/install/flightgear/bin/../f'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fb8d1b41390 in osg::DefaultUserDataContainer::~DefaultUserDataContainer() () from ../../openscenegraph/lib/libosg.so.161
(gdb) bt
#0  0x00007fb8d1b41390 in osg::DefaultUserDataContainer::~DefaultUserDataContainer() () from ../../openscenegraph/lib/libosg.so.161
#1  0x00007fb8d1aa071a in osg::Object::~Object() () from ../../openscenegraph/lib/libosg.so.161
#2  0x00000000011fb8e8 in ~EffectGeode (this=0x7fb808cc5530, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/material/EffectGeode.hxx:30
#3  simgear::EffectGeode::~EffectGeode (this=0x7fb808cc5530, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/material/EffectGeode.hxx:30
#4  0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#5  0x00007fb8d1a27d29 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#6  0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#7  0x000000000123fbcc in ~Transform (this=0x7fb837de4370, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/animation.cxx:1380
#8  SGDistScaleAnimation::Transform::~Transform (this=0x7fb837de4370, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/animation.cxx:1380
#9  0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#10 0x00000000012315b7 in ~SGTranslateTransform (this=0x7fb837df1560, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/SGTranslateTransform.hxx:28
#11 SGTranslateTransform::~SGTranslateTransform (this=0x7fb837df1560, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/SGTranslateTransform.hxx:28
#12 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#13 0x000000000123e657 in ~Transform (this=0x7fb8739b6df0, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/animation.cxx:1661
#14 SGBillboardAnimation::Transform::~Transform (this=0x7fb8739b6df0, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/animation.cxx:1661
#15 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#16 0x00000000012315b7 in ~SGTranslateTransform (this=0x7fb828454b20, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/SGTranslateTransform.hxx:28
#17 SGTranslateTransform::~SGTranslateTransform (this=0x7fb828454b20, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/SGTranslateTransform.hxx:28
#18 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#19 0x00007fb8d1a27d29 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#20 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#21 0x00007fb8d1b0cc2b in osg::Switch::~Switch() () from ../../openscenegraph/lib/libosg.so.161
#22 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#23 0x00007fb8d1a27d29 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#24 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#25 0x000000000129bcc9 in simgear::ConditionNode::~ConditionNode (this=0x7fb8285c6e80, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/simgear/simgear/scene/model/ConditionNode.cxx:42
#26 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#27 0x00007fb8d1a27d29 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#28 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#29 0x00007fb8d1a968b9 in osg::MatrixTransform::~MatrixTransform() () from ../../openscenegraph/lib/libosg.so.161
#30 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#31 0x00007fb8d2e5d45b in osg::LOD::~LOD() () from ../../openscenegraph/lib/libosgSim.so.161
#32 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#33 0x00007fb8d1a27d29 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#34 0x00007fb8d1a27cb0 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#35 0x00007fb8d1a27d29 in osg::Group::~Group() () from ../../openscenegraph/lib/libosg.so.161
#36 0x0000000000be8800 in unref (this=<optimized out>) at /home/myuser/flightgear-dev/next/install/openscenegraph/include/osg/Referenced:201
#37 ~ref_ptr (this=0x5e8bdb0, __in_chrg=<optimized out>) at /home/myuser/flightgear-dev/next/install/openscenegraph/include/osg/ref_ptr:41
#38 ~_List_node (this=0x5e8bda0, __in_chrg=<optimized out>) at /usr/include/c++/4.8/bits/stl_list.h:106
#39 destroy<std::_List_node<osg::ref_ptr<osg::Object> > > (this=<optimized out>, __p=0x5e8bda0) at /usr/include/c++/4.8/ext/new_allocator.h:124
#40 std::_List_base<osg::ref_ptr<osg::Object>, std::allocator<osg::ref_ptr<osg::Object> > >::_M_clear (this=0x7fb880fa7c60) at /usr/include/c++/4.8/bits/list.tcc:75
#41 0x00007fb8d2b8b557 in osgDB::DatabasePager::DatabaseThread::run() () from ../../openscenegraph/lib/libosgDB.so.161
#42 0x00007fb8d1675072 in OpenThreads::ThreadPrivateActions::StartThread(void*) () from ../../openscenegraph/lib/libOpenThreads.so.21
#43 0x00007fb8d1228184 in start_thread (arg=0x7fb880fa8700) at pthread_create.c:312
#44 0x00007fb8ce4d603d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb)
"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: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby Hooray » Thu Apr 09, 2020 7:06 pm

at first glance, that seems unrelated to osgText and more like it's to do with the effects system - if the issue disappears once you stop using effects/shaders, that'd be good to know.
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: Can not compile simgear 2019.1 with openscenegraph 3.6.5

Postby wkitty42 » Thu Apr 09, 2020 8:21 pm

yeah, no OSGtext involved unless it is in scenery somewhere... the crash was with the UFO and some custom OSM florida scenery around KTTS... could be a scenery flaw, i guess, but i don't know... i've had other crashes here with a few previous FG builds with and without compositor but... and now that it is easier to disable scenery paths, i'll give that a try with the current build when i get the chance to run FG again...
"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


Return to Compiling

Who is online

Users browsing this forum: No registered users and 3 guests