Page 1 of 1

error compiling gigi .... need some help

Posted: Fri Jan 21, 2011 10:07 pm
by tryf
Hey all.

i am running ubuntu 11.04 32 bit.

i have downloaded freeorion and tried to compile gigi

command :
cmake -DBUILD_TUTORIALS=off .

result:
uri@CABINET-URI:~/freeorion/FreeOrion/GG$ cmake -DBUILD_TUTORIALS=off .
-- Build platform: linux
-- Configuring GiGi
-- Configuring GiGiSDL
-- Configuring GiGiOgre
-- Configuring Ogre OIS Input Plugin
-- Configuring Tests
-- Generating Doxygen documentation
/home/uri/freeorion/FreeOrion/GG/doc/GGDoc.txt:265: warning: explicit link request to 'Wnd::Dragable()' could not be resolved
-- Configuring done
-- Generating done
-- Build files have been written to: /home/uri/freeorion/FreeOrion/GG
uri@CABINET-URI:~/freeorion/FreeOrion/GG$


command:
make

result:
[ 79%] Building CXX object src/CMakeFiles/GiGi.dir/adobe/token.cpp.o
[ 80%] Building CXX object src/CMakeFiles/GiGi.dir/adobe/typeinfo.cpp.o
[ 81%] Building CXX object src/CMakeFiles/GiGi.dir/adobe/virtual_machine.cpp.o
[ 82%] Building CXX object src/CMakeFiles/GiGi.dir/adobe/future/widgets/sources/virtual_machine_extension.cpp.o
[ 83%] Building CXX object src/CMakeFiles/GiGi.dir/adobe/future/widgets/sources/widget_tokens.cpp.o
make[2]: *** No rule to make target `/usr/lib/libboost_date_time-mt.so', needed by `libGiGi.so'. Stop.
make[1]: *** [src/CMakeFiles/GiGi.dir/all] Error 2
make: *** [all] Error 2



i really need help...... been trying to sort this out all day .....
thanks

Re: error compiling gigi .... need some help

Posted: Sat Jan 22, 2011 2:52 am
by Geoff the Medio
libboost_date_time is a boost library, which should be located during cmake build file generation. Can you try using ccmake or otherwise specifying the location of boost to cmake before generating build files? Do you have boost 1.44 installed for cmake to find?

Re: error compiling gigi .... need some help

Posted: Sat Jan 22, 2011 7:45 am
by tryf
Hey,

i have installed boost 1.45
how do i tell cmake where boost folder is ?

Re: error compiling gigi .... need some help

Posted: Sat Jan 22, 2011 8:50 am
by RgnadKzin
tryf wrote:Hey,

i have installed boost 1.45
how do i tell cmake where boost folder is ?
I am using Boost 1.44
I had to edit the FindBoost.cmake

Code: Select all

#
# These last three variables are available also as environment variables:
#
set(BOOST_ROOT /usr/local/src/boost)
#   BOOST_ROOT or BOOSTROOT
On my system, the FindBoost.cmake is in /usr/share/cmake/Modules/

Re: error compiling gigi .... need some help

Posted: Sat Jan 22, 2011 11:41 am
by tryf
thanks,

what line number should i put it in (findboost) ?

Re: error compiling gigi .... need some help

Posted: Sat Jan 22, 2011 12:10 pm
by tryf
i have done some digging ..... and found out the following:

somehow cmake thinks that my boost library is located at /usr/include
but in reality my boost library is located at /usr/local/ include

now i understand i have to add the following line to my FindBoost.cmake file:

set(BOOST_ROOT /usr/local/include)

i have only one last question

where do i put this command in the FindBoost.cmake file ?

thanks all

Re: error compiling gigi .... need some help

Posted: Sat Jan 22, 2011 4:55 pm
by Geoff the Medio
I don't know where you'd need to modify the .cmake file, but that also does seem like something you should be able to specify using ccmake before generating the build files with cmake.

Re: error compiling gigi .... need some help

Posted: Sat Jan 22, 2011 9:48 pm
by RgnadKzin
tryf wrote:i have done some digging ..... and found out the following:

somehow cmake thinks that my boost library is located at /usr/include
but in reality my boost library is located at /usr/local/ include

now i understand i have to add the following line to my FindBoost.cmake file:

set(BOOST_ROOT /usr/local/include)

i have only one last question

where do i put this command in the FindBoost.cmake file ?

thanks all
My BOOST_ROOT is /usr/local/src/boost
On my system boost is installed at /usr/local/src/boost and the subdirectory boost_1_44_0 is within that BOOST_ROOT. When boost is compiled, it compiles within the /usr/local/src/boost/boost_1_44_0 directory structure.

Because I specified set(BOOST_ROOT /usr/local/src/boost)
FindBoost.cmake ends up finding the includes in
/usr/local/src/boost/boost_1_44_0/boost
and the libs in
/usr/local/src/boost/boost_1_44_0/libs

If you look in the FindBoost.cmake (mine is at /usr/share/cmake/Modules/FindBoost.cmake), you will see that the bulk of the commands are commented out and the BOOST_ROOT parameter is discussed at line 165. While the documentation suggests that BOOST_ROOT can be set as an environment variable, I have been unable to get that to work, hence the direct hack.