Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528480 - games-strategy/freeorion-0.4.4: Can't start local game (was: fails to build with >=dev-games/ogre-1.9.0)
Summary: games-strategy/freeorion-0.4.4: Can't start local game (was: fails to build w...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Thomas Kahle (RETIRED)
URL:
Whiteboard:
Keywords:
: 531454 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-06 20:39 UTC by Julian Ospald
Modified: 2015-01-20 08:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (1415305760-install-games-strategy_freeorion-0.4.3:0::hasufell-overlay.out,348.24 KB, application/octet-stream)
2014-11-06 20:39 UTC, Julian Ospald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2014-11-06 20:39:16 UTC
Created attachment 388688 [details]
build.log

we should either fix the dep or check if there is an upstream fix
Comment 1 Thomas Kahle (RETIRED) gentoo-dev 2014-11-07 08:48:39 UTC
Quite possible that there is a fix in the new version 0.4.4.  The bump is delayed since I don't have access to a Gentoo machine connected to a monitor at the moment.  Feel free to go ahead if you have time.
Comment 2 Julian Ospald 2014-11-07 17:17:45 UTC
I have a working ebuild for 0.4.4, but every time I want to start a (local) game it throws "the connection to the server has been lost" out.
Comment 3 Julian Ospald 2014-12-02 16:27:24 UTC
*** Bug 531454 has been marked as a duplicate of this bug. ***
Comment 4 Michal Plichta 2014-12-02 20:05:12 UTC
Send ebuild or share in github, I wanna try.
Comment 5 Michal Plichta 2015-01-11 10:38:15 UTC
any progress?
Comment 6 Thomas Kahle (RETIRED) gentoo-dev 2015-01-12 13:06:27 UTC
I bumped to 0.4.4 with an apropriate patch for ogre-1.9.  

Like Julian I can't start a local game either.   Somebody should take this upstream.

Patch is from here: http://sourceforge.net/p/freeorion/bugs/569/

I made 0.4.3 depend on <ogre-1.9 so that I don't have to backport the patch.

+*freeorion-0.4.4 (12 Jan 2015)
+
+  12 Jan 2015; Thomas Kahle <tomka@gentoo.org> +files/ogre-1.9-compat.patch,
+  +freeorion-0.4.4.ebuild, freeorion-0.4.3.ebuild:
+  bump, compatibility with ogre-1.9, make 0.4.3 depend on old ogre (bug #528480)
Comment 7 Kvetos 2015-01-18 00:03:46 UTC
I checked the freeoriond.log and there's following error:

DEBUG Server : Python current directory set to /usr/share/games/freeorion/default/universe_generation
ERROR Server : Unable to import universe generator script
ERROR Server : ImportError: No module named universe_generator
...

But when I run the game this way:

export PYTHONPATH="/usr/share/games/freeorion/default/universe_generation"; freeorion

the local game starts fine.
Comment 8 Thomas Kahle (RETIRED) gentoo-dev 2015-01-19 13:52:23 UTC
Thanks for the research.  I don't really understand what is going on.  Probably some basic python stuff that you guys can teach me about.

The relevant cpp code is universe/PythonUniverseGenerator.cpp.  This starts a python interpreter, sets the path with os.chdir to the path where the python modules are, and then does

import universe_generator

Now if we look into default/universe_generation/universe_generator.py", the third line there is

import fo_universe_generator as fo

I don't know where that "fo_universe_generator" module is, and neither does the python interpretor.  If I repreoduce this on the command line (with python2.6), I get what is expected: 

ImportError: No module named fo_universe_generator

I think this is how it fails also within freeorion.  (With python-3 I get a syntax error, the script is python 2.)

I have no idea why setting the PYTHONPATH works?  I certainly don't have that fo_ module. Is it autogenerated, or what is this syntax?
Comment 9 Thomas Kahle (RETIRED) gentoo-dev 2015-01-19 14:00:11 UTC
(In reply to Thomas Kahle from comment #8)
> I have no idea why setting the PYTHONPATH works?  I certainly don't have
> that fo_ module. Is it autogenerated, or what is this syntax?

OK, I know. The module is the CPP interface and somehow dynamically generated by the cpp code via boost.  The python code is generated in line 1087 of PythonUniverseGenerator.cpp via the BOOST_PYTHON_MODULE macro.

@python: How do we do this in Gentoo?
Comment 10 Julian Ospald 2015-01-19 17:54:04 UTC
The wrapper script is broken.

The '--resource-dir' argument needs a FULL path, not a relative one.

Debatable whether that's an upstream bug. It should probably just refuse relative directories.
Comment 12 Thomas Kahle (RETIRED) gentoo-dev 2015-01-20 08:28:37 UTC
(In reply to Julian Ospald (hasufell) from comment #10)
> The wrapper script is broken.
> 
> The '--resource-dir' argument needs a FULL path, not a relative one.
> 
> Debatable whether that's an upstream bug. It should probably just refuse
> relative directories.

Good catch.  I changed this and it works for me now.

Hasufell, feel free (by that I mean encouraged) to port improvements from your overlay to the tree version.