GG build problem

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
Remontoir
Space Krill
Posts: 4
Joined: Sat Nov 19, 2005 10:11 am

GG build problem

#1 Post by Remontoir »

Hello
i have downloaded GG by CVS, installed scons, boost and so on (except FMOD)

But I can't comile GG :


# scons
scons: Reading SConscript files ...
Using previous successful configuration; if you want to re-run the configuration step, run "scons configure".
scons: done reading SConscript files.
scons: Building targets ...
g++ -pthread -D_REENTRANT -Wall -O2 -fPIC -I/usr/include/SDL -I/usr/include/freetype2 -Iinclude -Iinclude/net -Iinclude/SDL -Iinclude/dialogs -Ilibltdl -c -o src/GGApp.os src/GGApp.cpp
include/GGBase.h:123: error: ISO C++ forbids declaration of 'sp_counted_base_impl' with no type
include/GGBase.h:123: error: typedef name may not be a nested-name-specifier
include/GGBase.h:123: error: expected ';' before '<' token
include/GGBrowseInfoWnd.h:135: error: expected constructor, destructor, or type conversion before ';' token
scons: *** [src/GGApp.os] Error 1
scons: building terminated because of errors.


Can someone explain me what I have done worng ?
Thx

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

#2 Post by Yoghurt »

You will also need the serialization module of boost.

SConstruct's configure does not yet check for all required boost modules. You'll also need boost's signals lib, filesystem, graph and thread, IIRC.

Edit: It seems like you are trying to compile with boost 1.33. GiGi does only support 1.32, not 1.33

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

#3 Post by Yoghurt »

I've uploaded a patch that should make GiGi compile with Boost 1.33

Download it here, then change into the GG/include directory, and do

Code: Select all

patch < /path/to/gigi.diff

Remontoir
Space Krill
Posts: 4
Joined: Sat Nov 19, 2005 10:11 am

#4 Post by Remontoir »

Worked perfectly well; thx a lot :)

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

#5 Post by Yoghurt »

Although FreeOrion will not compile with this patch. Even if you make the obvious fix to always include shared_ptr_132.hpp when shared_ptr is included, FO will segfault. I'll see what I can do

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

#6 Post by ilya_tau »

I don't want to make new topic, therefore I write here.
I realy don't understand I can't compile a GG

Code: Select all

scons with_boost_include=/usr/include/boost/ boost_lib_suffix=-gcc
scons: Reading SConscript files ...
Configuring for POSIX system...
Checking for C++ header file boost/shared_ptr.hpp... no
Boost configuration... failed
and I cheked boost in /usr/iclude/
and I have boost 1.33.1
Please help me.
Thank you

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

#7 Post by tzlaine »

ilya_tau wrote:I don't want to make new topic, therefore I write here.
I realy don't understand I can't compile a GG

Code: Select all

scons with_boost_include=/usr/include/boost/ boost_lib_suffix=-gcc
scons: Reading SConscript files ...
Configuring for POSIX system...
Checking for C++ header file boost/shared_ptr.hpp... no
Boost configuration... failed
and I cheked boost in /usr/iclude/
and I have boost 1.33.1
Please help me.
Thank you
Please post your config.log file.

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

#8 Post by ilya_tau »

Here you are.

Code: Select all

file /usr/lib/python2.4/site-packages/SCons/Environment.py,line 1019:
	Configure( confdir = .sconf_temp )

Checking for C++ header file boost/shared_ptr.hpp... .sconf_temp/conftest_0.cpp <- 
  |
  |#include "boost/shared_ptr.hpp"
  |
  |
-I/usr/include/boost -c -o .sconf_temp/conftest_0.o .sconf_temp/conftest_0.cpp
sh: -/: invalid option
Usage:	sh [GNU long option] [option] ...
	sh [GNU long option] [option] script-file ...
GNU long options:
	--debug
	--debugger
	--dump-po-strings
	--dump-strings
	--help
	--init-file
	--login
	--noediting
	--noprofile
	--norc
	--posix
	--protected
	--rcfile
	--restricted
	--verbose
	--version
	--wordexp
Shell options:
	-irsD or -c command or -O shopt_option		(invocation only)
	-abefhkmnptuvxBCHP or -o option
scons: *** [.sconf_temp/conftest_0.o] Error 2
no
Failed program was:
1: 
2: #include "boost/shared_ptr.hpp"
3: 
Error message: failed to compile test program
Boost configuration... 
Result: failed

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

#9 Post by tzlaine »

ilya_tau wrote:

Code: Select all

-I/usr/include/boost -c -o .sconf_temp/conftest_0.o
This is a failure of your SCons and/or Python setup. the line above should have a "g++" at the beginning of it, obviously. I have no idea what the problem is; you should try the SCons mailing list.

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

#10 Post by ilya_tau »

Thank you, it's realy helped me, because it was realy trivial solution. I didn't have g++ on my computer :oops:

Post Reply