Problem with BOOST

Problem with BOOST

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
antoine_french
Posts: 5
Joined: 11 Mar 2013, 23:37

Problem with BOOST

Post 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
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Problem with BOOST

Post 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
antoine_french
Posts: 5
Joined: 11 Mar 2013, 23:37

Re: Problem with BOOST

Post 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
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Problem with BOOST

Post 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.
antoine_french
Posts: 5
Joined: 11 Mar 2013, 23:37

Re: Problem with BOOST

Post by antoine_french »

I have download the last version:

http://pastebin.com/H9d0Ld6S

I have that on output.
antoine_french
Posts: 5
Joined: 11 Mar 2013, 23:37

Re: Problem with BOOST

Post 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

antoine_french
Posts: 5
Joined: 11 Mar 2013, 23:37

Re: Problem with BOOST

Post by antoine_french »

up :oops:
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Problem with BOOST

Post by abma »

what do you mean with up?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Problem with BOOST

Post 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?
Last edited by SpliFF on 15 Mar 2013, 01:46, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Problem with BOOST

Post 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
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Problem with BOOST

Post 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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Problem with BOOST

Post 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...
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Problem with BOOST

Post 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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Problem with BOOST

Post 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. :)
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Problem with BOOST

Post 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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Problem with BOOST

Post 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
Post Reply

Return to “Linux”