API Error

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
deepsliver
Space Krill
Posts: 3
Joined: Mon Mar 24, 2008 6:24 pm

API Error

#1 Post by deepsliver »

Hi,

compiled from source, on amd64 gentoo 2.6.24.
When i start the game, it closes after generating the galaxy with this lines:

deepsliver@box ~ $ less .freeorion/freeorion.log
2008-03-24 19:04:25,716 ERROR Client : Unable to initialise OpenAL device:
2008-03-24 19:04:25,821 DEBUG Client : SDLInit() complete.
2008-03-24 19:04:25,822 DEBUG Client : GLInit() complete.
2008-03-24 19:04:26,104 DEBUG Client : Limited FPS to 60
2008-03-24 19:05:20,543 ERROR Client : ClientNetworking::NetworkingThread() : Networking thread will be terminated due to disconnect exception "API error"
2008-03-24 19:05:27,701 ERROR Client : HumanClientFSM : A Disconnection event was passed to the HumanClientFSM. This event is illegal in the FSM's current state. It is being ignored.
2008-03-24 19:05:32,620 DEBUG Client : Initiating Exit (code 1 - error termination)
2008-03-24 19:05:32,659 ERROR Client : ClientNetworking::NetworkingThread() : Networking thread will be terminated due to disconnect exception "API error"
2008-03-24 19:05:33,631 DEBUG Client : SDLQuit() complete.

any idea which api is involved here?

tnx
deepsliver

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: API Error

#2 Post by tzlaine »

I have no idea what the problem is specifically, but that "API error" is coming from Boost.Asio. In general, I would be surprised if either Asio or FO were able to be successfully built and run as 64-bit code.

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

Re: API Error

#3 Post by kroddn »

I don't think that running on a amd64-kernel does make much difference.

Is $HOME/freeorion the directory where you compiled the app, or is it an installation-path.

If the latter, try running the app inside the source-directory.

You could try to run the statically linked version, see here:
http://psitronic.de/div/FO/

normally you would download "latest.tar.gz" :-)

deepsliver
Space Krill
Posts: 3
Joined: Mon Mar 24, 2008 6:24 pm

Re: API Error

#4 Post by deepsliver »

Hello kroddn,
thank you for the static version. It won't run here because of missing a library:

deepsliver@box ~/tmp/freeorion/static/freeorion $ ldd freeorionca
linux-gate.so.1 => (0xffffe000)
libpython2.4.so.1.0 => not found
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7ec3000)
libc.so.6 => /lib32/libc.so.6 (0xf7d8e000)
/lib/ld-linux.so.2 (0xf7f08000)
deepsliver@box ~/tmp/freeorion/static/freeorion $ locate libpython2.4.so.1.0
/usr/lib64/libpython2.4.so.1.0
deepsliver@box ~/tmp/freeorion/static/freeorion $ ls -l /usr/lib64/libpython2.4.so.1.0
-r-xr-xr-x 1 root root 1157152 Feb 12 14:09 /usr/lib64/libpython2.4.so.1.0

as you can see, it is there, but can not be found from freeorionca


If i run from source directory, i get this:

deepsliver@box ~/tmp/freeorion/FreeOrion $ ./freeorion
open /dev/[sound/]dsp: No such file or directory
HumanClientApp::HandleMessage(HOST_SP_GAME)
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_2 ... 0 orders received
Received save game data from player AI_1 ... 0 orders received
Received save game data from player AI_3 ... 0 orders received
Received save game data from player AI_4 ... 0 orders received
std::runtime_error exception caught in GUI::Run(): boost::filesystem::basic_directory_iterator constructor

looks like a problem within boost, but which directory is needed here? How can i debug this?

Greetings
deepsliver

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

Re: API Error

#5 Post by kroddn »

Now THAT (your first error) is definitive a problem related to your 64bit-ubuntu-Version.

Can you try the following with the statically version?

export LD_LIBRARY_PATH=/usr/lib64; ./freeorion

I didn't want to link python statically, but if you are interested I could link freeorionca with python2.4 statically. Maybe then it will work:

http://psitronic.de/div/FO/freeorionca.gz

Copy that into your install-path and do "gzip -d freeorionca.gz"

deepsliver
Space Krill
Posts: 3
Joined: Mon Mar 24, 2008 6:24 pm

Re: API Error

#6 Post by deepsliver »

Hi,

export LD_LIBRARY_PATH=/usr/lib64; ./freeorion results in:

tmp/freeorion/static/freeorion/freeorionca: error while loading shared libraries: libpython2.4.so.1.0: wrong ELF class: ELFCLASS64

the second try worked, you have to chmod 775 freeorionca after unpack, with this solution i can play the game while i search for the solution on the self compiled version.

Thank you,
deepsliver

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

Re: API Error

#7 Post by kroddn »

Okay, the I will keep python2.4 linked statically.

Post Reply