Problem with graphviz and FO compilation

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
Wolverine
Space Floater
Posts: 44
Joined: Wed Apr 13, 2005 6:07 pm
Location: Warsaw, Poland

Problem with graphviz and FO compilation

#1 Post by Wolverine »

I know that Yoghurt fixed problems with graphviz/dot.h, but I still have problem compiling FO.

Code: Select all

[wolverine@wolverine FreeOrion]$ scons
scons: Reading SConscript files ...
Configuring for POSIX system...
Checking for pkg-config... yes
Checking for GiGiSDL >= 0.6.0... yes
Checking for log4cpp >= 0.3.4b... yes
Checking for C++ header file log4cpp/Category.hh... yes
Checking for log4cpp::Category::getRoot() in C++ library log4cpp... yes
Checking for fmod >= 3.74... no
Checking fmod version >= 3.74... (cached) yes
Checking for C header file fmod.h... yes
Checking for FSOUND_GetVersion() in C library fmod-3.74... yes
Checking for graphviz >= 0.15.0... no
Checking for C header file graphviz/render.h... no
Checking for C header file render.h... no
Could somebody fix it? And btw. why FO CVS is not updated for few days?
The emperor wants to control outer space. Yoda wants to control inner space. That's the fundamental difference between the good and the bad sides of the force... - Mof, Human Traffic ;)

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

Re: Problem with graphviz and FO compilation

#2 Post by Geoff the Medio »

Have you defined the include directory for graphviz? eg.

scons with_graphviz_include=c:\thepath\
And btw. why FO CVS is not updated for few days?
It might have something to do with Christmas or Hanukkah or other concurrent holidays and observances, or could be just normal random times between updates. tzlaine, who is the biggest source of changes to FO, also works a lot on GiGi, which doesn't show up in the FreeOrion CVS logs. As well, the one of the current two crash bugs is somewhat weird and difficult to reproduce ones, which makes it hard to fix, and the other hasn't received a reply to a request for additional info, so can't really be dealt with yet (I suspect).

Wolverine
Space Floater
Posts: 44
Joined: Wed Apr 13, 2005 6:07 pm
Location: Warsaw, Poland

Re: Problem with graphviz and FO compilation

#3 Post by Wolverine »

Geoff the Medio wrote:Have you defined the include directory for graphviz? eg.

scons with_graphviz_include=c:\thepath\
Yeah. I did that. It's the same problem I have discussed with Yoghurt regarding #include <graphviz/dot.h>. render.h is now obsolete with newer versions of graphviz, so I suppose that somebody should fix it to match newer graphviz versions.
The emperor wants to control outer space. Yoda wants to control inner space. That's the fundamental difference between the good and the bad sides of the force... - Mof, Human Traffic ;)

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

#4 Post by Geoff the Medio »

The Comple page does specifically say to use graphviz 2.0 or 2.2, not 1.16, 2.4 nor 2.6. Whether that's temporary or permanent, I don't know, but for now you'll have to use an approved version, I suspect...

Wolverine
Space Floater
Posts: 44
Joined: Wed Apr 13, 2005 6:07 pm
Location: Warsaw, Poland

Crap

#5 Post by Wolverine »

I had graphviz 2.2 and it wasn't working with newest CVS unfortunatelly. I don't want to revert from 2.7 back to 2.2, because some of my newest software requires at least 2.6. So I guess I'll have to forget about compiling FO for a while. Crap... :(
The emperor wants to control outer space. Yoda wants to control inner space. That's the fundamental difference between the good and the bad sides of the force... - Mof, Human Traffic ;)

ilya_tau
Space Krill
Posts: 6
Joined: Fri Mar 03, 2006 6:42 pm
Location: Israel

#6 Post by ilya_tau »

I have problem with graphviz too.

Code: Select all

 scons with_boost_include=/usr/include/boost/ boost_lib_suffix=-gcc with_graphviz_include=/usr/include/graphviz/
scons: Reading SConscript files ...
Configuring for POSIX system...
Checking for pkg-config... ok
Checking for GiGiSDL >= 0.6.0... ok
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking Boost version >= 1.33.1... yes
Looking for boost lib boost_serialization-gcc...
Checking for boost::archive::binary_iarchive::is_saving() in C++ library boost_serialization-gcc... yes
Looking for boost lib boost_iostreams-gcc...
Checking for main() in C++ library boost_iostreams-gcc... yes
Boost configuration... ok
Checking for graphviz >= 0.15.0... failed
Checking for libdotneato >= 0.15.0... failed
Checking for C header file graphviz/render.h... yes
Checking for begin_component() in C library dotgen... no
and end of config.log :

Code: Select all

g++ -pthread -I/usr/local/include/GG/SDL -I/usr/local/include/GG/net -I/usr/include/SDL -I/usr/local/include/GG -I/usr/local/include/GG/dialogs -I/usr/include/boost -c -o .sconf_temp/conftest_4.o .sconf_temp/conftest_4.cpp
g++ -pthread -o .sconf_temp/conftest_4 .sconf_temp/conftest_4.o -L/usr/local/lib -lGiGiSDL -lSDL -lGiGiNet -lIL -lILU -lILUT -lGiGi -lboost_signals-gcc -lboost_filesystem-gcc -lGL -lGLU -lpthread -lz -lfreetype -lboost_serialization-gcc -lboost_iostreams-gcc
yes
Boost configuration... 
Result: ok

Checking for graphviz >= 0.15.0... 
pkg-config graphviz --atleast-version 0.15.0
scons: *** [.sconf_temp/conftest_5] Error 1
Result: failed

Checking for libdotneato >= 0.15.0... 
pkg-config libdotneato --atleast-version 0.15.0
scons: *** [.sconf_temp/conftest_6] Error 1
Result: failed

Checking for C header file graphviz/render.h... .sconf_temp/conftest_7.c <- 
  |
  |#include "graphviz/render.h"
  |
  |
gcc -pthread -I/usr/local/include/GG/SDL -I/usr/local/include/GG/net -I/usr/include/SDL -I/usr/local/include/GG -I/usr/local/include/GG/dialogs -I/usr/include/boost -I/usr/include/graphviz -c -o .sconf_temp/conftest_7.o .sconf_temp/conftest_7.c
yes
Checking for begin_component() in C library dotgen... .sconf_temp/conftest_8.c <- 
  |
  |            
  |            #include <graphviz/render.h>
  |#include <graphviz/dotprocs.h> 
  |            int
  |            main() {
  |            begin_component();
  |            return 0;
  |            }
  |            
  |
  |
gcc -pthread -I/usr/local/include/GG/SDL -I/usr/local/include/GG/net -I/usr/include/SDL -I/usr/local/include/GG -I/usr/local/include/GG/dialogs -I/usr/include/boost -I/usr/include/graphviz -c -o .sconf_temp/conftest_8.o .sconf_temp/conftest_8.c
gcc -pthread -o .sconf_temp/conftest_8 .sconf_temp/conftest_8.o -L/usr/local/lib -lGiGiSDL -lSDL -lGiGiNet -lIL -lILU -lILUT -lGiGi -lboost_signals-gcc -lboost_filesystem-gcc -lGL -lGLU -lpthread -lz -lfreetype -lboost_serialization-gcc -lboost_iostreams-gcc -lcdt -lcommon -ldotgen -ldotneato -lgraph -lgvrender -lpathplan -ldotgen
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: cannot find -lcdt
collect2: ld returned 1 exit status
scons: *** [.sconf_temp/conftest_8] Error 1
no
Failed program was:
1: 
2:             
3:             #include <graphviz/render.h>
4: #include <graphviz/dotprocs.h> 
5:             int
6:             main() {
7:             begin_component();
8:             return 0;
9:             }
10:             
11: 
Error message: failed to build test program
sombody can explayn me that does it meen?
Thanks

P.S. I have graphviz version: 2.2-6

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

#7 Post by Geoff the Medio »

Edit: Nevermind, you edited your post whilst I was asking...

I don't know much about SCons, but what version of graphviz are you using? The software requirements are rather specific...

ilya_tau
Space Krill
Posts: 6
Joined: Fri Mar 03, 2006 6:42 pm
Location: Israel

#8 Post by ilya_tau »

I wrote it in P.S.
version: 2.2-6

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#9 Post by Yoghurt »

You will need to specify the path to the libs too, probably

with_graphviz_libdir=/usr/lib/graphviz

Also, in that case, you will have to either set LD_LIBRARY_PATH or modify ld.so.conf to get freeorion to run.

First method:

Code: Select all

export LD_LIBRARY_PATH=/usr/lib/graphviz #or whatever your path is
./freeorion
Second version, add

/usr/lib/graphviz to /etc/ld.so.conf and rerun ldconfig.

(And yes, maybe we should set rpath when linking so that would not be necessary)

Post Reply