ogre problem when building

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Message
Author
User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: ogre problem when building

#31 Post by tzlaine » Thu Feb 12, 2009 8:27 pm

You probably need to copy the Ogre .so's listed in ogre_plugins.cfg from /usr/local/lib/OGRE to your working dir.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: ogre problem when building

#32 Post by OndrejR » Thu Feb 12, 2009 8:30 pm

Maybe is problem in ATI drivers. I have nvidia without any problem and I only changed ogre config file. Another problem thing to consider is if you installed nvidia-cg-toolkit to compile OGRE. You have ATI graphic card and I don't know how to compile OGRE with ATI card.

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: ogre problem when building

#33 Post by loonycyborg » Fri Feb 13, 2009 12:38 am

I was getting a segfault at startup which was fixed by upgrading to boost 1.38
tzlaine wrote:You probably need to copy the Ogre .so's listed in ogre_plugins.cfg from /usr/local/lib/OGRE to your working dir.
You probably need to read Ogre plugin dir with "pkg-config OGRE --variable=plugindir" when generating ogre_plugins.cfg
In Soviet Russia, forum posts YOU!!

User avatar
francys
Space Squid
Posts: 54
Joined: Sat Oct 25, 2008 8:53 pm
Location: Victoria, BC

Re: ogre problem when building

#34 Post by francys » Fri Feb 13, 2009 1:41 am

tzlaine wrote:You probably need to copy the Ogre .so's listed in ogre_plugins.cfg from /usr/local/lib/OGRE to your working dir.
Didn't work.
loonycyborg wrote:I was getting a segfault at startup which was fixed by upgrading to boost 1.38
I'll give it a try.

User avatar
francys
Space Squid
Posts: 54
Joined: Sat Oct 25, 2008 8:53 pm
Location: Victoria, BC

Re: ogre problem when building

#35 Post by francys » Fri Feb 13, 2009 5:23 am

I installed boost 1.38, which created a boost folder in /usr/local/include/boost-1_38 with the headers and created a number of libraries in /usr/local/lib.

Now, however, I'm having issues with `scons configure`. The best I can do is specify boost's include and libdir, and that gets me this far:

Code: Select all

$ scons configure with_boost_include=/usr/local/include/boost-1_38/ with_boost_libdir=/usr/local/lib/
scons: Reading SConscript files ...
Checking for pkg-config... (cached) yes
Configuring for POSIX system...
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking Boost version >= 1.36... (cached) yes
Looking for boost lib boost_signals-mt...
Checking for boost::signals::connection() in C++ library boost_signals-mt... no
Checking for boost::signals::connection() in C++ library boost_signals-mt-mt... no
Boost configuration... (cached) no
Could someone please tell me what I'm missing?
Thank you in advance!

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: ogre problem when building

#36 Post by OndrejR » Fri Feb 13, 2009 7:17 am

You have to look at the library file name and add correctly boost_lib_suffix=-something.
libboost_filesystem-mt.so.1.37.0 means suffix mt. It is described in linux compile howto.

User avatar
francys
Space Squid
Posts: 54
Joined: Sat Oct 25, 2008 8:53 pm
Location: Victoria, BC

Re: ogre problem when building

#37 Post by francys » Fri Feb 13, 2009 9:19 pm

thank you!

I recompiled everything but I'm still getting a segmentation fault!

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: ogre problem when building

#38 Post by OndrejR » Sat Feb 14, 2009 2:50 am

I think it is ATI drivers which cause this problems. You may try newer or open source ATI drivers, but segfault can be traced by debugging. Howto is in wiki compile linux howto. You may also try some OGRE examples to test if are working.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12469
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: ogre problem when building

#39 Post by Geoff the Medio » Sat Feb 14, 2009 3:48 am

francys wrote:I recompiled everything but I'm still getting a segmentation fault!
Can you run the Ogre demo / samples, or another program written using Ogre?

User avatar
francys
Space Squid
Posts: 54
Joined: Sat Oct 25, 2008 8:53 pm
Location: Victoria, BC

Re: ogre problem when building

#40 Post by francys » Sat Feb 14, 2009 5:06 am

OndrejR wrote:I think it is ATI drivers which cause this problems. You may try newer or open source ATI drivers, but segfault can be traced by debugging. Howto is in wiki compile linux howto. You may also try some OGRE examples to test if are working.
I'm using the ATI fglrx driver 8.12. Other applications that require the driver and 3D acceleration work fine. I tried to trace the segfault with gdb after compiling FO with the debug option. However, whenever I get the segfault, be it in gdb or outside of it, keyboard and mouse stop working and I have to make use of the magic sysrq keys.
Geoff the Medio wrote:Can you run the Ogre demo / samples, or another program written using Ogre?
Yes I can. Ogre samples work even though some of them look a bit strange.. But I suppose I can say they work. Still better than a segfault :D

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: ogre problem when building

#41 Post by OndrejR » Sat Feb 14, 2009 5:28 am

francys wrote:
OndrejR wrote:I think it is ATI drivers which cause this problems. You may try newer or open source ATI drivers, but segfault can be traced by debugging. Howto is in wiki compile linux howto. You may also try some OGRE examples to test if are working.
I'm using the ATI fglrx driver 8.12. Other applications that require the driver and 3D acceleration work fine. I tried to trace the segfault with gdb after compiling FO with the debug option. However, whenever I get the segfault, be it in gdb or outside of it, keyboard and mouse stop working and I have to make use of the magic sysrq keys.
Try debug FO in window mode, not in fullscreen. Delete FO config.xml to run FO in window mode. Also compile GG with debug symbols. Maybe also OGRE.
Last edited by OndrejR on Sat Feb 14, 2009 6:34 am, edited 1 time in total.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12469
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: ogre problem when building

#42 Post by Geoff the Medio » Sat Feb 14, 2009 5:59 am

francys wrote:I tried to trace the segfault with gdb after compiling FO with the debug option.
You might need to check that all the dependencies and freeorion itself are all compiled in Release mode. You can have debug symbols included in release mode (at least in MSVC), but I've recently been informed that (again at least with MSVC) the debug and release build configurations have different ABIs, and attempting to use Ogre libs / DLLs built in a different configuration from the main executable will cause segfaults or similar crashes.

I also get crashes if I build the GiGiOgre and GiGiOgrePlugin_OIS libraries with different optimization levels during compiling than what is used in freeorion itself. This probably shouldn't be an issue if you're using SCons to build, though. (Assuming gcc has an analagous optimization level setting at all)

User avatar
francys
Space Squid
Posts: 54
Joined: Sat Oct 25, 2008 8:53 pm
Location: Victoria, BC

Re: ogre problem when building

#43 Post by francys » Sat Feb 14, 2009 6:35 am

I was getting the segfault and the weird keyboard/mouse problems even before compiling both GG and FO in debug mode.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: ogre problem when building

#44 Post by OndrejR » Sat Feb 14, 2009 6:46 am

In last revision 2814 I can turn off fullscreen mode from Options(via custom mode) or comment it in config.xml cause FO run in window mode, but I can't leave FO window. Problem with debugging is that when segfault occurs debugger switch to gdb console. But mouse and keyboard can't leave FO window and that is the problem.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12469
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: ogre problem when building

#45 Post by Geoff the Medio » Sat Feb 14, 2009 7:00 am

OndrejR wrote:...mouse and keyboard can't leave FO window and that is the problem
Is that always the case, or just when the segfault occurs?

Post Reply