2

I used to have a boost version (1.62) that I installed with a .deb package (created by my team). Now we want to test new version and I have uninstalled this boost installation using

dpkg -r 

I have downloaded boost 1.64 and compiled it. I have placed the compiled code in

/usr/local/boost_1_64_0

The problem that I'm facing is that when I move to one of my projects and execute

cmake.

I get the following error

-- CMAKE_INSTALL_PREFIX is /usr
-- CMAKE_INSTALL_SYSCONFDIR is /etc
-- CMAKE_SYSTEM_NAME is Linux
-- Entering Linux/CMAKE_COMPILER_IS_GNUCXX branch.
-- CMAKE_CXX_FLAGS are: -std=c++11 -g3 -fPIC
-- CMAKE_INSTALL_SYSCONFDIR is /etc
CMake Error at /usr/local/share/cmake-3.9/Modules/FindBoost.cmake:1229 (file):
  file STRINGS file "/usr/local/boost_1.62/boost/version.hpp" cannot be read.
Call Stack (most recent call first):
  CMakeLists.txt:103 (find_package)

Why is still looking for the old version? Did I forge to change an environment variable or something?

My BOOST_ROOT env var is the following.

/usr/local/boost_1_64_0

Thank you so much

EDIT: Added CMakeLists.txt

   # Boost stuff
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "Use statically-linked boost libraries")
# '- Note: By default set Boost_USE_STATIC_LIBS to ON (to link them statically
#    to avoid possible problems during execution of the application (not finding
#    the .so files)), but let the user change it (useful for example to use
#    Fedora native boost libraries, or for OSX when using Boost's "locale" to
#    avoid weird "_iconv*" missing symbols when linking")
set(Boost_USE_MULTITHREADED ON)
# add_definitions(-DBOOST_LOG_DYN_LINK)
#find_package(Boost) # <-- Use this simple line for using only headers
find_package(Boost
COMPONENTS 
#       # lexicographically sorted
#       locale
        log
#       date_time
        filesystem
        program_options
        system
        thread
)
if (Boost_FOUND)
    message(STATUS "Boost found:")
    include_directories(${Boost_INCLUDE_DIRS})
    message(STATUS "  Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
    message(STATUS "  Boost_LIBRARIES: ${Boost_LIBRARIES}
    Note: Boost_LIBRARIES can be empty if no COMPONENTS are used.") # Used below

The problem is the Boost_INCLUDE_DIRS variable, has the old path to boost and I can't find where it is defined that value

arrowd
  • 33,231
  • 8
  • 79
  • 110
acostela
  • 2,597
  • 3
  • 33
  • 50

0 Answers0