Statically linked Linux-version

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
charlieg
Space Floater
Posts: 37
Joined: Tue May 25, 2004 1:59 pm

Re: Statically linked Linux-version

#46 Post by charlieg » Sun Apr 06, 2008 1:36 am

2450 does not work for me :cry:

Code: Select all

[charles@localhost freeorion]$ ./freeorion 
./freeorion: line 13: unexpected EOF while looking for matching ``'
./freeorion: line 21: syntax error: unexpected end of file
Free Gamer - open source games resource
FreeGameDev - Free Software game community

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

Re: Statically linked Linux-version

#47 Post by kroddn » Tue Apr 08, 2008 10:54 am

The script "freeorion" is buggy. The next version will be fixed.

Replace it with the following.

Code: Select all

#!/bin/sh
# Change into application directory
# If this is a symlink, then we
# need to change into dir of symlink
if [ -h $0 ]; then
  echo "I am Symlink. Following into my targets basedir"
  ME=`readlink $0`
else
  echo "Following into my basedir"
  ME=$0
fi

ROOT=`dirname ${ME}`/application

cd ${ROOT}
echo -n "CWD: "
pwd

# Call with settings-dir to avoid conflicting installations
./freeorion --settings-dir $ROOT/default
/Edit:
New version available on http://psitronic.de/div/FO/
FO rev2462 / GG rev 645

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

Re: Statically linked Linux-version

#48 Post by kroddn » Wed Apr 09, 2008 1:42 pm

This version works nicely on Ubuntu 8.04 (Beta)

User avatar
Uber-Noob
Space Krill
Posts: 7
Joined: Mon Apr 14, 2008 5:57 pm

Re: Statically linked Linux-version

#49 Post by Uber-Noob » Fri Apr 18, 2008 5:13 am

I am having trouble getting the setup script to work under x64 Ubuntu (gutsy, for now).

Code: Select all

justin@ubuntu:~/Desktop$ sudo freeorion/setup.shThe setup program seems to have failed on x86_64/glibc-2.1

Fatal error, no tech support email configured in this setup

Is there anything I can do about this? or is this just a x64 problem :roll: ? Should I bite the bullet and get the XP installer for my other system :cry: ?

BTW: here is the MD5 for the archive that I received:

Code: Select all

3f511542a818592d75b51212609b4243  freeorion_0.3.9_Linux.tar.gz
Thanks, you have already done a lot for those of us still learning our way around Linux :wink: .

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

Re: Statically linked Linux-version

#50 Post by kroddn » Fri Apr 18, 2008 7:50 am

Seems that you have an x64-System.

You can install the game manually, extract it where you want it to be and then call "freeorion".

For example, do as root:

Code: Select all

mkdir -p /usr/local/games
cd /usr/local/games
tar xfz /path/to/freeorion_0.3.9_Linux.tar.gz
Then the game resides in /usr/local/games/freeorion.

Execute /usr/local/games/freeorion/freeorion to run the game.

I did NOT test it on x64 Systems yet. Maybe you may run into problems.

stormspireiv
Space Krill
Posts: 7
Joined: Mon Apr 28, 2008 5:35 am

Re: Statically linked Linux-version

#51 Post by stormspireiv » Mon Apr 28, 2008 5:55 am

First of all, I love the option for a Linux binary! I compiled freeorion a while back on Gutsy and it was a hassle, even moreso for a newer Linux user. I can confirm that the binary runs on 64bit systems (Hardy to be exact), but it seems the research button crashes the game. When I compiled it on Gutsy, I remember being able to access the research screen. Here is the output from starting a new game and clicking the research button immediately:

Code: Select all

~/freeorion$ ./freeorion
Following into my basedir
CWD: /home/stormspire/freeorion/application
chdir(.)
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
HumanClientApp::HandleMessage(HOST_SP_GAME)
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
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
Warning: Could not load "/usr/lib/graphviz/libgvplugin_pango.so.5" - /usr/lib/graphviz/libgvplugin_pango.so.5: wrong ELF class: ELFCLASS64
Warning: Could not load "/usr/lib/graphviz/libgvplugin_dot_layout.so.5" - /usr/lib/graphviz/libgvplugin_dot_layout.so.5: wrong ELF class: ELFCLASS64
Error: Layout type: "dot" not recognized. Use one of: circo dot fdp neato nop nop1 nop2 twopi
Segmentation fault
The game runs flawlessly otherwise (haven't tried combat though). I can end turns, move ships, colonize, start production, etc. Am I missing a dependancy? I am anxious to see the progress on the tech tree since I last checked out this project.

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

Re: Statically linked Linux-version

#52 Post by kroddn » Mon Apr 28, 2008 8:56 pm

Hm, strange. It should have linked graphviz statically into the binary, but at your backtrace it was loaded dynamically. I'll have a look at that.

Would it be possible for you to deinstall graphviz? Maybe then the modules compiled into the binary are used.

/Edit:
I checked that on my machine. And indeed - if graphviz is installed, some graphviz-plugins are loaded dynamically. If graphviz is NOT installed, nothing is loaded, but the binary is still working correctly.
As the version I linked is built 32-bit, it may conflict with the 64-bit variant of the modules. I do not know how to tell graphviz where to load modules from, so i cannot deliver the plugins with FO.
I can link the module "gvplugin_pango" statically, but then the resulting binary depends on libpango and different dependecies relatet to that. That again would limit the number of distros the binary would run on.

antaran
Space Krill
Posts: 1
Joined: Thu May 01, 2008 12:14 pm

Re: Statically linked Linux-version

#53 Post by antaran » Thu May 01, 2008 12:17 pm

UPDATE:
nevermind, works after a reboot (no idea why)


Works great on Ubuntu 8.04, but i just get an segmentation fault on Fedora 8. Anyone got that fixed?


edit: typo :)

I ran it in gdb:

Code: Select all

......
[Detaching after fork from child process 3585. (Try `set detach-on-fork off'.)]
[New Thread 32418704 (LWP 3586)]
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_1 ... 0 orders received
Received save game data from player AI_3 ... 0 orders received
Received save game data from player AI_2 ... 0 orders received
Received save game data from player AI_4 ... 0 orders received

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208088848 (LWP 3579)]
0x05c9edfb in ?? () from /usr/lib/nvidia/libGL.so.1
Missing separate debuginfos, use: debuginfo-install libXcursor.i386 libXfixes.i386 libXrandr.i386 libXrender.i386

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

Re: Statically linked Linux-version

#54 Post by kroddn » Fri May 02, 2008 8:25 am

Are both installations on the same machine, or is that different hardware?

Do you have the lateste nVidia-drivers installed? The crash seems to result from them.

Does the segfault appear immediately or after starting a new game? If the latter, then maybe your graficscard does not support OpenGL 1.5. Try appending output from "glxinfo" here as a attachement.

stormspireiv
Space Krill
Posts: 7
Joined: Mon Apr 28, 2008 5:35 am

Re: Statically linked Linux-version

#55 Post by stormspireiv » Fri May 02, 2008 4:29 pm

antaran wrote: Works great on Ubuntu 8.04, but i just get an segmentation fault on Fedora 8. Anyone got that fixed?
You said you got it working on Ubuntu 8.04? Is this 64 bit as well? If so, can you access the research menu?

Canew
Space Krill
Posts: 3
Joined: Mon May 05, 2008 2:24 am

Re: Statically linked Linux-version

#56 Post by Canew » Mon May 05, 2008 2:31 am

Hi:

I'm having a little trouble with running this game. I've downloaded the latest file, untarred it in my /home/user/games directory, went into the new freeorion directory, and tried to run the command "freeorion," but it says "command not found," despite the fact that an executable file by that name is in that directory. I'm not a total Linux newbie, but have I missed a step?

stormspireiv
Space Krill
Posts: 7
Joined: Mon Apr 28, 2008 5:35 am

Re: Statically linked Linux-version

#57 Post by stormspireiv » Mon May 05, 2008 2:35 am

Canew wrote:Hi:

I'm having a little trouble with running this game. I've downloaded the latest file, untarred it in my /home/user/games directory, went into the new freeorion directory, and tried to run the command "freeorion," but it says "command not found," despite the fact that an executable file by that name is in that directory. I'm not a total Linux newbie, but have I missed a step?
Try

Code: Select all

./freeorion
from the freeorion directory.

Edit: Or you could just run

Code: Select all

~/games/freeorion/freeorion
from anywhere.

Canew
Space Krill
Posts: 3
Joined: Mon May 05, 2008 2:24 am

Re: Statically linked Linux-version

#58 Post by Canew » Mon May 05, 2008 3:12 am

stormspireiv wrote: Try

Code: Select all

./freeorion
from the freeorion directory.

Edit: Or you could just run

Code: Select all

~/games/freeorion/freeorion
from anywhere.
Hmm... I tried running ./freeorion.

I got this:

Code: Select all

Following into my basedir
CWD: /home/user/games/freeorion/application
And that's it, back to the prompt. WTF? I'm feeling really dumb here.

stormspireiv
Space Krill
Posts: 7
Joined: Mon Apr 28, 2008 5:35 am

Re: Statically linked Linux-version

#59 Post by stormspireiv » Mon May 05, 2008 3:58 am

Hmm... I tried running ./freeorion.

I got this:

Code: Select all

Following into my basedir
CWD: /home/user/games/freeorion/application
And that's it, back to the prompt. WTF? I'm feeling really dumb here.
Hm, all that output is normal, it should launch the freeorion window. I assume you are running X, so I don't know. Sorry I can't be of more help.

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

Re: Statically linked Linux-version

#60 Post by kroddn » Mon May 05, 2008 5:12 pm

Normally, after you get the message "CWD: /usr/local/games/freeorion/application", another message shold appear saying "chdir(.)"

If that does not appear, it seems that the binary is not starting regularily on your system.

Which version did you download? What Computer / OS do you use?

Please append the output from the fallowing command:

Code: Select all

ldd /home/user/games/freeorion/application/freeorion

Post Reply