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
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

#31 Post by adrian_broher »

You wrote that you did install Ogre via synaptic. This shouldn't be possible when following the steps that kempiu posted because it refers to downloading and compiling the Ogre code itself. Also the ogre package provided in the 12.04 repositories conflicts with the installation of boost 1.48 because it depends on boost 1.46. So what did you actually do at this step?
3. download Ogre3D sources, unpack and build.
I downloaded ogre from the launchpad website:
https://launchpad.net/ubuntu/precise/+source/ogre
Code:
$ wget https://launchpad.net/ubuntu/precise/+s ... ig.tar.bz2
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

#32 Post by Struwelpeter »

Probably that is where I messed up, yes, because I did not notice the need to compile the Ogre code. At first I did the wget and nothing else. Then at some point I went to Synaptic and grabbed libogre1.8-dev and all associated stuff. As for boost, when I look it up in Synaptic, I see I have 1.48 installed, but a few of duplicate 1.46 files are there as well. Gawds what have I done.

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#33 Post by Struwelpeter »

awww c'mon gimme some love man :...(

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

#34 Post by Dilvish »

ok well I'm sure adrian will have a better long term solution, but since you're understandably impatient, here's another possible approach in the meantime, which avoids the 'hack' of using symlinks -- go to your freeorion installation and save a backup copy of GG/cmake/FindOGRE.cmake, then edit line line 93 so that instead of

Code: Select all

    /usr/local/lib${LIB_SUFFIX}/OGRE
, it specifies

Code: Select all

    /usr/local/lib${LIB_SUFFIX}/OGRE1.8
which is where I understand it actually got installed for you. I think that is likely to do the job.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#35 Post by Struwelpeter »

Thanks for the new instructions. Did that. Same response from cmake:

Code: Select all

-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- 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)
  GG/src/Ogre/CMakeLists.txt:11 (find_package)
I notice, though, that I only got two folders in /usr/local/lib: python2.7 and python3.2. No OGRE stuff in there -- it is in /usr/lib/OGRE1.8. So I included this path inside the set(OGRE_PREFIX_GUESSES) clause of FindOGRE.cmake, in line 95 or so. Deleted CMakeCache.txt. Ran cmake . again with same output as copied above.

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

#36 Post by Dilvish »

Struwelpeter wrote:Thanks for the new instructions. Did that. Same response from cmake.. I notice, though, that I only got two folders in /usr/local/lib: python2.7 and python3.2. No OGRE stuff in there -- it is in /usr/lib/OGRE1.8. So I included this path inside the set(OGRE_PREFIX_GUESSES) clause of FindOGRE.cmake, in line 95 or so. Deleted CMakeCache.txt. Ran cmake . again with same output as copied above.
whoops, forgot yours was at usr/lib not usr/local/lib, good catch.

On looking more closely, I realized that the current failure messages aren't going to distinguish between finding the Ogre libraries themselves versus finding the include files, which are also necessary. To get that extra bit of error reporting, please add the line

Code: Select all

message( "Found (or not) Ogre include dir '${OGRE_INCLUDE_DIR}' and library location '${OGRE_LIBRARY}'" )
just before the line

Code: Select all

findpkg_finish(OGRE)
(which should be at or around line 219 of FindOGRE.cmake), and let us know what output you get from that.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#37 Post by Struwelpeter »

Done that. Here is what I get:

Code: Select all

-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- checking for module 'OGRE'
--   package 'OGRE' not found
Found (or not) Ogre include dir 'OGRE_CONFIG_INCLUDE_DIR-NOTFOUND;OGRE_INCLUDE_DIR-NOTFOUND' and library location 'optimized;/usr/lib/OGRE1.8/libOgreMain.so;debug;/usr/lib/OGRE1.8/libOgreMain.so'
-- 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:222 (findpkg_finish)
  GG/src/Ogre/CMakeLists.txt:11 (find_package)

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

#38 Post by Dilvish »

ok, just as I suspected, the problem now is the location of the include files. What do you get from executing

Code: Select all

locate Ogre.h
?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#39 Post by Struwelpeter »

The kid is in /usr/include/OGRE1.8/OGRE. Lots of other .h files in there. Should I include that path under the set(OGRE_PREFIX_GUESSES) too?

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

#40 Post by Dilvish »

Struwelpeter wrote:The kid is in /usr/include/OGRE1.8/OGRE. Lots of other .h files in there. Should I include that path under the set(OGRE_PREFIX_GUESSES) too?
No, I don't think those prefix guesses affect the include search tries. howabout you try

Code: Select all

cmake -D OGRE_INC_SEARCH_PATH=/usr/include/OGRE1.8   .
and see what it reports then
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#41 Post by Struwelpeter »

It says:

Code: Select all

The path to the source directory:

    /home/pedro/Downloads/freeorion/FreeOrion/OGRE_INC_SEARCH_PATH=/usr/include/OGRE1.8

  contains unsupported character '='.

  Please use a different source directory name.

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

#42 Post by Dilvish »

my bad, there shouldn't be any space between the "-D" and the "OGRE_INC_SEARCH_PATH":

Code: Select all

cmake -DOGRE_INC_SEARCH_PATH=/usr/include/OGRE1.8   .
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: FreeOrion 0.4.3 segmentation fault under Ubuntu 12.04

#43 Post by Struwelpeter »

More progress, yay! Still a couple errors, though:

Code: Select all

-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- checking for module 'OGRE'
--   package 'OGRE' not found
-- Found Ogre Byatis (1.8.1)
Found (or not) Ogre include dir '/usr/include/OGRE1.8/OGRE' and library location 'optimized;/usr/lib/OGRE1.8/libOgreMain.so;debug;/usr/lib/OGRE1.8/libOgreMain.so'
-- Found OGRE: optimized;/usr/lib/OGRE1.8/libOgreMain.so;debug;/usr/lib/OGRE1.8/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/OGRE1.8/libOgrePaging.so;debug;/usr/lib/OGRE1.8/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/OGRE1.8/libOgreTerrain.so;debug;/usr/lib/OGRE1.8/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/OGRE1.8/libOgreProperty.so;debug;/usr/lib/OGRE1.8/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/OGRE1.8/libOgreRTShaderSystem.so;debug;/usr/lib/OGRE1.8/libOgreRTShaderSystem.so
-- Configuring Ogre OIS Input Plugin
-- Looking for OIS...
-- OIS_PREFIX_PATH changed.
-- checking for module 'OIS'
--   package 'OIS' not found
-- Could not locate OIS
CMake Error at GG/cmake/FindPkgMacros.cmake:117 (message):
  Required library OIS 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/FindOIS.cmake:82 (findpkg_finish)
  GG/src/Ogre/Plugins/CMakeLists.txt:7 (find_package)
I then installed libois-dev through Synaptic. And got this:

Code: Select all

-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- checking for module 'OGRE'
--   package 'OGRE' not found
-- Found Ogre Byatis (1.8.1)
Found (or not) Ogre include dir '/usr/include/OGRE1.8/OGRE' and library location 'optimized;/usr/lib/OGRE1.8/libOgreMain.so;debug;/usr/lib/OGRE1.8/libOgreMain.so'
-- Found OGRE: optimized;/usr/lib/OGRE1.8/libOgreMain.so;debug;/usr/lib/OGRE1.8/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/OGRE1.8/libOgrePaging.so;debug;/usr/lib/OGRE1.8/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/OGRE1.8/libOgreTerrain.so;debug;/usr/lib/OGRE1.8/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/OGRE1.8/libOgreProperty.so;debug;/usr/lib/OGRE1.8/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/OGRE1.8/libOgreRTShaderSystem.so;debug;/usr/lib/OGRE1.8/libOgreRTShaderSystem.so
-- Configuring Ogre OIS Input Plugin
-- Looking for OIS...
-- OIS_PREFIX_PATH changed.
-- checking for module 'OIS'
--   found OIS, version 1.3.0
-- Found OIS: optimized;/usr/lib/libOIS.so;debug;/usr/lib/libOIS.so
-- Boost version: 1.48.0
-- Found the following Boost libraries:
--   chrono
--   date_time
--   filesystem
--   regex
--   serialization
--   signals
--   system
--   thread
-- Looking for OGRE...
-- checking for module 'OGRE'
--   package 'OGRE' not found
-- Found Ogre Byatis (1.8.1)
Found (or not) Ogre include dir '/usr/include/OGRE1.8/OGRE' and library location 'optimized;/usr/lib/OGRE1.8/libOgreMain.so;debug;/usr/lib/OGRE1.8/libOgreMain.so'
-- Found OGRE: optimized;/usr/lib/OGRE1.8/libOgreMain.so;debug;/usr/lib/OGRE1.8/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/OGRE1.8/libOgrePaging.so;debug;/usr/lib/OGRE1.8/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/OGRE1.8/libOgreTerrain.so;debug;/usr/lib/OGRE1.8/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/OGRE1.8/libOgreProperty.so;debug;/usr/lib/OGRE1.8/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/OGRE1.8/libOgreRTShaderSystem.so;debug;/usr/lib/OGRE1.8/libOgreRTShaderSystem.so
-- Configuring freeoriond
-- Boost version: 1.48.0
-- Found the following Boost libraries:
--   python
-- Found PythonLibs: /usr/lib/libpython2.7.so (Required is at least version "2")
-- Configuring freeorionca
-- Configuring freeorion
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindOpenAL.cmake:101 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  client/human/CMakeLists.txt:14 (find_package)


-- Configuring incomplete, errors occurred!

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

#44 Post by Dilvish »

Good progress!
libopenal-dev is one of the required packages, listed at http://www.freeorion.org/index.php/Compile_In_Linux, so install that and then let's see...
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
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

#45 Post by adrian_broher »

Code: Select all

-- OIS_PREFIX_PATH changed.
This is something that never occurs in my build environment. Let me check what is actually good for…
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Post Reply