0

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?

Sal
  • 625
  • 2
  • 7
  • 11
  • Does this answer your question? [Catalina C++: Using headers yield error: no member named 'signbit' in the global namespace](https://stackoverflow.com/questions/58628377/catalina-c-using-cmath-headers-yield-error-no-member-named-signbit-in-th) – Botje Jul 29 '20 at 12:59
  • Unfortunately no. I tried that solution yesterday with no luck. – Sal Jul 29 '20 at 13:10

1 Answers1

-1

Try to reinstall the command line tools. I had the same issue and resolved it by reinstalling the command line tools.

I ran these commands in a terminal:

  1. sudo rm -rf /Library/Developer/CommandLineTools
  2. xcode-select --install
deduper
  • 1,944
  • 9
  • 22
Rye
  • 1
  • 1