[linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

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

Post Reply
Message
Author
nyquist
Krill Swarm
Posts: 12
Joined: Sun Jul 20, 2008 11:07 am

[linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#1 Post by nyquist »

Hi

Just to say i got the same first problem :

/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.4.so.1.0: cannot open shared object file: No such file or directory
the problem is that I am running 64 bit Ubuntu and was trying to use the statically linked binary but the librairy is linked to /usr/lib32 and not to /usr/lib/ .

i have done a symlink to /usr/lib32 of my /usr/lib/libpython2.4.so.1.0 but it doesn't work, i get this error :

Code: Select all

I am Symlink. Following into my targets basedir
CWD: /usr/local/games/freeorion/application
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.4.so.1.0: wrong ELF class: ELFCLASS64
HumanClientApp::HandleMessage(HOST_SP_GAME)
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.4.so.1.0: wrong ELF class: ELFCLASS64
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.4.so.1.0: wrong ELF class: ELFCLASS64
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.4.so.1.0: wrong ELF class: ELFCLASS64
is the static linked version i get from http://psitronic.de/div/FO works with x86_64 ?

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#2 Post by kroddn »

Which version did you download? The current version links to python 2.5, so your version is not a current one.

I do not know if those versions work correctly on x64, for I have no system to test that on.

nyquist
Krill Swarm
Posts: 12
Joined: Sun Jul 20, 2008 11:07 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#3 Post by nyquist »

I've downloaded this one http://psitronic.de/div/FO/freeorion_0. ... nux.tar.gz

the only one which isn't i386 specific... i guess it just the name who is not i386 specific.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#4 Post by kroddn »

Its an old release which is not current.

Download latest.tar.gz from the same webspace. http://psitronic.de/div/FO

nyquist
Krill Swarm
Posts: 12
Joined: Sun Jul 20, 2008 11:07 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#5 Post by nyquist »

i've tested the latest

Code: Select all

I am Symlink. Following into my targets basedir
CWD: /usr/local/games/freeorion/application
    libpython2.5.so.1.0 => not found
python2.5 missing. Using shipped version.
[: 47: ==: unexpected operator
[: 56: ==: unexpected operator
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
HumanClientApp::HandleMessage(HOST_SP_GAME)
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
so i do a simlink to my /usr/lib/python2.5 to /usr/lib32/python2.5
but i get the same message :

Code: Select all

I am Symlink. Following into my targets basedir
CWD: /usr/local/games/freeorion/application
    libpython2.5.so.1.0 => not found
python2.5 missing. Using shipped version.
[: 47: ==: unexpected operator
[: 56: ==: unexpected operator
HumanClientApp::HandleMessage(HOST_SP_GAME)
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: wrong ELF class: ELFCLASS64
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: wrong ELF class: ELFCLASS64
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: wrong ELF class: ELFCLASS64
/usr/local/games/freeorion/application/freeorionca: error while loading shared libraries: libpython2.5.so.1.0: wrong ELF class: ELFCLASS64

nyquist
Krill Swarm
Posts: 12
Joined: Sun Jul 20, 2008 11:07 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#6 Post by nyquist »

seems linked to this post : viewtopic.php?f=24&t=2134

freeorionca have to be hard linked to /usr/lib/libpython2.4.so.1.0 (or libpython2.5.so.1.0)

is this solution always available?

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#7 Post by kroddn »

No, thats not the case. The newer versions of my setup need python2.5, not 2.4 any more. But on x64 systems, that might still be a problem.

It seems that there's an error inside the wrapper-script "freeorion" at /usr/local/games/freeorion/freeorion - edit that file and replace each (double) == with a single = .

The script recognized that python2.5 is missing and tries to use a version inside the application directory.

You can quickly fix this problem by installing python2.5.

Code: Select all

sudo apt-get install python2.5
Which version of ubuntu are you using exactly? I own a 8.04, and that has python2.5 installed.

nyquist
Krill Swarm
Posts: 12
Joined: Sun Jul 20, 2008 11:07 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#8 Post by nyquist »

kroddn wrote:No, thats not the case. The newer versions of my setup need python2.5, not 2.4 any more. But on x64 systems, that might still be a problem.

It seems that there's an error inside the wrapper-script "freeorion" at /usr/local/games/freeorion/freeorion - edit that file and replace each (double) == with a single = .
I'll do that asap i get in front of my computer.
kroddn wrote: The script recognized that python2.5 is missing and tries to use a version inside the application directory.

You can quickly fix this problem by installing python2.5.

Code: Select all

sudo apt-get install python2.5
Which version of ubuntu are you using exactly? I own a 8.04, and that has python2.5 installed.
in fact python2.5 is NOT missing but there's not link in /usr/lib32/ but there a smylink in /usr/lib and /usr/lib64.

i'm using the feisty fawn (7.04) in 64 bits.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#9 Post by kroddn »

nyquist wrote:Which version of ubuntu are you using exactly? I own a 8.04, and that has python2.5 installed.
in fact python2.5 is NOT missing but there's not link in /usr/lib32/ but there a smylink in /usr/lib and /usr/lib64.

i'm using the feisty fawn (7.04) in 64 bits.[/quote]

Is it possible to install 32bit python on your system? Your problem ist, that your 64 bit python is not compatible with freeorion.

I read some forum threads found at google about that - it seems that it is a common problem with python on x64, but I did not find any solution.

Anyway, fix those == into = and then it may work. I am very interested in that...

nyquist
Krill Swarm
Posts: 12
Joined: Sun Jul 20, 2008 11:07 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#10 Post by nyquist »

great job!!

i change the freeorion starter in /usr/local/games/freeorion

get the 2 "if" with only one = and it works (of course i delete the symlink in /usr/lib32)

there's a log of the starting game (for info) but everything work so far.:


Code: Select all

freeorion-start 
I am Symlink. Following into my targets basedir
CWD: /usr/local/games/freeorion/application
        libpython2.5.so.1.0 => not found
python2.5 missing. Using shipped version.
PYTHONHOME=python2.5
HumanClientApp::HandleMessage(HOST_SP_GAME)
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# python2.5/site.pyc has bad mtime
import site # from python2.5/site.py
# can't create python2.5/site.pyc
# python2.5/os.pyc has bad mtime
import os # from python2.5/os.py
# can't create python2.5/os.pyc
import errno # builtin
import posix # builtin
# python2.5/posixpath.pyc has bad mtime
import posixpath # from python2.5/posixpath.py
# can't create python2.5/posixpath.pyc
# python2.5/stat.pyc has bad mtime
import stat # from python2.5/stat.py
# can't create python2.5/stat.pyc
# python2.5/UserDict.pyc has bad mtime
import UserDict # from python2.5/UserDict.py
# can't create python2.5/UserDict.pyc
# python2.5/copy_reg.pyc has bad mtime
import copy_reg # from python2.5/copy_reg.py
# can't create python2.5/copy_reg.pyc
# python2.5/types.pyc has bad mtime
import types # from python2.5/types.py
# can't create python2.5/types.pyc
import _types # builtin
# /usr/local/games/freeorion/application/python2.5/warnings.pyc has bad mtime
import warnings # from /usr/local/games/freeorion/application/python2.5/warnings.py
# can't create /usr/local/games/freeorion/application/python2.5/warnings.pyc
# /usr/local/games/freeorion/application/python2.5/linecache.pyc has bad mtime
import linecache # from /usr/local/games/freeorion/application/python2.5/linecache.py
# can't create /usr/local/games/freeorion/application/python2.5/linecache.pyc
import encodings # directory /usr/local/games/freeorion/application/python2.5/encodings
# /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc has bad mtime
import encodings # from /usr/local/games/freeorion/application/python2.5/encodings/__init__.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc
# /usr/local/games/freeorion/application/python2.5/codecs.pyc has bad mtime
import codecs # from /usr/local/games/freeorion/application/python2.5/codecs.py
# can't create /usr/local/games/freeorion/application/python2.5/codecs.pyc
import _codecs # builtin
# /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc has bad mtime
import encodings.aliases # from /usr/local/games/freeorion/application/python2.5/encodings/aliases.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc
# /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc has bad mtime
import encodings.ascii # from /usr/local/games/freeorion/application/python2.5/encodings/ascii.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# python2.5/site.pyc has bad mtime
import site # from python2.5/site.py
# can't create python2.5/site.pyc
# python2.5/os.pyc has bad mtime
import os # from python2.5/os.py
# can't create python2.5/os.pyc
import errno # builtin
import posix # builtin
# python2.5/posixpath.pyc has bad mtime
import posixpath # from python2.5/posixpath.py
# can't create python2.5/posixpath.pyc
# python2.5/stat.pyc has bad mtime
import stat # from python2.5/stat.py
# can't create python2.5/stat.pyc
# python2.5/UserDict.pyc has bad mtime
import UserDict # from python2.5/UserDict.py
# can't create python2.5/UserDict.pyc
# python2.5/copy_reg.pyc has bad mtime
import copy_reg # from python2.5/copy_reg.py
# can't create python2.5/copy_reg.pyc
# python2.5/types.pyc has bad mtime
import types # from python2.5/types.py
# can't create python2.5/types.pyc
import _types # builtin
# /usr/local/games/freeorion/application/python2.5/warnings.pyc has bad mtime
import warnings # from /usr/local/games/freeorion/application/python2.5/warnings.py
# can't create /usr/local/games/freeorion/application/python2.5/warnings.pyc
# /usr/local/games/freeorion/application/python2.5/linecache.pyc has bad mtime
import linecache # from /usr/local/games/freeorion/application/python2.5/linecache.py
# can't create /usr/local/games/freeorion/application/python2.5/linecache.pyc
import encodings # directory /usr/local/games/freeorion/application/python2.5/encodings
# /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc has bad mtime
import encodings # from /usr/local/games/freeorion/application/python2.5/encodings/__init__.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc
# /usr/local/games/freeorion/application/python2.5/codecs.pyc has bad mtime
import codecs # from /usr/local/games/freeorion/application/python2.5/codecs.py
# can't create /usr/local/games/freeorion/application/python2.5/codecs.pyc
import _codecs # builtin
# /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc has bad mtime
import encodings.aliases # from /usr/local/games/freeorion/application/python2.5/encodings/aliases.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc
# /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc has bad mtime
import encodings.ascii # from /usr/local/games/freeorion/application/python2.5/encodings/ascii.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# python2.5/site.pyc has bad mtime
import site # from python2.5/site.py
# can't create python2.5/site.pyc
# python2.5/os.pyc has bad mtime
import os # from python2.5/os.py
# can't create python2.5/os.pyc
import errno # builtin
import posix # builtin
# python2.5/posixpath.pyc has bad mtime
import posixpath # from python2.5/posixpath.py
# can't create python2.5/posixpath.pyc
# python2.5/stat.pyc has bad mtime
import stat # from python2.5/stat.py
# can't create python2.5/stat.pyc
# python2.5/UserDict.pyc has bad mtime
import UserDict # from python2.5/UserDict.py
# can't create python2.5/UserDict.pyc
# python2.5/copy_reg.pyc has bad mtime
import copy_reg # from python2.5/copy_reg.py
# can't create python2.5/copy_reg.pyc
# python2.5/types.pyc has bad mtime
import types # from python2.5/types.py
# can't create python2.5/types.pyc
import _types # builtin
# /usr/local/games/freeorion/application/python2.5/warnings.pyc has bad mtime
import warnings # from /usr/local/games/freeorion/application/python2.5/warnings.py
# can't create /usr/local/games/freeorion/application/python2.5/warnings.pyc
# /usr/local/games/freeorion/application/python2.5/linecache.pyc has bad mtime
import linecache # from /usr/local/games/freeorion/application/python2.5/linecache.py
# can't create /usr/local/games/freeorion/application/python2.5/linecache.pyc
import encodings # directory /usr/local/games/freeorion/application/python2.5/encodings
# /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc has bad mtime
import encodings # from /usr/local/games/freeorion/application/python2.5/encodings/__init__.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc
# /usr/local/games/freeorion/application/python2.5/codecs.pyc has bad mtime
import codecs # from /usr/local/games/freeorion/application/python2.5/codecs.py
# can't create /usr/local/games/freeorion/application/python2.5/codecs.pyc
import _codecs # builtin
# /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc has bad mtime
import encodings.aliases # from /usr/local/games/freeorion/application/python2.5/encodings/aliases.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc
# /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc has bad mtime
import encodings.ascii # from /usr/local/games/freeorion/application/python2.5/encodings/ascii.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# python2.5/site.pyc has bad mtime
import site # from python2.5/site.py
# can't create python2.5/site.pyc
# python2.5/os.pyc has bad mtime
import os # from python2.5/os.py
# can't create python2.5/os.pyc
import errno # builtin
import posix # builtin
# python2.5/posixpath.pyc has bad mtime
import posixpath # from python2.5/posixpath.py
# can't create python2.5/posixpath.pyc
# python2.5/stat.pyc has bad mtime
import stat # from python2.5/stat.py
# can't create python2.5/stat.pyc
# python2.5/UserDict.pyc has bad mtime
import UserDict # from python2.5/UserDict.py
# can't create python2.5/UserDict.pyc
# python2.5/copy_reg.pyc has bad mtime
import copy_reg # from python2.5/copy_reg.py
# can't create python2.5/copy_reg.pyc
# python2.5/types.pyc has bad mtime
import types # from python2.5/types.py
# can't create python2.5/types.pyc
import _types # builtin
# /usr/local/games/freeorion/application/python2.5/warnings.pyc has bad mtime
import warnings # from /usr/local/games/freeorion/application/python2.5/warnings.py
# can't create /usr/local/games/freeorion/application/python2.5/warnings.pyc
# /usr/local/games/freeorion/application/python2.5/linecache.pyc has bad mtime
import linecache # from /usr/local/games/freeorion/application/python2.5/linecache.py
# can't create /usr/local/games/freeorion/application/python2.5/linecache.pyc
import encodings # directory /usr/local/games/freeorion/application/python2.5/encodings
# /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc has bad mtime
import encodings # from /usr/local/games/freeorion/application/python2.5/encodings/__init__.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/__init__.pyc
# /usr/local/games/freeorion/application/python2.5/codecs.pyc has bad mtime
import codecs # from /usr/local/games/freeorion/application/python2.5/codecs.py
# can't create /usr/local/games/freeorion/application/python2.5/codecs.pyc
import _codecs # builtin
# /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc has bad mtime
import encodings.aliases # from /usr/local/games/freeorion/application/python2.5/encodings/aliases.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/aliases.pyc
# /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc has bad mtime
import encodings.ascii # from /usr/local/games/freeorion/application/python2.5/encodings/ascii.py
# can't create /usr/local/games/freeorion/application/python2.5/encodings/ascii.pyc
HumanClientApp::HandleMessage(GAME_START)
HumanClientApp::HandleSaveGameDataRequest(SAVE_GAME)
Received save game data from player Happy_Player ... 0 orders received
Received save game data from player AI_4 ... 0 orders received
Received save game data from player AI_2 ... 0 orders received
Received save game data from player AI_3 ... 0 orders received
Received save game data from player AI_1 ... 0 orders received

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: [linux] [64bits] libpython2.4.so.1.0: cannot open shared obj

#11 Post by kroddn »

Does that mean it works?

Post Reply