I recently installed MacOS Catalina (10.15.6) with Xcode 11.6 and Command Line tools. I am attempting to build a C++ library that uses Boost::Python
using the below cmakelists.txt:
cmake_minimum_required(VERSION 3.5)
project(pyLib_sdk)
# Find default python libraries and interpreter
find_package (Python3 COMPONENTS Interpreter Development)
find_package(Boost 1.72.0 REQUIRED COMPONENTS python)
include_directories(${Boost_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
# Build and link the pylib_auto module
add_library(pylib_auto SHARED pylib_auto.cpp)
target_link_libraries(pylib_auto ${Boost_LIBRARIES} ${Python3_LIBRARIES})
add_dependencies(pylib_auto Boost)
# Tweaks the name of the library to match what Python expects
set_target_properties(pylib_auto PROPERTIES SUFFIX .so)
set_target_properties(pylib_auto PROPERTIES PREFIX "")
cmake builds the make files just fine but when I run make
, it produces these errors:
In file included from /usr/local/include/boost/config/no_tr1/cmath.hpp:21:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no
member named 'signbit' in the global namespace
using ::signbit;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no
member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: error: no
member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
~~^
/usr/local/include/math.h:752:12: note: 'finite' declared here
extern int finite(double)
^
This is just a snippet of the errors but I believe the rest of the log are just cascading from the first error with cmath. Has anyone else experienced this issue?