Page 1 of 1
Problem with BOOST
Posted: 11 Mar 2013, 23:41
by antoine_french
Hi sorry for my Bad english, I am french and i have some difficult to speak English.
I have a problem when I try to cmake spring:
Code: Select all
-- Found ld.gold, compressing debugsymbols
-- Could NOT find Boost
compiler doesn't support: -mno-avx2
-- Building Spring for 32bit environment
And that:
Code: Select all
-- Could NOT find MINIZIP (missing: MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR)
-- MAN pages will be installed to {INSTALL_PREFIX}/share/man/man6
-- user-docs (plain/text) will be installed to {INSTALL_PREFIX}/share/doc/spring-VERSION/engine
-- WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
-- Configuring done
-- Generating done
I am on Ubuntu 12.04 (32 bits)
Some people can tell me , what I have to do ?
Antoine
Re: Problem with BOOST
Posted: 11 Mar 2013, 23:45
by gajop
it could be that you lack the boost libraries (or maybe that's just the irrelevant boost build..?), but you should post the entire log so we can figure it out
post it on a pastebin-like service
Re: Problem with BOOST
Posted: 11 Mar 2013, 23:53
by antoine_french
You can see here my log:
http://pastebin.com/NNn0R21s
Code: Select all
Looking for pthread_create in pthreads - not founds
-- Checking to see if CXX compiler accepts flag -mno-avx2 - no
MAN pages will be installed to {INSTALL_PREFIX}/share/man/man6
-- user-docs (plain/text) will be installed to {INSTALL_PREFIX}/share/doc/spring-VERSION/engine
Thanks to your attention
Re: Problem with BOOST
Posted: 12 Mar 2013, 03:21
by abma
type make to compile?
are you trying to compile spring 0.82.5.1? if so it will fail for sure with boost 1.52.0. please "upgrade" the sources to at least spring 91.0.
Re: Problem with BOOST
Posted: 12 Mar 2013, 08:25
by antoine_french
I have download the last version:
http://pastebin.com/H9d0Ld6S
I have that on output.
Re: Problem with BOOST
Posted: 12 Mar 2013, 08:44
by antoine_french
I have found the problem, it's because my fold contain space and the compil doesn't work .
But now I have this error :
Code: Select all
/usr/local/include/boost/thread/detail/thread.hpp:388: error: undefined reference to 'boost::thread::do_try_join_until(timespec const&)'
/usr/local/include/boost/thread/detail/thread.hpp:388: error: undefined reference to 'boost::thread::do_try_join_until(timespec const&)'
/usr/local/include/boost/program_options/errors.hpp:372: error: undefined reference to 'boost::program_options::validation_error::get_template(boost::program_options::validation_error::kind_t)'
/usr/local/include/boost/program_options/errors.hpp:372: error: undefined reference to 'boost::program_options::error_with_option_name::error_with_option_name(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/usr/local/include/boost/program_options/errors.hpp:118: error: undefined reference to 'vtable for boost::program_options::error_with_option_name'
/usr/local/include/boost/program_options/errors.hpp:118: error: undefined reference to 'vtable for boost::program_options::error_with_option_name'
/usr/local/include/boost/program_options/errors.hpp:118: error: undefined reference to 'vtable for boost::program_options::error_with_option_name'
/usr/local/include/boost/program_options/errors.hpp:118: error: undefined reference to 'vtable for boost::program_options::error_with_option_name'
/usr/local/include/boost/program_options/detail/parsers.hpp:107: error: undefined reference to 'boost::program_options::detail::cmdline::get_canonical_option_prefix()'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::program_options::validation_error: error: undefined reference to 'boost::program_options::error_with_option_name::what() const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::program_options::validation_error: error: undefined reference to 'boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error>: error: undefined reference to 'boost::program_options::error_with_option_name::what() const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error>: error: undefined reference to 'boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::validation_error> >: error: undefined reference to 'boost::program_options::error_with_option_name::what() const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::validation_error> >: error: undefined reference to 'boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::program_options::invalid_option_value: error: undefined reference to 'boost::program_options::error_with_option_name::what() const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function vtable for boost::program_options::invalid_option_value: error: undefined reference to 'boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/engine-default.dir/__/__/System/Platform/CmdLineParams.cpp.o:CmdLineParams.cpp:function typeinfo for boost::program_options::validation_error: error: undefined reference to 'typeinfo for boost::program_options::error_with_option_name'
collect2: ld a retourné 1 code d'état d'exécution
make[3]: *** [spring] Erreur 1
make[2]: *** [rts/builds/default/CMakeFiles/engine-default.dir/all] Erreur 2
make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Erreur 2
make: *** [install-spring] Erreur 2
Re: Problem with BOOST
Posted: 15 Mar 2013, 01:24
by antoine_french
up

Re: Problem with BOOST
Posted: 15 Mar 2013, 01:30
by abma
what do you mean with up?
Re: Problem with BOOST
Posted: 15 Mar 2013, 01:41
by SpliFF
just a guess from a quick reading but i'd say you don't have the boost program_options library or it's the wrong version.
Code: Select all
-- Boost version: 1.52.0
-- Found the following Boost libraries:
-- thread
-- regex
-- program_options
-- system
-- signals
-- Could NOT find Boost
Have no idea what to make of that. It found the libraries but not Boost itself? I'm guessing it's actually looking for a version of boost you don't have (an older version since 1.52 is the latest). Can you downgrade boost?
Re: Problem with BOOST
Posted: 15 Mar 2013, 01:46
by abma
which version of spring do you try to compile? also, when it doesn't find boost it shouldn't start compile at all. boost libs are required, see
http://springrts.com/wiki/Building_Spri ... nux#Ubuntu
Re: Problem with BOOST
Posted: 15 Mar 2013, 01:57
by SpliFF
I just checked and it looks like Spring does not have a custom FindBoost.cmake. What that means is CMake is the probable cause of the problem. Try to update CMake.
Re: Problem with BOOST
Posted: 15 Mar 2013, 02:09
by abma
i hade ubuntu 12.04 installed for ages and spring compiles fine there... so i guess boost is really missing but still wonder why makefiles where generated.
also, what are you trying to do? maybe the the static linux package works for you, just download, extract, run...
Re: Problem with BOOST
Posted: 15 Mar 2013, 02:15
by SpliFF
I'm nearly 100% sure it's an old version of CMake and therefore an old version of FindBoost.cmake. If you look at that file the Boost version numbers are HARDCODED. An old version of cmake will NOT correctly detect a newer version of Boost (even if it does show the libraries).
/usr/share/cmake/Modules/FindBoost.cmake:
Code: Select all
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
"1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54"
"1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"
"1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
"1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
"1.34" "1.33.1" "1.33.0" "1.33")
UPDATE: I looked in the Spring CMakeLists and boost is detected as:
Code: Select all
FIND_PACKAGE(Boost 1.35.0 COMPONENTS thread regex program_options system signals REQUIRED)
FIND_PACKAGE(Boost 1.35.0 COMPONENTS chrono)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
So the Boost version appears to be HARDCODED to look for Boost 1.35. Although I assume it will happily pick a version greater than that the test relies on "1.52.0" (your version) being in the KNOWN_VERSIONS array. So again, an update to CMake seems required.
Re: Problem with BOOST
Posted: 15 Mar 2013, 05:49
by abma
@spliff:
this number means, that is the minimum number.
from /usr/share/cmake-2.8/Modules/FindBoost.cmake:
# You should provide a minimum version number that should be used. If you provide this
# version number and specify the REQUIRED attribute, this module will fail if it
# can't find the specified or a later version. If you specify a version number this is
# automatically put into the considered list of version numbers and thus doesn't need
# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below).
the output of cmake looked fine, it detected program_options correctly.
but the path of boost looks like a manual installed boost, so i guess its just broken or config flags of boost at compile time were wrong.
also i would think if boost & cmake are from ubuntu repos, cmake should detect boost... so let's wait for feedback of antoine_french. :)
Re: Problem with BOOST
Posted: 15 Mar 2013, 07:36
by SpliFF
No. Read it again.
It will put "1.35.0" into ADDITIONAL_VERSIONS but he has "1.52.0" installed. If his FindBoost.cmake is old enough it won't have "1.52.0" in the known versions list and won't "find" what it considers to be a compatible version of boost.
Boost is probably finding the libraries for 1.52.0 and reporting them "found" but since it knows nothing about a "1.52.0" version it fails on the version check and then prints a slightly misleading message.
There is a Boost_DEBUG CMake flag that might provide more insight but I'm pretty sure I'm right.
Re: Problem with BOOST
Posted: 01 Apr 2013, 15:37
by abma
@antoine_french:
remove the space from the path, then it should compile without problems.
see
http://springrts.com/mantis/view.php?id=3645