FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Message
Author
kempiu
Space Krill
Posts: 5
Joined: Fri Aug 02, 2013 9:48 pm

FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#1 Post by kempiu »

Hallo,

Today i installed the release version of FreeOrion 0.4.3 under Ubuntu 12.04 and it does not work as expected.
Basically it crashes after execution.
$ freeorion
libpng error: bad parameters to zlib
Segmentation fault (core dumped)

How to reproduce (read what i did):
1. Download: freeorion-0.4.3_amd64.deb
2. $ dpkg -I freeorion-0.4.3_amd64.deb | grep Depends
Depends: libvorbisfile3, libois-1.3.0, libalut0, libzzip-0-13, libfreetype6, libfreeimage3, libgl1-mesa-dri
3. $ sudo apt-get install libvorbisfile3 libois-1.3.0 libalut0 libzzip-0-13 libfreetype6 libfreeimage3 libgl1-mesa-dri
4. $ sudo dpkg -i freeorion-0.4.3_amd64.deb
5. $ freeorion

What do i have to do to fix the problem?

thanks & best regards
Mariusz

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#2 Post by Geoff the Medio »

Based on a bit of googling, that libpng error message suggests a version conflict between the libpng built into the FreeOrion you downloaded and the installed system version. How to fix that, I'm not sure, other than that compiling for yourself from source might work.

kempiu
Space Krill
Posts: 5
Joined: Fri Aug 02, 2013 9:48 pm

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#3 Post by kempiu »

OK, thank you for your prompt reply.

kempiu
Space Krill
Posts: 5
Joined: Fri Aug 02, 2013 9:48 pm

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#4 Post by kempiu »

It won't be easy to build freeorion under Ubuntu 12.04 LTS.
I see a problem regarding to `libogre-dev' package it depends on libboost-all-dev and libboost-dev (boost 1.46).
FreeOrion requires boost in version >= 1.47, see line 14 in CMakeLists.txt file:
set(MINIMUM_BOOST_VERSION 1.47.0).
I can of course install libboost1.48-all-dev, libboost1.48-dev from repositories to meet requirements from FreeOrion, but than i cannot install ogre...
Anyway thanks.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#5 Post by adrian_broher »

Commit 4472 changed the version from 1.44 to 1.47. Unfortunately this is a huge commit and the reason why the library version was bumped to exactly to 1.47 it was changed isn't documented. You just could give it a try by lowering the required boost version to 1.46. Maybe it works.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#6 Post by Geoff the Medio »

adrian_broher wrote:Commit 4472 changed the version from 1.44 to 1.47. Unfortunately this is a huge commit and the reason why the library version was bumped to exactly to 1.47 it was changed isn't documented.
Given that that commit was about updating the parser (which uses boost spirit), I suspect it needed 1.47 of boost for the new spirit-related stuff in that version. See here.

kempiu
Space Krill
Posts: 5
Joined: Fri Aug 02, 2013 9:48 pm

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#7 Post by kempiu »

Yes that is true, it is necessay to use 1.47, because of the lexer in parse module
(see Lexer.h, line8: #include <boost/spirit/home/lex/lexer/lexertl/position_token.hpp>).

I forgot to write a feedback, i managed to build FreeOrion 0.43 on Ubuntu 12.04 64bit.
The list of key steps, maybe helpful for somone:
1. install boost 1.48 from repositories

Code: Select all

$ sudo apt-get install libboost1.48-dev libboost1.48-all-dev
2. Install libbullet 2.81

Code: Select all

$ wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
$ sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu precise-getdeb games" >> /etc/apt/sources.list.d/getdeb.list'
$ sudo apt-get update
$ sudo apt-get install libbullet0 libbullet-dev
3. download Ogre3D sources, unpack and build.
I downloaded ogre from the launchpad website:
https://launchpad.net/ubuntu/precise/+source/ogre

Code: Select all

$ wget https://launchpad.net/ubuntu/precise/+source/ogre/1.7.4-3/+files/ogre_1.7.4.orig.tar.bz2
4. Checkout the release 0.43 from the repository (revision 6281)

Code: Select all

$ svn co -r6281 https://svn.code.sf.net/p/freeorion/code/trunk freeorion_0_43
5. Compile the project

Code: Select all

$ cd freeorion_0_43/FreeOrion/
$ cmake .
$ make
6. It was necessary for me to create a few symbolic links to Ogre shared library and plugins

7. execute freeorion

Code: Select all

$ ./freeorion
Enjoy!

I am really impressed, this game looks really good.
I hope i will find time to a write a wiki page with details about compiling for Ubuntu 12.04 x86_64
...and some more time to play FreeOrion.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#8 Post by adrian_broher »

kempiu wrote:6. It was necessary for me to create a few symbolic links to Ogre shared library and plugins
This shouldn't happen. Do you have a list of the symlinks you needed to create?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

kempiu
Space Krill
Posts: 5
Joined: Fri Aug 02, 2013 9:48 pm

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#9 Post by kempiu »

/usr/lib/x86_64-linux-gnu/OGRE-1.7.4$ ls -la

Code: Select all

lrwxrwxrwx  1 root root    45 Aug  4 15:37 Plugin_BSPSceneManager.so -> /usr/local/lib/OGRE/Plugin_BSPSceneManager.so
lrwxrwxrwx  1 root root    46 Aug  4 15:37 Plugin_CgProgramManager.so -> /usr/local/lib/OGRE/Plugin_CgProgramManager.so
lrwxrwxrwx  1 root root    48 Aug  4 15:37 Plugin_OctreeSceneManager.so -> /usr/local/lib/OGRE/Plugin_OctreeSceneManager.so
lrwxrwxrwx  1 root root    40 Aug  4 15:37 Plugin_OctreeZone.so -> /usr/local/lib/OGRE/Plugin_OctreeZone.so
lrwxrwxrwx  1 root root    40 Aug  4 15:36 Plugin_ParticleFX.so -> /usr/local/lib/OGRE/Plugin_ParticleFX.so
lrwxrwxrwx  1 root root    45 Aug  4 15:37 Plugin_PCZSceneManager.so -> /usr/local/lib/OGRE/Plugin_PCZSceneManager.so
lrwxrwxrwx  1 root root    38 Aug  4 15:36 RenderSystem_GL.so -> /usr/local/lib/OGRE/RenderSystem_GL.so

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#10 Post by Geoff the Medio »

Even if some symlinks were needed, they should only include the RenderSystem_GL, OctreeSceneManager, and ParticleFX plugins. Most of the others (cg, bsp, pcz) are definitely not used by FreeOrion, and the last (octreezone) probably isn't but plausibly might if it somehow is required for the OctreeSceneManager on Linux.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#11 Post by adrian_broher »

Geoff the Medio wrote:Even if some symlinks were needed, they should only include the RenderSystem_GL, OctreeSceneManager, and ParticleFX plugins.
kempiu created those manually so it's not a real big problem.

kempiu could you please post the content of ogre_plugins.cfg in the project root directory? Also I'm wondering why do you link the OGRE plugins into '/usr/lib/x86_64-linux-gnu/OGRE-1.7.4'? Did this directory exist before? Was it created by the OGRE installation or is that from a previous installation? I really doubt that the upstream package uses two different PREFIX installation pathes ('/usr/lib/x86_64-linux-gnu/OGRE-1.7.4' versus '/usr/local/lib/OGRE/' or rather '/usr' vs '/usr/local') to install core and plugin libraries.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Struwelpeter
Space Floater
Posts: 22
Joined: Mon Jan 20, 2014 11:07 pm

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#12 Post by Struwelpeter »

Hi,

I have encountered the libpng / zlib error and have been following kempiu's 7-step guide above to compile Freeorion in Ubuntu 12.04. I was OK as long as all I had to do was copy and paste (I'm theoretically aware of what compiling is, but little beyond that; and I'm not an experienced Ubuntu user either). When I got to the "cmake ." phase, though, I began getting:

Code: Select all

-- Looking for OGRE...
-- checking for module 'OGRE'
--   package 'OGRE' not found
-- Could not locate OGRE
-- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR) 
-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Configuring GiGi
-- Configuring GiGiOgre
-- Looking for OGRE...
-- checking for module 'OGRE'
--   package 'OGRE' not found
-- Could not locate OGRE
     Warning: Ogre could not be found.  Disabling the Ogre build.
-- Configuring Ogre OIS Input Plugin
-- Looking for OIS...
-- checking for module 'OIS'
--   package 'OIS' not found
-- Could not locate OIS
     Warning: OIS could not be found.  Disabling the OIS build.
-- Looking for OGRE...
-- checking for module 'OGRE'
--   package 'OGRE' not found
-- Could not locate OGRE
CMake Error at GG/cmake/FindPkgMacros.cmake:117 (message):
  Required library OGRE not found! Install the library (including dev
  packages) and try again.  If the library is already installed, set the
  missing variables manually in cmake.
Call Stack (most recent call first):
  GG/cmake/FindOGRE.cmake:219 (findpkg_finish)
  PagedGeometry/CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
I just need to grab this Ogre thing from the Package Manager, I thought. I did grab the developer's libraries (libogre1.8-dev and all associated stuff), but I'm still getting the result copied above. Any help would be greatly appreciated.

Cheers,

S.p.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#13 Post by Dilvish »

Please post what the location of the Ogre libraries is, so that adrian_broher (our primary cmake expert) might comment on whether he would expect that to be found by FindOGRE, and what to do about it to further increase the reliability of our cmake build process.

Alternatively, you can try to use the cmake configuration utility, via "ccmake ." to directly specify your Ogre library location (once ccmake is up you might need to go into advanced mode via 't' to get the full list of variables including the Ogre library location). Once you've set that any other variables you want to directly set, you hit 'c' for it to generate the new cmake info.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#14 Post by Geoff the Medio »

As a mostly uninformed guess, did the process of grabbing the developer library for Ogre involve installing it? That might be a separate / extra step, and might be required for the CMake FindOgre mechanism to locate it.

Struwelpeter
Space Floater
Posts: 22
Joined: Mon Jan 20, 2014 11:07 pm

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#15 Post by Struwelpeter »

Thanks for the replies!
Dilvish wrote:Please post what the location of the Ogre libraries is, so that adrian_broher (our primary cmake expert) might comment on whether he would expect that to be found by FindOGRE, and what to do about it to further increase the reliability of our cmake build process.
As I said, other than being a Linux newbie, I also know next to nothing about compiling wizardry, so I'm not even sure how to identify a library. At any rate, a system Search of "libogre" tells me there are libogre files all over the place. Many of them (like libOgreMain.so) are under /usr/lib/OGRE1.8, a lot of .list and .mdsums files are under /var/lib/dpkg/info, many .deb files in /var/cache/apt/archives, and several -dbg files are in /usr/share/doc.
Alternatively, you can try to use the cmake configuration utility, via "ccmake ." to directly specify your Ogre library location (once ccmake is up you might need to go into advanced mode via 't' to get the full list of variables including the Ogre library location). Once you've set that any other variables you want to directly set, you hit 'c' for it to generate the new cmake info.
Right, got there, but I'm at loss to manually configure that, since I have no idea what stuff like OGRE_Plugin_BSPSceneManager_IN should be pointing to, alas...
Geoff the Medio wrote:As a mostly uninformed guess, did the process of grabbing the developer library for Ogre involve installing it? That might be a separate / extra step, and might be required for the CMake FindOgre mechanism to locate it.
To this moment, my belief has been that the Ubuntu Synaptic Package Manager grabs as well as installs stuff...

Post Reply