Page 3 of 4

Re: ogre problem when building

Posted: Thu Feb 12, 2009 8:27 pm
by tzlaine
You probably need to copy the Ogre .so's listed in ogre_plugins.cfg from /usr/local/lib/OGRE to your working dir.

Re: ogre problem when building

Posted: Thu Feb 12, 2009 8:30 pm
by OndrejR
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.

Re: ogre problem when building

Posted: Fri Feb 13, 2009 12:38 am
by loonycyborg
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

Re: ogre problem when building

Posted: Fri Feb 13, 2009 1:41 am
by francys
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.

Re: ogre problem when building

Posted: Fri Feb 13, 2009 5:23 am
by francys
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!

Re: ogre problem when building

Posted: Fri Feb 13, 2009 7:17 am
by OndrejR
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.

Re: ogre problem when building

Posted: Fri Feb 13, 2009 9:19 pm
by francys
thank you!

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

Re: ogre problem when building

Posted: Sat Feb 14, 2009 2:50 am
by OndrejR
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.

Re: ogre problem when building

Posted: Sat Feb 14, 2009 3:48 am
by Geoff the Medio
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?

Re: ogre problem when building

Posted: Sat Feb 14, 2009 5:06 am
by francys
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

Re: ogre problem when building

Posted: Sat Feb 14, 2009 5:28 am
by OndrejR
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.

Re: ogre problem when building

Posted: Sat Feb 14, 2009 5:59 am
by Geoff the Medio
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)

Re: ogre problem when building

Posted: Sat Feb 14, 2009 6:35 am
by francys
I was getting the segfault and the weird keyboard/mouse problems even before compiling both GG and FO in debug mode.

Re: ogre problem when building

Posted: Sat Feb 14, 2009 6:46 am
by OndrejR
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.

Re: ogre problem when building

Posted: Sat Feb 14, 2009 7:00 am
by Geoff the Medio
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?