Gentoo compile problem

For topics that do not fit in another sub-forum.

Moderators: Oberlus, Oberlus

Post Reply
Message
Author
meertn
Space Krill
Posts: 3
Joined: Fri Nov 18, 2005 7:34 pm

Gentoo compile problem

#1 Post by meertn » Mon Nov 27, 2006 10:13 am

I've trying to compile freeorion for some time, but I get the following message:

Code: Select all

$ scons
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... 
Checking for boost::archive::binary_iarchive::is_saving() in C++ library boost_serialization... no
Checking for boost::archive::binary_iarchive::is_saving() in C++ library boost_serialization-mt... no
Boost configuration... failed

Code: Select all

$ cat config.log 

file /usr/lib/scons/SCons/Environment.py,line 1019:
        Configure( confdir = .sconf_temp )

Checking for pkg-config... 
pkg-config --atleast-pkgconfig-version 0.15.0
Result: ok

Checking for GiGiSDL >= 0.6.0... 
pkg-config GiGiSDL --atleast-version 0.6.0
Result: ok

Checking for C++ header file boost/shared_ptr.hpp... .sconf_temp/conftest_2.cpp <- 
  |
  |#include "boost/shared_ptr.hpp"
  |
  |
g++ -pthread -I/usr/include/GG/SDL -I/usr/include/GG/net -I/usr/include/SDL -I/usr/include/GG -I/usr/include/GG/dialogs -c -o .sconf_temp/conftest_2.o .sconf_temp/conftest_2.cpp
yes
Checking Boost version >= 1.33.1... 
Result: yes

Checking for boost::archive::binary_iarchive::is_saving() in C++ library boost_serialization... .sconf_temp/conftest_3.cpp <- 
  |
  |            
  |            #include "boost/archive/binary_iarchive.hpp"
  | 
  |            int
  |            main() {
  |            boost::archive::binary_iarchive::is_saving();
  |            return 0;
  |            }
  |            
  |
  |
g++ -pthread -I/usr/include/GG/SDL -I/usr/include/GG/net -I/usr/include/SDL -I/usr/include/GG -I/usr/include/GG/dialogs -c -o .sconf_temp/conftest_3.o .sconf_temp/conftest_3.cpp
g++ -pthread -o .sconf_temp/conftest_3 .sconf_temp/conftest_3.o -lGiGiSDL -lSDL -lGiGiNet -lIL -lILU -lILUT -lGiGi -lboost_signals -lboost_filesystem -lGL -lGLU -lpthread -lz -lfreetype -lboost_serialization
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: warning: libboost_signals.so.1.32.0, needed by /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libGiGiSDL.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: warning: libboost_filesystem.so.1.32.0, needed by /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libGiGiSDL.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libGiGi.so: undefined reference to `boost::signals::detail::named_slot_map_iterator::~named_slot_map_iterator [in-charge]()'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libGiGi.so: undefined reference to `boost::signals::detail::signal_base_impl::connect_slot(boost::any const&, boost::any const&, boost::shared_ptr<boost::signals::detail::slot_base::data_t>, boost::signals::connect_position)'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libGiGi.so: undefined reference to `boost::signals::detail::signal_base::signal_base[not-in-charge](boost::function2<bool, boost::any, boost::any, std::allocator<boost::function_base> > const&, boost::any const&)'
collect2: ld returned 1 exit status
scons: *** [.sconf_temp/conftest_3] Error 1
no
Failed program was:
1: 
2:             
3:             #include "boost/archive/binary_iarchive.hpp"
4:  
5:             int
6:             main() {
7:             boost::archive::binary_iarchive::is_saving();
8:             return 0;
9:             }
10:             
11: 
Error message: failed to build test program
Checking for boost::archive::binary_iarchive::is_saving() in C++ library boost_serialization-mt... .sconf_temp/conftest_4.cpp <- 
  |
  |            
  |            #include "boost/archive/binary_iarchive.hpp"
  | 
  |            int
  |            main() {
  |            boost::archive::binary_iarchive::is_saving();
  |            return 0;
  |            }
  |            
  |
  |
g++ -pthread -I/usr/include/GG/SDL -I/usr/include/GG/net -I/usr/include/SDL -I/usr/include/GG -I/usr/include/GG/dialogs -c -o .sconf_temp/conftest_4.o .sconf_temp/conftest_4.cpp
g++ -pthread -o .sconf_temp/conftest_4 .sconf_temp/conftest_4.o -lGiGiSDL -lSDL -lGiGiNet -lIL -lILU -lILUT -lGiGi -lboost_signals -lboost_filesystem -lGL -lGLU -lpthread -lz -lfreetype -lboost_serialization-mt
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lboost_serialization-mt
collect2: ld returned 1 exit status
scons: *** [.sconf_temp/conftest_4] Error 1
no
Failed program was:
1: 
2:             
3:             #include "boost/archive/binary_iarchive.hpp"
4:  
5:             int
6:             main() {
7:             boost::archive::binary_iarchive::is_saving();
8:             return 0;
9:             }
10:             
11: 
Error message: failed to build test program
Boost configuration... 
Result: failed
I use gentoo, I have emerged the proper packages I believe, I tried boost-1.33.1 and boost-1.33.1-r1, and I also tried compiling it myself, but the problem remained. Anyone an idea what to do?

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

#2 Post by tzlaine » Mon Nov 27, 2006 3:09 pm

Well, I see something wrong. This:

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: warning: libboost_signals.so.1.32.0, needed by /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libGiGiSDL.so, not found (try using -rpath or -rpath-link)

appears after the GG pkconfig files are read and used. This probably means that you built GG against version 1.32.0 of Boost and then installed it. Rebuild GG with your current version of Boost and re-install it, then build FreeOrion.

meertn
Space Krill
Posts: 3
Joined: Fri Nov 18, 2005 7:34 pm

#3 Post by meertn » Mon Dec 04, 2006 10:06 am

Ok, now I'm rebuilding GG (rev 562), configuration runs fine, but when building I get the following error:

Code: Select all

g++ -pthread -D_REENTRANT -Wall -O2 -fPIC -I/usr/include/SDL -I/usr/include/freetype2 -I. -Ilibltdl -c -o src/StyleFactory.os src/StyleFactory.cpp
In file included from src/StyleFactory.cpp:36:
GG/Spin.h: In member function `virtual void
   GG::Spin<T>::DefineAttributes(GG::WndEditor*)':
GG/Spin.h:528: error: syntax error before `>' token
GG/Spin.h:529: error: syntax error before `>' token
GG/Spin.h:531: error: syntax error before `>' token
GG/Spin.h:533: error: syntax error before `>' token
GG/Spin.h:536: error: syntax error before `>' token
scons: *** [src/StyleFactory.os] Error 1
scons: building terminated because of errors.

Code: Select all

$ cat config.log

file /usr/lib/scons/SCons/Environment.py,line 1019:
        Configure( confdir = .sconf_temp )

Checking for C++ header file boost/shared_ptr.hpp... scons: `.sconf_temp/conftest_0.cpp' is up to date.
scons: `.sconf_temp/conftest_0.o' is up to date.
yes
Checking Boost version >= 1.33.1...
Result: yes

Checking for boost::signals::connection() in C++ library boost_signals... scons: `.sconf_temp/conftest_1.cpp' is up to date.
scons: `.sconf_temp/conftest_1' is up to date.
yes
Checking for boost::filesystem::initial_path() in C++ library boost_filesystem... scons: `.sconf_temp/conftest_2.cpp' is up to date.
scons: `.sconf_temp/conftest_2' is up to date.
yes
Boost configuration...
Result: ok

Checking for C header file pthread.h... scons: `.sconf_temp/conftest_3.c' is up to date.
scons: `.sconf_temp/conftest_3.o' is up to date.
yes
Checking for pthread_create() in C library pthread... scons: `.sconf_temp/conftest_4.c' is up to date.
scons: `.sconf_temp/conftest_4' is up to date.
yes
Checking for C header file GL/gl.h... scons: `.sconf_temp/conftest_5.c' is up to date.
scons: `.sconf_temp/conftest_5.o' is up to date.
yes
Checking for C header file GL/glu.h... scons: `.sconf_temp/conftest_6.c' is up to date.
scons: `.sconf_temp/conftest_6.o' is up to date.
yes
Checking for glBegin() in C library GL... scons: `.sconf_temp/conftest_7.c' is up to date.
scons: `.sconf_temp/conftest_7' is up to date.
yes
Checking for gluLookAt() in C library GLU... scons: `.sconf_temp/conftest_8.c' is up to date.
scons: `.sconf_temp/conftest_8' is up to date.
yes
Checking for sdl-config...
Result: yes

Checking SDL version >= 1.2.7...
Result: yes

Linking SDL/OpenGL test app...
scons: `.sconf_temp/conftest_9.c' is up to date.
scons: `.sconf_temp/conftest_9' is up to date.
Result: ok

SDL configuration...
Result: ok

Checking for pkg-config...
pkg-config --atleast-pkgconfig-version 0.15.0
Result: ok

Checking for freetype2 >= 9.0.0...
pkg-config freetype2 --atleast-version 9.0.0
Result: ok

Checking for C header file ft2build.h... scons: `.sconf_temp/conftest_12.c' is up to date.
scons: `.sconf_temp/conftest_12.o' is up to date.
yes
Checking for FT_Init_FreeType() in C library freetype... scons: `.sconf_temp/conftest_13.c' is up to date.
scons: `.sconf_temp/conftest_13' is up to date.
yes
Checking DevIL version >= 1.6.1...
Result: yes

Checking for C header file IL/il.h... scons: `.sconf_temp/conftest_14.c' is up to date.
scons: `.sconf_temp/conftest_14.o' is up to date.
yes
Checking for C header file IL/ilu.h... scons: `.sconf_temp/conftest_15.c' is up to date.
scons: `.sconf_temp/conftest_15.o' is up to date.
yes
Checking for C header file IL/ilut.h... scons: `.sconf_temp/conftest_16.c' is up to date.
scons: `.sconf_temp/conftest_16.o' is up to date.
yes
Checking for ilInit() in C library IL... scons: `.sconf_temp/conftest_17.c' is up to date.
scons: `.sconf_temp/conftest_17' is up to date.
yes
Checking for iluInit() in C library ILU... scons: `.sconf_temp/conftest_18.c' is up to date.
scons: `.sconf_temp/conftest_18' is up to date.
yes
Checking for ilutInit() in C library ILUT... scons: `.sconf_temp/conftest_19.c' is up to date.
scons: `.sconf_temp/conftest_19' is up to date.
yes
scons: `.sconf_temp/conftest_20.c' is up to date.
scons: `.sconf_temp/conftest_20.o' is up to date.
scons: `.sconf_temp/conftest_21.c' is up to date.
(cached): Building ".sconf_temp/conftest_21.o" failed in a previous run.
scons: *** [.sconf_temp/conftest_21.o] Error 1
Generating libltdl/config.h using libltdl/configure...
Result: ok

Configuration successful...
Result: yes
Any ideas?

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

#4 Post by Geoff the Medio » Mon Dec 04, 2006 10:23 am

What version of GCC are you using?

meertn
Space Krill
Posts: 3
Joined: Fri Nov 18, 2005 7:34 pm

#5 Post by meertn » Mon Dec 04, 2006 10:55 am

3.3.6

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

#6 Post by tzlaine » Mon Dec 04, 2006 2:02 pm

meertn wrote:3.3.6
Sorry, but that's your problem. Upgrade to a 4.X compiler.

Dildrum
Space Krill
Posts: 1
Joined: Mon May 26, 2008 1:30 pm

Re: Gentoo compile problem

#7 Post by Dildrum » Mon May 26, 2008 1:43 pm

I've downloaded the source & tried to compile.
Unfortunately I get the following:

~/trunk/FreeOrion/GG$ sudo scons install
[sudo] password for jan:
scons: Reading SConscript files ...
Checking for pkg-config... yes
Configuring for POSIX system...
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking Boost version >= 1.34... (cached) yes
Looking for boost lib boost_signals...
Checking for boost::signals::connection() in C++ library boost_signals... yes
Looking for boost lib boost_filesystem...
Checking for boost::filesystem::initial_path() in C++ library boost_filesystem... yes
Looking for boost lib boost_thread...
Checking for boost::thread::yield() in C++ library boost_thread... yes
Boost configuration... (cached) ok
Checking for C header file pthread.h... yes
Checking for pthread_create() in C library pthread... yes
Checking for C header file GL/gl.h... yes
Checking for C header file GL/glu.h... yes
Checking for glBegin() in C library GL... yes
Checking for gluLookAt() in C library GLU... yes
Checking for freetype2 >= 9.0.0... yes
Checking for C header file ft2build.h... yes
Checking for FT_Init_FreeType() in C library freetype... yes
Checking DevIL version >= 1.6.1... (cached) yes
Checking for C header file IL/il.h... yes
Checking for C header file IL/ilu.h... yes
Checking for ilInit() in C library IL... yes
Checking for iluInit() in C library ILU... yes
Generating libltdl/config.h using libltdl/configure... configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
(cached) failed
Check libltdl/config.log to see what went wrong.

Does anyone have any suggestions as to how I can install this?
I'm afraid my linux experience is pretty minimal.
Cheers

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

Re: Gentoo compile problem

#8 Post by kroddn » Tue May 27, 2008 6:19 am

Some more information are mandatory:
- what OS exactly do you use?
- which version of gcc do you have installed?

Please upload config.log and libltdl/config.log too!

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

Re:

#9 Post by loonycyborg » Tue May 27, 2008 3:42 pm

tzlaine wrote:
meertn wrote:3.3.6
Sorry, but that's your problem. Upgrade to a 4.X compiler.
Feel free to steal my c++ check.
In Soviet Russia, forum posts YOU!!

Post Reply