Problems Compiling freeorion (from svn)

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
tedbronson
Space Krill
Posts: 9
Joined: Mon Aug 06, 2007 10:51 pm

Re: Problems Compiling freeorion (from svn)

#16 Post by tedbronson »

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 :-(

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: Problems Compiling freeorion (from svn)

#17 Post by loonycyborg »

Make sure /usr/local/lib is in /etc/ld.so.conf; then run ldconfig as root.
In Soviet Russia, forum posts YOU!!

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

Re: Problems Compiling freeorion (from svn)

#18 Post by kroddn »

Or you can run freeorion like this:

Code: Select all

export LD_LIBRARY_PATH=/usr/local/lib
./freeorion

quantax
Space Krill
Posts: 6
Joined: Fri Feb 29, 2008 10:56 am

Re: Problems Compiling freeorion (from svn)

#19 Post by quantax »

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:

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
Do so few people have this problem, or why doesn't it get fixed for so an long time?
Last edited by quantax on Fri Feb 29, 2008 3:08 pm, edited 1 time in total.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Problems Compiling freeorion (from svn)

#20 Post by Geoff the Medio »

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:
*** ../../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
Do so few people have this problem, or why doesn't it get fixed for so an long time?
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.

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

Re: Problems Compiling freeorion (from svn)

#21 Post by tzlaine »

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.

quantax
Space Krill
Posts: 6
Joined: Fri Feb 29, 2008 10:56 am

Re: Problems Compiling freeorion (from svn)

#22 Post by quantax »

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?

lfmarante
Space Krill
Posts: 1
Joined: Mon Mar 03, 2008 4:16 pm

Re: Problems Compiling freeorion (from svn)

#23 Post by lfmarante »

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.

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: Problems Compiling freeorion (from svn)

#24 Post by obgr_seneca »

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...

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: Problems Compiling freeorion (from svn)

#25 Post by obgr_seneca »

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

hagish
Space Krill
Posts: 3
Joined: Tue Apr 01, 2008 11:37 pm

Re: Problems Compiling freeorion (from svn)

#26 Post by hagish »

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.

TomChiverton
Space Floater
Posts: 17
Joined: Sun Jun 29, 2008 9:31 pm

Re: Problems Compiling freeorion (from svn)

#27 Post by TomChiverton »

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.
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.

User avatar
igrok
Space Krill
Posts: 7
Joined: Tue Jul 22, 2008 4:43 am
Location: Massachusetts, USA

Re: Problems Compiling freeorion (from svn)

#28 Post by igrok »

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.

Post Reply