compiling freeorion on Gentoo. [Solved]

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Post Reply
Message
Author
RtrentC
Space Krill
Posts: 4
Joined: Sun Jun 24, 2007 3:31 pm

compiling freeorion on Gentoo. [Solved]

#1 Post by RtrentC » Tue Jul 10, 2007 2:34 am

I started out as a bug report, but from the responses I got, it is really looking like I am having a problem that is realated to the way that Gentoo, builds boost. Gentoo uses a system called portage, that uses scripts to handle the downloading, compiling, and installing of programs. Gentoo's choice of placement of files is exectutables end up in /usr/bin, libraries in /usr/lib and include files in /usr/include or in a subdirectory inside of /usr/include. precompiled binaries are usually installed into /opt.

When gentoo builds boost-1.34.0 there is no lib-suffix being used as shown in the boost documenation from the web site that I was pointed to. Instead of having libboost_signals-gcc-mt-1_34.so for example, I have just libboost_signals.so. Even the previous build of boost, version 1.33.1 had only the version number appended after the .so. IE it had libboost_signals.so.1.33.1

Everytime that I clean out the build of GG and rebuild it, it doesn't even matter if I give it the include dir /usr/include/boost, the libdir /usr/lib, or the main binary directory, /usr/bin. The results is the same it dies in the fifth and sixth conf test. for boost_serialization in the configure of FreeOrion. I get no error messages during the configure or the build of GG. I even went so far as to hack the GiGi.pc.in file to explicitly add -lboost_serialzation to the libs listed.

If there is anyone out there that runs the Gentoo distribution, please let me know if you have made any headway on compiling GG. by the way, revision 565 of GG with boost 1.33.1 works just fine. This only started with version 1.34.0. and revision 566 of GG.

A couple of things that I did note, is tha they moved the compilation of bjam to its own ebuild and build it first with its own ebuild then build boost. This was the only significant change between 1.33.1 and 1.34.0 that I noted.

I looked through the ebuild for (boost-build-1.34.0) bjam and the only thing that really stood out to me is the selection of cc instead of gcc for the toolset. I changed it to gcc and tried again, but still no go

This is the output of conftest_5.cpp from the freeorion configure.

g++ -pthread -I/usr/include/python2.4 -I/usr/include/boost -c -o .sconf_temp/conftest_5.o .sconf_temp/conftest_5.cpp
g++ -pthread -o .sconf_temp/conftest_5 .sconf_temp/conftest_5.o -L/usr/lib -lpython2.4 -lGiGiSDL -lSDL -lGiGiNet -lIL -lILU -lILUT -lGiGi -lboost_signals -lboost_filesystem -lGL -lGLU -lpthread -lfreetype -lz -lboost_serialization -lboost_serialization
/usr/lib/libGiGi.so: undefined reference to `boost::signals::detail::named_slot_map_iterator::named_slot_map_iterator(boost::signals::detail::named_slot_map_iterator const&)'
/usr/lib/libGiGi.so: undefined reference to `boost::signals::detail::named_slot_map_iterator::operator=(boost::signals::detail::named_slot_map_iterator const&)'
/usr/lib/libGiGi.so: undefined reference to `boost::signals::detail::named_slot_map_iterator::equal(boost::signals::detail::named_slot_map_iterator const&) const'
/usr/lib/libGiGi.so: undefined reference to `boost::signals::detail::named_slot_map_iterator::increment()'
/usr/lib/libGiGi.so: undefined reference to `boost::signals::detail::named_slot_map_iterator::dereference() const'
collect2: ld returned 1 exit status
scons: *** [.sconf_temp/conftest_5] Error 1
Last edited by RtrentC on Tue Jul 10, 2007 3:14 am, edited 2 times in total.

RtrentC
Space Krill
Posts: 4
Joined: Sun Jun 24, 2007 3:31 pm

Re: compiling freeorion on Gentoo. or rather lack thereof.

#2 Post by RtrentC » Tue Jul 10, 2007 3:13 am

Looks like it got to used to automated scripts to much. I forgot to use scon --clean before i ran scons to compile GG. Up until this time I had always gotten away with just rm libGi* // scons configure prefix=/usr // scons /sudo scons install // in the GG directory.

Only thing that I did diferent this time was to run scons --clean to clean out the build directory first before compiling. I know I should have known better since its a step that I don't skip when building my kernel. oh and there seems to be an svn problem. when trying to do an svn update instead of https://gigi.svn.sourceforge.net/ its using https://svn.sourceforge.net/ and get a host not found error.

Since I found no comment about cleaning the build directory when rebuilding GG or FreeOrion, you may want to add that to the compile section of the wiki. It may help keep down on bug reports of compile errors.

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

Re: compiling freeorion on Gentoo. or rather lack thereof.

#3 Post by Geoff the Medio » Tue Jul 10, 2007 3:26 am

RtrentC wrote:oh and there seems to be an svn problem. when trying to do an svn update instead of https://gigi.svn.sourceforge.net/ its using https://svn.sourceforge.net/ and get a host not found error.
Sourceforge just disabled svn.sourceforge.org/projectname/... to access SVN repositories. Now you have to use projectname.svn.sourceforge.net.

FreeOrion SVN is currently set to automatically fetch GG from the old-style location, so it fails.

[edit]This should be fixed now[/edit]
Since I found no comment about cleaning the build directory when rebuilding GG or FreeOrion, you may want to add that to the compile section of the wiki. It may help keep down on bug reports of compile errors.
mkay

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

Re: compiling freeorion on Gentoo. [Solved]

#4 Post by loonycyborg » Tue Jul 10, 2007 8:05 am

Also GiGi's .pc files should depend on options.cache so they will be updated if command-line options will change.

Code: Select all

Index: SConstruct
===================================================================
--- SConstruct  (revision 566)
+++ SConstruct  (working copy)
@@ -515,10 +515,13 @@

 if not missing_pkg_config and str(Platform()) != 'win32':
     gigi_pc = env.Command('GiGi.pc', 'GiGi.pc.in', CreateGiGiPCFile)
+    env.Depends(gigi_pc, 'options.cache')
     if not env['disable_sdl']:
         gigi_sdl_pc = env.Command('GiGiSDL.pc', 'GiGiSDL.pc.in', CreateGiGiSDLPCFile)
+        env.Depends(gigi_sdl_pc, 'options.cache')
         if not env['disable_net']:
             gigi_net_pc = env.Command('GiGiNet.pc', 'GiGiNet.pc.in', CreateGiGiNetPCFile)
+            env.Depends(gigi_net_pc, 'options.cache')

 header_dir = os.path.normpath(os.path.join(env.subst(env['incdir']), 'GG'))
 lib_dir = os.path.normpath(env.subst(env['libdir']))
Last edited by loonycyborg on Tue Jul 10, 2007 9:19 am, edited 1 time in total.
In Soviet Russia, forum posts YOU!!

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

Re: compiling freeorion on Gentoo. [Solved]

#5 Post by kroddn » Tue Jul 10, 2007 8:59 am

To switch the location of your svn, type the following:

Code: Select all

svn switch --relocate https://svn.sourceforge.net https://freeorion.svn.sourceforge.net

Post Reply