Problems compiling freeorion on FreeBSD
Moderator: Oberlus
Problems compiling freeorion on FreeBSD
Hi,
I've problems compiling freeorion. I also filled a bug report at
https://sourceforge.net/tracker/index.p ... tid=544942
But someone told me on IRC I should probably better post at the forums so here I am
I'm running FreeBSD 7 with gcc 4.2.1 and boost 1.37.0. The build log can be obtained here:
http://files.pofo.de/freeorion-0.3.12.20090408.log
It looks like a boost problem with universe/Universe.cpp
I've problems compiling freeorion. I also filled a bug report at
https://sourceforge.net/tracker/index.p ... tid=544942
But someone told me on IRC I should probably better post at the forums so here I am
I'm running FreeBSD 7 with gcc 4.2.1 and boost 1.37.0. The build log can be obtained here:
http://files.pofo.de/freeorion-0.3.12.20090408.log
It looks like a boost problem with universe/Universe.cpp
Last edited by OlliL on Tue Jan 03, 2012 7:13 am, edited 1 time in total.
Re: Problems compiling freeorion
To compile the latest freeorion on FreeBSD:
- use gcc 4.3
- use Ogre 1.6.x
- use latest gigi from svn
- use latest freeorion from svn
- use graphviz 2.22.x
- patch the Endianess detection because the one in boost has an error which was not yet fixed yet in the FreeBSD boost port. The following patch is FreeBSD specific and is temporary until boost is fixed upstream or in the FreeBSD ports collection only.
- apply a patch to fix a gcc 4.3 error (should be FreeBSD only as well but could be used generally I guess)
- to support the latest 2.22.x graphviz, I used the regexp because the graphviz guys changed a define:
I'll commit the latest freeorion + gigi ports as well as ogre 1.6 containing all the needed fixes to the FreeBSD ports tree when the right now happening port freeze for the upcomming 7.2 FreeBSD release is over
- use gcc 4.3
- use Ogre 1.6.x
- use latest gigi from svn
- use latest freeorion from svn
- use graphviz 2.22.x
- patch the Endianess detection because the one in boost has an error which was not yet fixed yet in the FreeBSD boost port. The following patch is FreeBSD specific and is temporary until boost is fixed upstream or in the FreeBSD ports collection only.
Code: Select all
--- util/Serialize.cpp.orig 2009-04-13 08:56:38.000000000 +0200
+++ util/Serialize.cpp 2009-04-13 08:56:56.000000000 +0200
@@ -65,7 +65,7 @@
// some endianness and size checks to ensure portability of binary save files; of one or more of these fails, it means
// that FreeOrion is not supported on your platform/compiler pair, and must be modified to provide data of the
// appropriate size(s).
-#ifndef BOOST_LITTLE_ENDIAN
+#if (_BYTE_ORDER != _LITTLE_ENDIAN)
# error "Incompatible endianness for binary serialization."
#endif
BOOST_STATIC_ASSERT(sizeof(char) == 1);
Code: Select all
--- python/PythonEnumWrapper.cpp.orig 2009-04-09 08:40:02.000000000 +0200
+++ python/PythonEnumWrapper.cpp 2009-04-09 08:40:06.000000000 +0200
@@ -1,3 +1,4 @@
+#include <ostream>
#include "../universe/Enums.h"
#include <boost/python.hpp>
Code: Select all
perl -pi -e 's/ND_coord_i/ND_coord/g' UI/TechTreeWnd.cpp
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Problems compiling freeorion
Sounds good; thanks. Can you post something now that FreeBSD users could download to get the latest FreeOrion, and/or post when a FreeBSD version is downloadable elsehwere, so we can make a more-prominent announcement about it?
Re: Problems compiling freeorion
I'm trying to start freeorion now for the first time
I'd to remove Plugin_CgProgramManager from ogre_plugins.cfg because it does not exist on FreeBSD. After this was done and I adjusted PluginFolder freeorion stops with:
olivleh1@kartoffel olivleh1> freeorion
main() caught exception(std::exception): basic_string::_S_construct NULL not valid
olivleh1@kartoffel olivleh1>
Reading ogre.log does not give that much information:
I doubt that the missing icon is causing this... I would have checked this further but I have no idea where to put it - a trace shows not where it is searched for
I'd to remove Plugin_CgProgramManager from ogre_plugins.cfg because it does not exist on FreeBSD. After this was done and I adjusted PluginFolder freeorion stops with:
olivleh1@kartoffel olivleh1> freeorion
main() caught exception(std::exception): basic_string::_S_construct NULL not valid
olivleh1@kartoffel olivleh1>
Reading ogre.log does not give that much information:
Code: Select all
11:32:45: Plugin successfully installed
11:32:45: *-*-* OGRE Initialising
11:32:45: *-*-* Version 1.6.2 (Shoggoth)
11:32:45: CPU Identifier & Features
11:32:45: -------------------------
11:32:45: * CPU ID: AuthenticAMD: AMD Athlon(tm) 64 Processor 3500+
11:32:45: * SSE: yes
11:32:45: * SSE2: yes
11:32:45: * SSE3: no
11:32:45: * MMX: yes
11:32:45: * MMXEXT: yes
11:32:45: * 3DNOW: yes
11:32:45: * 3DNOWEXT: yes
11:32:45: * CMOV: yes
11:32:45: * TSC: yes
11:32:45: * FPU: yes
11:32:45: * PRO: yes
11:32:45: * HT: no
11:32:45: -------------------------
11:32:45: ******************************
*** Starting GLX Subsystem ***
******************************
11:32:45: GLRenderSystem::_createRenderWindow "FreeOrion v0.3.12None", 1024x768 windowed miscParams: FSAA=0 displayFrequency=60 MHz gamma= vsync=No
11:32:45: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource GLX_icon.png in resource group General or any other group. in ResourceGroupManag
11:32:45: GLXWindow::create used FBConfigID = 125
11:32:45: *-*-* OGRE Shutdown
Re: Problems compiling freeorion
Missing icons is normal thing. Also Impostor images.
FreeOrion since last compilation on FreeBSD gained UTF support. Some similar problem which I found on Internet:
http://www.velocityreviews.com/forums/t ... valid.html
Also I doubt that FreeOrion was also tested with Ogre 1.6.2. It was only with 1.6.1.
FreeOrion since last compilation on FreeBSD gained UTF support. Some similar problem which I found on Internet:
http://www.velocityreviews.com/forums/t ... valid.html
Also I doubt that FreeOrion was also tested with Ogre 1.6.2. It was only with 1.6.1.
Re: Problems compiling freeorion
I'm using r2983 right now.
Is there a way to get a more verbose output? Maybe from ogre? To see what really causes the abort here? The Posting you've linked to is kinda old.... hmmm
Is there a way to get a more verbose output? Maybe from ogre? To see what really causes the abort here? The Posting you've linked to is kinda old.... hmmm
Re: Problems compiling freeorion
It is strange that you don't have SSE3. But to the problem:
You have to debug FreeOrion: ogre, gg and FO have to be recompiled to enable debugging symbols. I would also try Ogre 1.6.1. UTF support was added to GG some months ago and it was never tested on FreeBSD and that may be problem. But without debugging it is hard to say where problem is. Also be certain that your graphic card supports OpenGL 2.x.
You have to debug FreeOrion: ogre, gg and FO have to be recompiled to enable debugging symbols. I would also try Ogre 1.6.1. UTF support was added to GG some months ago and it was never tested on FreeBSD and that may be problem. But without debugging it is hard to say where problem is. Also be certain that your graphic card supports OpenGL 2.x.
Re: Problems compiling freeorion
Ok I'll try that later.
After starting freeorion, for a short time, a black window pops up (or with -f the screen gets black) until the exception gets raised - but only for a very short time.
Regarding OpenGL - I guess my ATI does support 2.0 (HD3850) but I only have the radeonhd driver supplied by X.Org - no native binary AMD drivers....
So the performance will be kinda bad anyway but I just wana check it...
After starting freeorion, for a short time, a black window pops up (or with -f the screen gets black) until the exception gets raised - but only for a very short time.
Regarding OpenGL - I guess my ATI does support 2.0 (HD3850) but I only have the radeonhd driver supplied by X.Org - no native binary AMD drivers....
So the performance will be kinda bad anyway but I just wana check it...
Re: Problems compiling freeorion
There is problem with ATI cards. Currently there are not know minimum requirements for FreeOrion. On NVidia 6600 above FO is running. But on ATI we don't know. Open source ATI drivers may not have all required extensions. But you are probably first on this forum with ATI HD series. It would be nice to test FO with binary drivers.
Re: Problems compiling freeorion on FreeBSD 7
I read interesting things on this thread:
https://www.crystalspace3d.org/forum/in ... pic=1510.0
The "kernel per process data size limit" is an interesting point. I encountered simuilar problems on OpenSuSE systems in one project and had to increase such limits (ulimit on linux systems).
Maybe this limit is set on your system?
https://www.crystalspace3d.org/forum/in ... pic=1510.0
The "kernel per process data size limit" is an interesting point. I encountered simuilar problems on OpenSuSE systems in one project and had to increase such limits (ulimit on linux systems).
Maybe this limit is set on your system?
Re: Problems compiling freeorion on FreeBSD 7
I would say 32GB datsize should be enough:
olivleh1@kartoffel olivleh1> limit
cputime unlimited
filesize unlimited
datasize 33554432 kbytes
stacksize 524288 kbytes
coredumpsize unlimited
memoryuse unlimited
vmemoryuse unlimited
descriptors 11095
memorylocked unlimited
maxproc 5547
sbsize unlimited
olivleh1@kartoffel olivleh1>
olivleh1@kartoffel olivleh1> limit
cputime unlimited
filesize unlimited
datasize 33554432 kbytes
stacksize 524288 kbytes
coredumpsize unlimited
memoryuse unlimited
vmemoryuse unlimited
descriptors 11095
memorylocked unlimited
maxproc 5547
sbsize unlimited
olivleh1@kartoffel olivleh1>
Re: Problems compiling freeorion on FreeBSD 7
Then I would say that this problem is related to the fact that you use an ATI card. Another problem could be, that nvidias Cg is needed (on ATI systems too!) but not available for FreeBSD.
Re: Problems compiling freeorion on FreeBSD 7
Ok, now I got a freeorion+gigi with symbols but I'm not sure what to do here because the program exits normally. I must admit that I'm not that familiar with gdb...
Code: Select all
(gdb) file /usr/local/bin/freeorion
Reading symbols from /usr/local/bin/freeorion...done.
(gdb) run
Starting program: /usr/local/bin/freeorion /usr/local/bin/freeorion
[New LWP 100130]
[New Thread 0x8062020b0 (LWP 100130)]
main() caught exception(std::exception): basic_string::_S_construct NULL not valid
Program exited normally.
(gdb) bt
No stack.
(gdb) list
24
25 #ifdef FREEORION_WIN32
26 # define OGRE_INPUT_PLUGIN_NAME "GiGiOgrePlugin_OIS.dll"
27 #else
28 # define OGRE_INPUT_PLUGIN_NAME "libGiGiOgrePlugin_OIS.so"
29 #endif
30
31 int main(int argc, char* argv[])
32 {
33 InitDirs();
(gdb)
Re: Problems compiling freeorion on FreeBSD 7
RenderWindow* window = root->initialise(true, "FreeOrion " + FreeOrionVersionString());
in FreeOrion/client/human/chmain.cpp is raising the exception
in FreeOrion/client/human/chmain.cpp is raising the exception
Re: Problems compiling freeorion on FreeBSD 7
Looks like somthing in my GL is broken...
GLSupport::initialiseExtensions
from ogre is the function where the whole process stops
void GLSupport::initialiseExtensions(void)
{
// Set version string
const GLubyte* pcVer = glGetString(GL_VERSION);
assert(pcVer && "Problems getting GL version string using glGetString");
String tmpStr = (const char*)pcVer;
the assignment to tmpStr is causing the exception. Looks like glGetString does not return anything...
GLSupport::initialiseExtensions
from ogre is the function where the whole process stops
void GLSupport::initialiseExtensions(void)
{
// Set version string
const GLubyte* pcVer = glGetString(GL_VERSION);
assert(pcVer && "Problems getting GL version string using glGetString");
String tmpStr = (const char*)pcVer;
the assignment to tmpStr is causing the exception. Looks like glGetString does not return anything...