I'm trying to compile the following library https://github.com/jgasthaus/libPLUMP that use cmake in order to generate the makefile.
The library includes also the boost library.
The cmake
command seems to work well, indeed the linking goes good.
MBP-di-Giulio-2:libPLUMP giuliopn$ mkdir build && cd build && cmake ..
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found suitable version "1.72.0", minimum required is "1.72.0") found components: program_options serialization iostreams filesystem system
-- Found GSL: /usr/local/lib/libgsl.dylib;/usr/local/lib/libgslcblas.dylib
-- Found SWIG: /usr/local/bin/swig (found version "4.0.1")
-- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5m.dylib (found version "3.5.1")
CMake Deprecation Warning at /usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/UseSWIG.cmake:566 (message):
SWIG_ADD_MODULE is deprecated. Use SWIG_ADD_LIBRARY instead.
Call Stack (most recent call first):
bindings/CMakeLists.txt:15 (SWIG_ADD_MODULE)
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/UseSWIG.cmake:607 (message):
Policy CMP0078 is not set: UseSWIG generates standard target names. Run
"cmake --help-policy CMP0078" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/UseSWIG.cmake:567 (swig_add_library)
bindings/CMakeLists.txt:15 (SWIG_ADD_MODULE)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/UseSWIG.cmake:460 (message):
Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
flag. Run "cmake --help-policy CMP0086" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/UseSWIG.cmake:702 (SWIG_ADD_SOURCE_TO_MODULE)
/usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/UseSWIG.cmake:567 (swig_add_library)
bindings/CMakeLists.txt:15 (SWIG_ADD_MODULE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
plump
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/giuliopn/Thesis/Internet_Codes/Pitman-Yor/libPLUMP/build
But when I compile, it doesn't find the boost file:
MBP-di-Giulio-2:build giuliopn$ make
Scanning dependencies of target plump
[ 6%] Building CXX object src/libplump/CMakeFiles/plump.dir/context_tree.cc.o
In file included from /Users/giuliopn/Thesis/Internet_Codes/Pitman-Yor/libPLUMP/src/libplump/context_tree.cc:17:
In file included from /Users/giuliopn/Thesis/Internet_Codes/Pitman-Yor/libPLUMP/src/libplump/context_tree.h:24:
In file included from /Users/giuliopn/Thesis/Internet_Codes/Pitman-Yor/libPLUMP/src/libplump/config.h:25:
/Users/giuliopn/Thesis/Internet_Codes/Pitman-Yor/libPLUMP/src/libplump/mini_map.h:26:10: fatal error:
'boost/scoped_array.hpp' file not found
#include <boost/scoped_array.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/libplump/CMakeFiles/plump.dir/context_tree.cc.o] Error 1
make[1]: *** [src/libplump/CMakeFiles/plump.dir/all] Error 2
make: *** [all] Error 2
I only modify the version of the boost library in the file CMakeLists.txt
( from Boost 1.35.0
to Boost 1.72.0
).
For information I'm currently using macOS Catalina v10.15.3
Do you have any suggestion ?
Sorry if the question is not so intresting, but I haven't so much experience with cmake.
Thanks a lot for the answers.