FreeOrion

Forums for the FreeOrion project
It is currently Wed Sep 03, 2014 6:57 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Feb 18, 2009 2:46 am 
Offline
Space Krill

Joined: Wed Feb 18, 2009 2:41 am
Posts: 4
Okay, well, it took me a while to compile it, but I finally got it to. Though, no doubt I did something wrong.
Whenever I try to run freeorion, the window pops up, stays black, but then quits, and I get the following errors.

Code:
main() caught exception(std::exception): OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library libGiGiOgrePlugin_OIS.so.  System Error: /usr/local/lib/libGiGiOgrePlugin_OIS.so: undefined symbol: _ZTIN3OIS8KeyboardE in DynLib::load at OgreDynLib.cpp (line 80)
AL lib: ALc.c:1302: exit() 1 device(s) and 1 context(s) NOT deleted
AL lib: alSource.c:2291: alcDestroyContext(): 16 Source(s) NOT deleted
AL lib: alBuffer.c:1097: exit() 2 Buffer(s) NOT deleted


Help? :P

Oh, um, running Debian Lenny (well, unstable) on an amd64 platform. Not sure what other info to give.

Nevermind. Redownloaded and recompiled from the SVN and it starts now. Now to play for the first time. :P


Nevermind again. I ran it once. Then I exited, now it refuses to run again...
Says this:

Code:
main() caught exception(std::runtime_error): Failed to find an Ogre GL render system.


Okay, well, recompiling it once again seems to have fixed it for now. I'll quit and see if it will start again.
Yup, working.


By the way, if anybody else is having the same problem, it's most likely because you've upgraded the ogre3d library, and freeorion is statically linked to the wrong place now.


Top
 Profile  
 
PostPosted: Thu Mar 19, 2009 10:27 am 
Offline
Space Krill

Joined: Wed Mar 18, 2009 3:50 pm
Posts: 1
Hi,

i have the same problem here..... starts and black screen

Code:
main() caught exception(std::runtime_error): Failed to find an Ogre GL render system


I have installed OGRE 1.6.1 SDK for Visual C++ .Net 2008 (9.0)

I recompile FO but nothing happens.
So i try to copy the freeorion.exe from my MSVC developer folder in the installation folder (c:\programme\freeorion\) version 0.3.12 rev2806.
Ok....i get the error he doesnt find the correct boost files (boost_thread-vc90-mt-1_38.dll ...... ) so i copy it from my developer folders into the installation folder of FO and it works.

So my question... how can i start FO directly from my developer folder without copying the .exe file? All libs that i need are in the same folder but it doesn't work.

After 2 days of compiling all the differnt libs and codes from the tools and plugins i'm happy when i can see the starting screen.

Maybe you can help


Top
 Profile  
 
PostPosted: Thu Mar 19, 2009 12:38 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 10028
Location: Munich
I don't know why a compiled SVN version would run in the v0.3.12 installed folder but not in the build directory, but you might try deleting config.xml, and copying all the DLLs from the install folder to the dev folder. There are at least two DLLs missing in the SDK (cg.dll and Plugin_CgProgramManager.dll) but I think they'd be mentioned specifically as missing (from the dev folder) if that was your problem.


Top
 Profile  
 
PostPosted: Thu May 28, 2009 10:34 pm 
Offline
Space Floater

Joined: Thu May 28, 2009 10:08 pm
Posts: 42
I also encountered this same error
Code:
main() caught exception(std::runtime_error): Failed to find an Ogre GL render system.

I looked from the source code where it printed error message like that and debugged error to missing ogre_plugins.cfg file. This problem was solved when I copied ogre_plugins.cfg from source tree to my datadir (default would be /usr/local/share/freeorion)

At the same time I wonder why bindir and datadir defaults are not relative to prefix (according to "scons -h")? Now I have to set all three separately to install freeorion to separate directory hierarchy.

It still refused to start with
Code:
main() caught exception(std::exception): OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library ./RenderSystem_GL.  System Error: ./RenderSystem_GL.so: cannot open shared object file: No such file or directory in DynLib::load at OgreDynLib.cpp (line 81)

As error message points out that plugin library is looked from current directory, I changed my working directory to ogres plugin directory (cd <ogreprefix>/lib/OGRE) and run freeorion from there. It started to start menu!

(...but segfaulted when I tried to begin playing)


Top
 Profile  
 
PostPosted: Thu May 28, 2009 11:26 pm 
Offline
Space Dragon
User avatar

Joined: Thu Oct 02, 2008 11:00 pm
Posts: 339
Location: Slovakia
Did you change file ogre_plugins.cfg content to:
Code:
PluginFolder=/usr/local/lib/OGRE

?

Another problem may be if you have ATI.


Top
 Profile  
 
PostPosted: Fri May 29, 2009 12:07 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 10028
Location: Munich
cazfi wrote:
I looked from the source code where it printed error message like that and debugged error to missing ogre_plugins.cfg file. This problem was solved when I copied ogre_plugins.cfg from source tree to my datadir (default would be /usr/local/share/freeorion)

At the same time I wonder why bindir and datadir defaults are not relative to prefix (according to "scons -h")? Now I have to set all three separately to install freeorion to separate directory hierarchy.

The datadir and bindir *defaults* are necessarily determined in C++ code, and have to function even if there are no files available to provide them. The only way (I think?) to have these defaults change depending on the scons parameters would be to have the scons script modify the source code before compiling. This isn't very portable to other build systems.

There should be a way to get the actual binary directory, though, rather than using the current scheme of 1) trying the hard coded location and if that fails 2) hope it's the same as the working directory. Having this, all the ogre cfg files can be put there and should be reliably gettable.

Edit: There probably is, if my attached patch from a few years ago works as it's supposed to... /Edit

I don't think there's any sensible way to get the data dir, if it's not in the default location, though. We should probably add a command-line switch to specify this directory. Currently the workaround is, I think, to generate config.xml with "freeorion -g" and then edit that file to specify the data directory.

Quote:
(...but segfaulted when I tried to begin playing)

There are a vareity of possible causes of this. To start, as OndrejR noted, do you have an ATI graphics card and does your card support OpenGL 2.0? If yes, once you get to the main menu and before starting the game, can you go into the options menu - from the main menu button - and go to the galaxy map tab, and disable galaxy gas rendering, starfields rendering, fog of war scanlines, and optimized system rendering, and then try starting a game? If this works, try enabling those options one at a time, to see if it will run with them enabled.

I'm slightly concerned that you'll have trouble launching the server or AIs, though given that their binaries will be in nonstandard locations that apparently the program has trouble dealing with...


Attachments:
File comment: out of date but illustrative patch for how to get binary directory from argv[0] and boost::fs::system_complete (hopefully)
binary_location.zip [1.72 KiB]
Downloaded 104 times
Top
 Profile  
 
PostPosted: Fri May 29, 2009 8:41 am 
Offline
Static Linker
User avatar

Joined: Thu Jun 28, 2007 10:28 am
Posts: 347
You can edit the ogre_plugins.cfg to point to your <ogreprefix>/lib/OGRE dir, or you can make symlinks to your FreeOrion dir:

Code:
cd FreeOrion
ln -s /usr/local/lib/OGRE/Plugin_CgProgramManager.so  .
ln -s /usr/local/lib/OGRE/Plugin_OctreeSceneManager.so  .
ln -s /usr/local/lib/OGRE/RenderSystem_GL.so  .
ln -s /usr/local/lib/OGRE/Plugin_ParticleFX.so  .


If you change the working directory out of FreeOrion, you will NOT be able to run the game, because it will try to find ./freeoriond and ./freeorionca as soon as you start a game.

Also, please make sure you installed nvidia Cg on your system and you compiled OGRE with Cg support!


Top
 Profile  
 
PostPosted: Fri May 29, 2009 11:28 am 
Offline
Space Floater

Joined: Thu May 28, 2009 10:08 pm
Posts: 42
OndrejR wrote:
Did you change file ogre_plugins.cfg content to:
Code:
PluginFolder=/usr/local/lib/OGRE

Thanks, that (or rather; correct value) fixed the workdir problem
OndrejR wrote:
Another problem may be if you have ATI.

Yeah, I'll try another machine with nvidia.


Top
 Profile  
 
PostPosted: Fri May 29, 2009 11:38 am 
Offline
Space Floater

Joined: Thu May 28, 2009 10:08 pm
Posts: 42
kroddn wrote:
If you change the working directory out of FreeOrion, you will NOT be able to run the game, because it will try to find ./freeoriond and ./freeorionca as soon as you start a game.

Actually those processes are launched ok according to process list just before the crash.

This is what I did (dependencies are built under /home/cazfi/freeorion/sys):
Code:
cd /home/cazfi/freeorion/TRUNK/FreeOrion
PKG_CONFIG_PATH=/home/cazfi/freeorion/sys/lib/pkgconfig scons configure ... prefix=/home/cazfi/freeorion/install bindir=/home/cazfi/freeorion/install/bin datadir=/home/cazfi/freeorion/install/share/freeorion ...
scons install
cd ../..
LD_LIBRARY_PATH=/home/cazfi/freeorion/sys/lib install/bin/freeorion


Top
 Profile  
 
PostPosted: Fri May 29, 2009 12:08 pm 
Offline
Space Floater

Joined: Thu May 28, 2009 10:08 pm
Posts: 42
Geoff the Medio wrote:
The datadir and bindir *defaults* are necessarily determined in C++ code, and have to function even if there are no files available to provide them. The only way (I think?) to have these defaults change depending on the scons parameters would be to have the scons script modify the source code before compiling. This isn't very portable to other build systems.

Hmm... well, okay, we may have several levels of *default* here. I were talking about scons parameter defaults.
Code:
prefix
    Location to install FreeOrion
    value=/usr/local
    default=/usr/local

    ...

bindir
    Location to install executables
    value=/usr/local/bin
    default=/usr/local/bin

datadir
    Location to install application data
    value=/usr/local/share/freeorion
    default=/usr/local/share/freeorion

Compare to e.g. GG:
Code:
prefix
    Location to install GG
    value=/usr/local
    default=/usr/local

    ...

incdir
    Location to install headers
    value=/usr/local/include
    default=$prefix/include

bindir
    Location to install executables
    value=/usr/local/bin
    default=$prefix/bin

libdir
    Location to install libraries
    value=/usr/local/lib
    default=$prefix/lib


Top
 Profile  
 
PostPosted: Fri May 29, 2009 2:32 pm 
Offline
Static Linker
User avatar

Joined: Thu Jun 28, 2007 10:28 am
Posts: 347
As long as your freeorion binary loads and crashes with such a segfault, your build is okay. I do such pkgconfig stuff similar to the way you do.

Before any more steps, please try with an nvidia card! The game should at least pop up a black windows and then crash - if that happens, the problem may be missing open GL support (or ATI card problem).


Top
 Profile  
 
PostPosted: Fri May 29, 2009 3:20 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 10028
Location: Munich
cazfi wrote:
OndrejR wrote:
Another problem may be if you have ATI.

Yeah, I'll try another machine with nvidia.

Another thing to try, which I'd like to hear back about, is to find the function OgreGUI::Enter2DMode in GG/src/Ogre/OgreGUI.cpp and replace
Code:
    if (glUseProgramARB)
        glUseProgramARB(0);

with
Code:
    glUseProgram(0);

This seems to be (one of the?) issue with ATI cards, and is discussed here as well: viewtopic.php?p=36944#p36944


Top
 Profile  
 
PostPosted: Sun May 31, 2009 7:30 pm 
Offline
Space Floater

Joined: Thu May 28, 2009 10:08 pm
Posts: 42
Geoff the Medio wrote:
Another thing to try, which I'd like to hear back about, is to find the function OgreGUI::Enter2DMode in GG/src/Ogre/OgreGUI.cpp and replace
Code:
    if (glUseProgramARB)
        glUseProgramARB(0);

with
Code:
    glUseProgram(0);

This seems to be (one of the?) issue with ATI cards, and is discussed here as well: viewtopic.php?p=36944#p36944

Guy in that other thread mentions that his crash occured at glUseProgramARB(). Mine does not, but RenderXxx() (where Xxx depends on what options I have enabled)

Anyway, attempt to call glUseProgram(0); resulted in compiler error "error: 'glUseProgram' was not declared in this scope"

I have now compiled FreeOrion on machine with nvidia and it works a bit better there. It goes to game screen, but halts after a couple of seconds. That particular machine has been rather unstable later, so this is probably not FreeOrion's fault. In any case, I'm quite confident that my build process works. Do you want me to submit "user story" to wiki about how to build and install FreeOrion and dependencies to directory tree of their own? (so that you don't need root access, and can be sure that everything FreeOrion related is removed from your system by simply "rm -Rf freeorion")


Top
 Profile  
 
PostPosted: Sun May 31, 2009 11:09 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 10028
Location: Munich
cazfi wrote:
I have now compiled FreeOrion on machine with nvidia and it works a bit better there. It goes to game screen, but halts after a couple of seconds.

Is there anything interesting in the log files? (or just post them after a crash or "halt")

Quote:
Do you want me to submit "user story" to wiki about how to build and install FreeOrion and dependencies to directory tree of their own? (so that you don't need root access, and can be sure that everything FreeOrion related is removed from your system by simply "rm -Rf freeorion")

Sure; more user stories are aways helpful and appreciated.


Top
 Profile  
 
PostPosted: Tue Jun 02, 2009 8:36 pm 
Offline
Space Floater

Joined: Thu May 28, 2009 10:08 pm
Posts: 42
cazfi wrote:
At the same time I wonder why bindir and datadir defaults are not relative to prefix (according to "scons -h")? Now I have to set all three separately to install freeorion to separate directory hierarchy.

Further testing proved that they actually are correctly relative to prefix, 'scons -h' just doesn't make that clear (it shows paths relative to currently configured prefix, doesn't tell that changing prefix would change those paths) I tried to write a patch that makes their handling similar to what GG uses, but that didn't work. My scons experience is very limited.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group