Problems Compiling freeorion (from svn)
Moderator: Oberlus
-
- Space Krill
- Posts: 9
- Joined: Mon Aug 06, 2007 10:51 pm
Re: Problems Compiling freeorion (from svn)
Thanks for the tip about slocate, I'll try that the next time I need to find a file.
I'm still pretty new to linux, though I am getting used to it slowly but surely.
No, I don't remember seeing any errors when building graphviz, but if they don't halt the process I am not likely to catch them.
It seems to me that both PI and PS2INCH are constants, and by putting those #define statements into TechTreeWnd.cpp I was able to finish the build.
Unfortunately, trying to run freeorion gives the error message "freeorion: error while loading shared libraries: libGiGiSDL.so: cannot open shared object file: No such file or directory"
I found libGiGiSDL.so right where it's supposed to be in /usr/local/lib , even reran scons and scons install in the GG directory, which assured me gigi was up to date
I'm still pretty new to linux, though I am getting used to it slowly but surely.
No, I don't remember seeing any errors when building graphviz, but if they don't halt the process I am not likely to catch them.
It seems to me that both PI and PS2INCH are constants, and by putting those #define statements into TechTreeWnd.cpp I was able to finish the build.
Unfortunately, trying to run freeorion gives the error message "freeorion: error while loading shared libraries: libGiGiSDL.so: cannot open shared object file: No such file or directory"
I found libGiGiSDL.so right where it's supposed to be in /usr/local/lib , even reran scons and scons install in the GG directory, which assured me gigi was up to date
- loonycyborg
- Compilation Expert
- Posts: 219
- Joined: Thu Jul 06, 2006 10:30 pm
- Location: Russia/Moscow
Re: Problems Compiling freeorion (from svn)
Make sure /usr/local/lib is in /etc/ld.so.conf; then run ldconfig as root.
In Soviet Russia, forum posts YOU!!
Re: Problems Compiling freeorion (from svn)
Or you can run freeorion like this:
Code: Select all
export LD_LIBRARY_PATH=/usr/local/lib
./freeorion
Re: Problems Compiling freeorion (from svn)
I also get the compile error of the original poster here on Linux with any SVN revision I tried to compile up to now. I have graphviz 2.16.1 installed.
I fixed this problem by pasting parts of graphviz's arith.h and geom.h into TechTreeWnd.cpp. Here is a patch:
Do so few people have this problem, or why doesn't it get fixed for so an long time?
I fixed this problem by pasting parts of graphviz's arith.h and geom.h into TechTreeWnd.cpp. Here is a patch:
Code: Select all
*** ../../freeorion/FreeOrion/UI/TechTreeWnd.cpp 2008-01-24 18:39:02.000000000 +0100
--- UI/TechTreeWnd.cpp 2008-01-24 20:58:37.000000000 +0100
***************
*** 20,25 ****
--- 20,36 ----
#include <boost/format.hpp>
#include <algorithm>
+ #ifndef M_PI
+ #define M_PI 3.14159265358979323846
+ #endif
+
+ #ifndef PI
+ #define PI M_PI
+ #endif
+
+ #define POINTS_PER_INCH 72
+ #define POINTS(f_inch) (ROUND((f_inch)*POINTS_PER_INCH))
+ #define PS2INCH(ps) ((ps)/(double)POINTS_PER_INCH)
namespace {
// command-line options
Last edited by quantax on Fri Feb 29, 2008 3:08 pm, edited 1 time in total.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Problems Compiling freeorion (from svn)
Apparently there's something about 2.16.1 that causes this problem. It's not been fixed because no developers have had it, and nobody's submitted a patch until now.quantax wrote:I also get the compile error of the original poster here on Linux with any SVN revision I tried to compile up to now. I have graphviz 2.16.1 installed.
I fixed this problem by pasting parts of graphviz's arith.h and geom.h into TechTreeWnd.cpp. Here is a patch:Do so few people have this problem, or why doesn't it get fixed for so an long time?*** ../../freeorion/FreeOrion/UI/TechTreeWnd.cpp 2008-01-24 18:39:02.000000000 +0100
--- UI/TechTreeWnd.cpp 2008-01-24 20:58:37.000000000 +0100
***************
*** 20,25 ****
--- 20,36 ----
#include <boost/format.hpp>
#include <algorithm>
+ #ifndef M_PI
+ #define M_PI 3.14159265358979323846
+ #endif
+
+ #ifndef PI
+ #define PI M_PI
+ #endif
+
+ #define POINTS_PER_INCH 72
+ #define POINTS(f_inch) (ROUND((f_inch)*POINTS_PER_INCH))
+ #define PS2INCH(ps) ((ps)/(double)POINTS_PER_INCH)
namespace {
// command-line options
Re: Problems Compiling freeorion (from svn)
In short, graphviz changes a lot, and you should only use the version known to work with FO (as indicated in build_config.py). If you change your graphviz version to something else, you're on your own.
Re: Problems Compiling freeorion (from svn)
Well that's the version from my Distro...
But more generally: Wouldn't it be good for FreeOrion if it builds with a more recent version?
But more generally: Wouldn't it be good for FreeOrion if it builds with a more recent version?
Re: Problems Compiling freeorion (from svn)
Hello,
Same problem, solved manualy with quantax patch.
And yes i'm in my own with my media-gfx/graphviz-2.16.1-r3 and also 2.18.
Same problem, solved manualy with quantax patch.
And yes i'm in my own with my media-gfx/graphviz-2.16.1-r3 and also 2.18.
-
- Space Floater
- Posts: 34
- Joined: Wed Mar 12, 2008 9:00 am
- Location: Horb, Germany
Re: Problems Compiling freeorion (from svn)
tzlaine wrote:In short, graphviz changes a lot, and you should only use the version known to work with FO (as indicated in build_config.py). If you change your graphviz version to something else, you're on your own.
What a remarkable opinion...
Is there any distro that is going to keep old versions of graphviz because FO isn't going to work with newer ones?
You know you do great work here, but...
-
- Space Floater
- Posts: 34
- Joined: Wed Mar 12, 2008 9:00 am
- Location: Horb, Germany
Re: Problems Compiling freeorion (from svn)
By the way, using the above patch it's compiling and working with graphviz-2.16.1, rpm-packages of revision 2511 will be available on the mandrivauser.de ftp server tomorrow for Mandriva-2008.1
Oliver
Oliver
Re: Problems Compiling freeorion (from svn)
I also needed to apply a patch like the one posted by "quantax" because of missing defines.
Except for this the current version compiled and worked under Ubuntu Hardy.
Except for this the current version compiled and worked under Ubuntu Hardy.
-
- Space Floater
- Posts: 17
- Joined: Sun Jun 29, 2008 9:31 pm
Re: Problems Compiling freeorion (from svn)
Well, either you add a new conditional compilation bit for the newer version, or just import the functions as per the patch - then it works on old and new versions of graphviz.tzlaine wrote:In short, graphviz changes a lot, and you should only use the version known to work with FO (as indicated in build_config.py). If you change your graphviz version to something else, you're on your own.
Re: Problems Compiling freeorion (from svn)
Same build problems with r2642 and graphviz-2.18. quantax's patch to UI/TechTreeWnd.cpp resolved the issue.
If committing this patch is not the "right way" to fix the issue, I'd be happy to add it to the Compile wiki page. It sounds like anyone that updates all system packages before building FO will have this issue.
If committing this patch is not the "right way" to fix the issue, I'd be happy to add it to the Compile wiki page. It sounds like anyone that updates all system packages before building FO will have this issue.