Result cmake to find older boost, which is newest by FindBoost.cmake(1.40 in my case) and so resulting to linker errors. Reproducible: Always Steps to Reproduce: 1. Install Boost 1.40 2. Install Boost 1.41 3. Build a boost program, in my case Wesnoth from its trunk Actual Results: Build failed Expected Results: Build succeeded MakeFiles/wesnoth.dir/game.cpp.o: In function `T.6594': game.cpp:(.text+0xe21): undefined reference to `boost::iostreams::detail::gzip_header::reset()' game.cpp:(.text+0xe2a): undefined reference to `boost::iostreams::detail::gzip_footer::reset()' CMakeFiles/wesnoth.dir/game.cpp.o: In function `boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >::filter(char const*&, char const*, char*&, char*, bool)': game.cpp:(.text._ZN5boost9iostreams6detail20zlib_compressor_implISaIcEE6filterERPKcS6_RPcS8_b[boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >::filter(char const*&, char const*, char*&, char*, bool)]+0x3d): undefined reference to `boost::iostreams::detail::zlib_base::xdeflate(int)' CMakeFiles/wesnoth.dir/game.cpp.o: In function `boost::iostreams::detail::zlib_decompressor_impl<std::allocator<char> >::filter(char const*&, char const*, char*&, char*, bool)': game.cpp:(.text._ZN5boost9iostreams6detail22zlib_decompressor_implISaIcEE6filterERPKcS6_RPcS8_b[boost::iostreams::detail::zlib_decompressor_impl<std::allocator<char> >::filter(char const*&, char const*, char*&, char*, bool)]+0x30): undefined reference to `boost::iostreams::detail::zlib_base::xinflate(int)' CMakeFiles/wesnoth.dir/game.cpp.o: In function `void boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >&)': game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE5closeINS0_20non_blocking_adapterINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEEEEvRT_[void boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >&)]+0x17b): undefined reference to `boost::iostreams::detail::gzip_header::reset()' game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE5closeINS0_20non_blocking_adapterINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEEEEvRT_[void boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >&)]+0x184): undefined reference to `boost::iostreams::detail::gzip_footer::reset()' CMakeFiles/wesnoth.dir/game.cpp.o: In function `long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)': game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE4readINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEElRT_Pcl[long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)]+0x48b): undefined reference to `boost::iostreams::detail::gzip_header::reset()' game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE4readINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEElRT_Pcl[long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)]+0x495): undefined reference to `boost::iostreams::detail::gzip_footer::reset()' game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE4readINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEElRT_Pcl[long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)]+0x5e2): undefined reference to `boost::iostreams::detail::gzip_footer::process(char)' game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE4readINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEElRT_Pcl[long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)]+0x77a): undefined reference to `boost::iostreams::detail::gzip_header::reset()' game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE4readINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEElRT_Pcl[long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)]+0x784): undefined reference to `boost::iostreams::detail::gzip_footer::reset()' game.cpp:(.text._ZN5boost9iostreams23basic_gzip_decompressorISaIcEE4readINS0_6detail16linked_streambufIcSt11char_traitsIcEEEEElRT_Pcl[long boost::iostreams::basic_gzip_decompressor<std::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >&, char*, long)]+0x85a): undefined reference to `boost::iostreams::detail::gzip_header::process(char)' libwesnoth-core.a(parser.cpp.o): In function `T.3521': parser.cpp:(.text+0x701): undefined reference to `boost::iostreams::detail::gzip_header::reset()' parser.cpp:(.text+0x70a): undefined reference to `boost::iostreams::detail::gzip_footer::reset()'
Could you attach a bigger part of the build log ?
Created attachment 220517 [details] cmake output
Created attachment 220519 [details] make output Attached cmake and make output from clean build. Note that fixing this bug is to simply add new "1.41" to FindBoost.cmake.
What's your cmake version? What exactly do you change to make it work?
(In reply to comment #4) > What's your cmake version? > What exactly do you change to make it work? Don't bother, I found the problem. @kde-team: For the stable cmake we already have a files/cmake-2.6.4-FindBoost.patch which just adds more versions. Now we need an equivalent patch for testing (2.8....), since that only runs up to boost-1.40 :)
Created attachment 220889 [details, diff] Untested but trivial patch that delays the problem until boost-1.45
*** Bug 296513 has been marked as a duplicate of this bug. ***
2.8.1 has detection for 1.41, 1.41.0 but not 1.42, 1.42.0 fixing $summary
*** Bug 311369 has been marked as a duplicate of this bug. ***
it would be nice if someone can put this patch in portage. thanks
Please give the cmake-2.8.1 ebuild from the kde overlay a thorough testing. This should be fixed there, as well as another issue (bug 206920).
FindCmake offers the following # SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0") Possible the gentoo-cmake-config that is loaded automatically should set these to the installed versions of boost.
(In reply to comment #12) > FindCmake offers the following FindBoost
(In reply to comment #12) > FindCmake offers the following > # SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0") > Possible the gentoo-cmake-config that is loaded automatically should set these > to the installed versions of boost. > Yes that might be a more elegant solution. later...
Fixed in cmake-2.8.1-r1.