FreeOrion

Forums for the FreeOrion project
It is currently Sun May 19, 2013 4:59 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Scons + boost = error?
PostPosted: Fri Jun 20, 2008 4:52 pm 
Offline
Space Krill

Joined: Wed Jun 18, 2008 12:38 pm
Posts: 7
Hello everyone!

I'm trying to compile freeorion but running into trouble.

Boost 1.34 is installed:
Code:
[matjes@Data FreeOrion]$ rpm -qa | grep boost
boost-1.34.1-13.fc9.x86_64
boost-devel-1.34.1-13.fc9.i386
boost-1.34.1-13.fc9.i386
boost-doc-1.34.1-13.fc9.i386
boost-devel-static-1.34.1-13.fc9.i386

When I run scons in the sourcecode directory freeorion/trunk/FreeOrion I'm getting the following error:
Code:
[matjes@Data FreeOrion]$ scons
scons: Reading SConscript files ...
Configuring for POSIX system...
Checking for Py_Initialize() in C library python2.5... yes
Checking for pkg-config... yes
Checking for GiGiSDL >= 0.6.0... no
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking Boost version >= 1.34... (cached) yes
Checking for C++ header file boost/graph/dijkstra_shortest_paths.hpp... no
Boost configuration... (cached) no

But the file dijkstra_shortest_paths.hpp exists in the inlcude directory:
Code:
[matjes@Data FreeOrion]$ ls /usr/include/boost/graph/dijkstra_shortest_paths.hpp
/usr/include/boost/graph/dijkstra_shortest_paths.hpp

What am I doing wrong?


Top
 Profile  
 
 Post subject: Re: Scons + boost = error?
PostPosted: Sat Jun 21, 2008 6:18 am 
Offline
Compilation Expert
User avatar

Joined: Thu Jul 06, 2006 10:30 pm
Posts: 219
Location: Russia/Moscow
Post config.log created by scons.

_________________
In Soviet Russia, forum posts YOU!!


Top
 Profile  
 
 Post subject: Re: Scons + boost = error?
PostPosted: Sat Jun 21, 2008 8:55 am 
Offline
Space Krill

Joined: Wed Jun 18, 2008 12:38 pm
Posts: 7
loonycyborg wrote:
Post config.log created by scons.

Okay... here it comes ;)
Code:
[matjes@Data FreeOrion]$ cat config.log
file /home/matjes/freeorion/freeorion/trunk/FreeOrion/SConstruct,line 177:
   Configure(confdir = .sconf_temp)
scons: Configure: Checking for Py_Initialize() in C library python2.5...
.sconf_temp/conftest_0.c <-
  |
  |
  |#include "Python.h"
  |
  |int
  |main() {
  |  Py_Initialize();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_0.o -c -I/usr/include/python2.5 .sconf_temp/conftest_0.c
gcc -o .sconf_temp/conftest_0 .sconf_temp/conftest_0.o -L/usr/lib64 -lpython2.5
scons: Configure: yes

scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version 0.15.0
scons: Configure: yes

scons: Configure: Checking for GiGiSDL >= 0.6.0...
pkg-config GiGiSDL --atleast-version 0.6.0
scons: Configure: no

scons: Configure: Checking for C++ header file boost/shared_ptr.hpp...
.sconf_temp/conftest_3.cpp <-
  |
  |#include "boost/shared_ptr.hpp"
  |
  |
g++ -o .sconf_temp/conftest_3.o -c -I/usr/include/python2.5 .sconf_temp/conftest_3.cpp
scons: Configure: yes

scons: Configure: Checking Boost version >= 1.34...
scons: Configure: (cached) yes

scons: Configure: Checking for C++ header file boost/graph/dijkstra_shortest_paths.hpp...
.sconf_temp/conftest_4.cpp <-
  |
  |#include <boost/graph/dijkstra_shortest_paths.hpp>
  |
  |
g++ -o .sconf_temp/conftest_4.o -c -I/usr/include/python2.5 .sconf_temp/conftest_4.cpp
In file included from /usr/include/boost/graph/dijkstra_shortest_paths.hpp:19,
                 from .sconf_temp/conftest_4.cpp:2:
/usr/include/boost/pending/relaxed_heap.hpp: In member function 'size_t boost::relaxed_heap<IndexedType, Compare, ID>::log_base_2(size_t)':
/usr/include/boost/pending/relaxed_heap.hpp:101: error: 'CHAR_BIT' was not declared in this scope
scons: Configure: no

scons: Configure: Boost configuration...
scons: Configure: (cached) no

Seems that there is a missing #include to limits.h (in this file is CHAR_BIT defined). I already did a little google search for the scons function Configure.CheckHeader but didn't found a way to do the necessary #include before testing for the dijkstra header -.-

I hope it can be fixed ^^


Top
 Profile  
 
 Post subject: Re: Scons + boost = error?
PostPosted: Sat Jun 21, 2008 9:54 am 
Offline
Compilation Expert
User avatar

Joined: Thu Jul 06, 2006 10:30 pm
Posts: 219
Location: Russia/Moscow
CheckHeader can take a list of include files, so it's possible to pass limits.h along with dijkstra_shortest_paths.hpp . But IMO boost should take care of including files that it needs itself..

_________________
In Soviet Russia, forum posts YOU!!


Top
 Profile  
 
 Post subject: Re: Scons + boost = error?
PostPosted: Sat Jun 21, 2008 2:45 pm 
Offline
Space Krill

Joined: Wed Jun 18, 2008 12:38 pm
Posts: 7
Hello!

With the list of headers it works... but can i tell scons which compiler he has to use? Because boost isn't compatible with gcc version 4.3.x.
So I have to tell scons to use g++34 instead of g++.


Top
 Profile  
 
 Post subject: Re: Scons + boost = error?
PostPosted: Sat Jun 21, 2008 5:48 pm 
Offline
Compilation Expert
User avatar

Joined: Thu Jul 06, 2006 10:30 pm
Posts: 219
Location: Russia/Moscow
With command line options you can't AFAIK. Either modify SConstruct to set env["CXX"] = "g++-3.4" or switch compiler e.g. with Gentoo's gcc-config.

_________________
In Soviet Russia, forum posts YOU!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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 © 2000, 2002, 2005, 2007 phpBB Group