CMake Find Package Boost Fails Even with BOOST_LIBRARYDIR set correctly [duplicate]












0
















This question already has an answer here:




  • CMake finds Boost but the imported targets not available for Boost version

    2 answers




When running



mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/home/install -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=On ..; cd ../


inside a 3rd party library. I get the following error.



CMake Error at /usr/local/share/cmake-3.5/Modules/FindBoost.cmake:1657 (message):
Unable to find the requested Boost libraries.

Boost version: 1.67.0

Boost include path: /usr/local/include

Could not find the following static Boost libraries:

boost_thread
boost_date_time

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.


So according to several other posts I have added:



set(BOOST_ROOT /usr/local)
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
message(STATUS "BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")


to their CMakeLists.txt. Which gives me the following message:




-- BOOST_LIBRARYDIR = /usr/local/lib

-- Using CPU native flags for SSE optimization: -march=native

-- -- GCC > 4.3 found, enabling -Wabi

-- Found OpenMP

...




However, I still am getting the same error. Listing the contents of BOOST_LIBRARYDIR indicates the libraries are there.



root@74fdb1dd14f4:~/code/pcl# ls /usr/local/lib
cmake libboost_prg_exec_monitor.so.1.67.0 libflann.so.1.9
libboost_atomic.a libboost_program_options.a libflann.so.1.9.1-003
libboost_atomic.so libboost_program_options.so libflann_cpp.so
libboost_atomic.so.1.67.0 libboost_program_options.so.1.67.0 libflann_cpp.so.1.9
libboost_chrono.a libboost_regex.a libflann_cpp.so.1.9.1-003
libboost_chrono.so libboost_regex.so libflann_cpp_s.a
libboost_chrono.so.1.67.0 libboost_regex.so.1.67.0 libflann_s.a
libboost_date_time.a libboost_system.a libload_qos_controller-1.0.1.so
libboost_date_time.so libboost_system.so libload_qos_controller.la
libboost_date_time.so.1.67.0 libboost_system.so.1.67.0 libload_qos_controller.so
libboost_filesystem.a libboost_test_exec_monitor.a liblogrotate_container_logger-1.0.1.so
libboost_filesystem.so libboost_thread.a liblogrotate_container_logger.la
libboost_filesystem.so.1.67.0 libboost_thread.so liblogrotate_container_logger.so
libboost_graph.a libboost_thread.so.1.67.0 libmesos-1.0.1.so
libboost_graph.so libboost_timer.a libmesos.la
libboost_graph.so.1.67.0 libboost_timer.so libmesos.so
libboost_log.a libboost_timer.so.1.67.0 mesos
libboost_log.so libboost_unit_test_framework.a mesos-modules
libboost_log.so.1.67.0 libboost_unit_test_framework.so pkgconfig
libboost_log_setup.a libboost_unit_test_framework.so.1.67.0 python2.7
libboost_log_setup.so libfixed_resource_estimator-1.0.1.so python3.4
libboost_log_setup.so.1.67.0 libfixed_resource_estimator.la python3.5
libboost_prg_exec_monitor.a libfixed_resource_estimator.so
libboost_prg_exec_monitor.so libflann.so


Why can't CMake find the libraries?










share|improve this question













marked as duplicate by usr1234567, Community Jan 2 at 14:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Judging from your directory layout, it should work out of the box. Try removing set(BOOST*) lines, cleaning the cache and running cmake again.

    – arrowd
    Jan 1 at 21:06
















0
















This question already has an answer here:




  • CMake finds Boost but the imported targets not available for Boost version

    2 answers




When running



mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/home/install -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=On ..; cd ../


inside a 3rd party library. I get the following error.



CMake Error at /usr/local/share/cmake-3.5/Modules/FindBoost.cmake:1657 (message):
Unable to find the requested Boost libraries.

Boost version: 1.67.0

Boost include path: /usr/local/include

Could not find the following static Boost libraries:

boost_thread
boost_date_time

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.


So according to several other posts I have added:



set(BOOST_ROOT /usr/local)
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
message(STATUS "BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")


to their CMakeLists.txt. Which gives me the following message:




-- BOOST_LIBRARYDIR = /usr/local/lib

-- Using CPU native flags for SSE optimization: -march=native

-- -- GCC > 4.3 found, enabling -Wabi

-- Found OpenMP

...




However, I still am getting the same error. Listing the contents of BOOST_LIBRARYDIR indicates the libraries are there.



root@74fdb1dd14f4:~/code/pcl# ls /usr/local/lib
cmake libboost_prg_exec_monitor.so.1.67.0 libflann.so.1.9
libboost_atomic.a libboost_program_options.a libflann.so.1.9.1-003
libboost_atomic.so libboost_program_options.so libflann_cpp.so
libboost_atomic.so.1.67.0 libboost_program_options.so.1.67.0 libflann_cpp.so.1.9
libboost_chrono.a libboost_regex.a libflann_cpp.so.1.9.1-003
libboost_chrono.so libboost_regex.so libflann_cpp_s.a
libboost_chrono.so.1.67.0 libboost_regex.so.1.67.0 libflann_s.a
libboost_date_time.a libboost_system.a libload_qos_controller-1.0.1.so
libboost_date_time.so libboost_system.so libload_qos_controller.la
libboost_date_time.so.1.67.0 libboost_system.so.1.67.0 libload_qos_controller.so
libboost_filesystem.a libboost_test_exec_monitor.a liblogrotate_container_logger-1.0.1.so
libboost_filesystem.so libboost_thread.a liblogrotate_container_logger.la
libboost_filesystem.so.1.67.0 libboost_thread.so liblogrotate_container_logger.so
libboost_graph.a libboost_thread.so.1.67.0 libmesos-1.0.1.so
libboost_graph.so libboost_timer.a libmesos.la
libboost_graph.so.1.67.0 libboost_timer.so libmesos.so
libboost_log.a libboost_timer.so.1.67.0 mesos
libboost_log.so libboost_unit_test_framework.a mesos-modules
libboost_log.so.1.67.0 libboost_unit_test_framework.so pkgconfig
libboost_log_setup.a libboost_unit_test_framework.so.1.67.0 python2.7
libboost_log_setup.so libfixed_resource_estimator-1.0.1.so python3.4
libboost_log_setup.so.1.67.0 libfixed_resource_estimator.la python3.5
libboost_prg_exec_monitor.a libfixed_resource_estimator.so
libboost_prg_exec_monitor.so libflann.so


Why can't CMake find the libraries?










share|improve this question













marked as duplicate by usr1234567, Community Jan 2 at 14:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Judging from your directory layout, it should work out of the box. Try removing set(BOOST*) lines, cleaning the cache and running cmake again.

    – arrowd
    Jan 1 at 21:06














0












0








0









This question already has an answer here:




  • CMake finds Boost but the imported targets not available for Boost version

    2 answers




When running



mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/home/install -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=On ..; cd ../


inside a 3rd party library. I get the following error.



CMake Error at /usr/local/share/cmake-3.5/Modules/FindBoost.cmake:1657 (message):
Unable to find the requested Boost libraries.

Boost version: 1.67.0

Boost include path: /usr/local/include

Could not find the following static Boost libraries:

boost_thread
boost_date_time

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.


So according to several other posts I have added:



set(BOOST_ROOT /usr/local)
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
message(STATUS "BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")


to their CMakeLists.txt. Which gives me the following message:




-- BOOST_LIBRARYDIR = /usr/local/lib

-- Using CPU native flags for SSE optimization: -march=native

-- -- GCC > 4.3 found, enabling -Wabi

-- Found OpenMP

...




However, I still am getting the same error. Listing the contents of BOOST_LIBRARYDIR indicates the libraries are there.



root@74fdb1dd14f4:~/code/pcl# ls /usr/local/lib
cmake libboost_prg_exec_monitor.so.1.67.0 libflann.so.1.9
libboost_atomic.a libboost_program_options.a libflann.so.1.9.1-003
libboost_atomic.so libboost_program_options.so libflann_cpp.so
libboost_atomic.so.1.67.0 libboost_program_options.so.1.67.0 libflann_cpp.so.1.9
libboost_chrono.a libboost_regex.a libflann_cpp.so.1.9.1-003
libboost_chrono.so libboost_regex.so libflann_cpp_s.a
libboost_chrono.so.1.67.0 libboost_regex.so.1.67.0 libflann_s.a
libboost_date_time.a libboost_system.a libload_qos_controller-1.0.1.so
libboost_date_time.so libboost_system.so libload_qos_controller.la
libboost_date_time.so.1.67.0 libboost_system.so.1.67.0 libload_qos_controller.so
libboost_filesystem.a libboost_test_exec_monitor.a liblogrotate_container_logger-1.0.1.so
libboost_filesystem.so libboost_thread.a liblogrotate_container_logger.la
libboost_filesystem.so.1.67.0 libboost_thread.so liblogrotate_container_logger.so
libboost_graph.a libboost_thread.so.1.67.0 libmesos-1.0.1.so
libboost_graph.so libboost_timer.a libmesos.la
libboost_graph.so.1.67.0 libboost_timer.so libmesos.so
libboost_log.a libboost_timer.so.1.67.0 mesos
libboost_log.so libboost_unit_test_framework.a mesos-modules
libboost_log.so.1.67.0 libboost_unit_test_framework.so pkgconfig
libboost_log_setup.a libboost_unit_test_framework.so.1.67.0 python2.7
libboost_log_setup.so libfixed_resource_estimator-1.0.1.so python3.4
libboost_log_setup.so.1.67.0 libfixed_resource_estimator.la python3.5
libboost_prg_exec_monitor.a libfixed_resource_estimator.so
libboost_prg_exec_monitor.so libflann.so


Why can't CMake find the libraries?










share|improve this question















This question already has an answer here:




  • CMake finds Boost but the imported targets not available for Boost version

    2 answers




When running



mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/home/install -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=On ..; cd ../


inside a 3rd party library. I get the following error.



CMake Error at /usr/local/share/cmake-3.5/Modules/FindBoost.cmake:1657 (message):
Unable to find the requested Boost libraries.

Boost version: 1.67.0

Boost include path: /usr/local/include

Could not find the following static Boost libraries:

boost_thread
boost_date_time

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.


So according to several other posts I have added:



set(BOOST_ROOT /usr/local)
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
message(STATUS "BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")


to their CMakeLists.txt. Which gives me the following message:




-- BOOST_LIBRARYDIR = /usr/local/lib

-- Using CPU native flags for SSE optimization: -march=native

-- -- GCC > 4.3 found, enabling -Wabi

-- Found OpenMP

...




However, I still am getting the same error. Listing the contents of BOOST_LIBRARYDIR indicates the libraries are there.



root@74fdb1dd14f4:~/code/pcl# ls /usr/local/lib
cmake libboost_prg_exec_monitor.so.1.67.0 libflann.so.1.9
libboost_atomic.a libboost_program_options.a libflann.so.1.9.1-003
libboost_atomic.so libboost_program_options.so libflann_cpp.so
libboost_atomic.so.1.67.0 libboost_program_options.so.1.67.0 libflann_cpp.so.1.9
libboost_chrono.a libboost_regex.a libflann_cpp.so.1.9.1-003
libboost_chrono.so libboost_regex.so libflann_cpp_s.a
libboost_chrono.so.1.67.0 libboost_regex.so.1.67.0 libflann_s.a
libboost_date_time.a libboost_system.a libload_qos_controller-1.0.1.so
libboost_date_time.so libboost_system.so libload_qos_controller.la
libboost_date_time.so.1.67.0 libboost_system.so.1.67.0 libload_qos_controller.so
libboost_filesystem.a libboost_test_exec_monitor.a liblogrotate_container_logger-1.0.1.so
libboost_filesystem.so libboost_thread.a liblogrotate_container_logger.la
libboost_filesystem.so.1.67.0 libboost_thread.so liblogrotate_container_logger.so
libboost_graph.a libboost_thread.so.1.67.0 libmesos-1.0.1.so
libboost_graph.so libboost_timer.a libmesos.la
libboost_graph.so.1.67.0 libboost_timer.so libmesos.so
libboost_log.a libboost_timer.so.1.67.0 mesos
libboost_log.so libboost_unit_test_framework.a mesos-modules
libboost_log.so.1.67.0 libboost_unit_test_framework.so pkgconfig
libboost_log_setup.a libboost_unit_test_framework.so.1.67.0 python2.7
libboost_log_setup.so libfixed_resource_estimator-1.0.1.so python3.4
libboost_log_setup.so.1.67.0 libfixed_resource_estimator.la python3.5
libboost_prg_exec_monitor.a libfixed_resource_estimator.so
libboost_prg_exec_monitor.so libflann.so


Why can't CMake find the libraries?





This question already has an answer here:




  • CMake finds Boost but the imported targets not available for Boost version

    2 answers








cmake point-cloud-library






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 20:42









Matthew HogganMatthew Hoggan

3,191948106




3,191948106




marked as duplicate by usr1234567, Community Jan 2 at 14:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by usr1234567, Community Jan 2 at 14:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Judging from your directory layout, it should work out of the box. Try removing set(BOOST*) lines, cleaning the cache and running cmake again.

    – arrowd
    Jan 1 at 21:06



















  • Judging from your directory layout, it should work out of the box. Try removing set(BOOST*) lines, cleaning the cache and running cmake again.

    – arrowd
    Jan 1 at 21:06

















Judging from your directory layout, it should work out of the box. Try removing set(BOOST*) lines, cleaning the cache and running cmake again.

– arrowd
Jan 1 at 21:06





Judging from your directory layout, it should work out of the box. Try removing set(BOOST*) lines, cleaning the cache and running cmake again.

– arrowd
Jan 1 at 21:06












1 Answer
1






active

oldest

votes


















1














Your CMake version (3.5 I guessed from the command line) is too old for Boost 1.67. Boost changed its naming scheme starting with version 1.66.0 so a set(Boost_ADDITIONAL_VERSIONS 1.67 1.67.0) will not work. See this answer for further details. Either upgrade your CMake version or lower your Boost version requirements (if possible).






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Your CMake version (3.5 I guessed from the command line) is too old for Boost 1.67. Boost changed its naming scheme starting with version 1.66.0 so a set(Boost_ADDITIONAL_VERSIONS 1.67 1.67.0) will not work. See this answer for further details. Either upgrade your CMake version or lower your Boost version requirements (if possible).






    share|improve this answer




























      1














      Your CMake version (3.5 I guessed from the command line) is too old for Boost 1.67. Boost changed its naming scheme starting with version 1.66.0 so a set(Boost_ADDITIONAL_VERSIONS 1.67 1.67.0) will not work. See this answer for further details. Either upgrade your CMake version or lower your Boost version requirements (if possible).






      share|improve this answer


























        1












        1








        1







        Your CMake version (3.5 I guessed from the command line) is too old for Boost 1.67. Boost changed its naming scheme starting with version 1.66.0 so a set(Boost_ADDITIONAL_VERSIONS 1.67 1.67.0) will not work. See this answer for further details. Either upgrade your CMake version or lower your Boost version requirements (if possible).






        share|improve this answer













        Your CMake version (3.5 I guessed from the command line) is too old for Boost 1.67. Boost changed its naming scheme starting with version 1.66.0 so a set(Boost_ADDITIONAL_VERSIONS 1.67 1.67.0) will not work. See this answer for further details. Either upgrade your CMake version or lower your Boost version requirements (if possible).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 1 at 21:54









        vrevre

        1,6231715




        1,6231715

















            Popular posts from this blog

            Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

            Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

            A Topological Invariant for $pi_3(U(n))$