Could NOT find Boost (missing: python) on macOS

1.7k Views Asked by At

ERROR INF:

-- Could NOT find Boost (missing: python) (found version "1.71.0")

I've tried everything I found in here, and nothing works.

Here is what I've done:

  1. Firstly, I've installed boost, boost_python and boost_python3 through brew install.
    However, I noticed that in boost dir there are "include" and "lib" dirs, but there is only "lib" in boost_python and boost_python3, which I don't understand.

  2. Run cmake as below:

    CC=/usr/bin/gcc CXX=/usr/bin/g++ cmake
    -DCMAKE_BUILD_TYPE="Release"
    -DBUILD_QT5=1
    -DCMAKE_PREFIX_PATH="/usr/local/Cellar/qt/5.13.1/lib/cmake"
    -DFREECAD_USE_EXTERNAL_KDL=1
    -DBUILD_FEM_NETGEN=1
    -DFREECAD_CREATE_MAC_APP=1
    -DCMAKE_INSTALL_PREFIX="./.."
    -DPYTHON_LIBRARY=$ANACONDA_HOME/lib/libpython3.7.so
    -DPYTHON_INCLUDE_DIR=$ANACONDA_HOME/include/python3.7
    -DPYTHON_EXECUTABLE=$ANACONDA_HOME/bin/python3.7
    -DBoost_NO_BOOST_CMAKE:BOOL=ON
    -DBoost_NO_SYSTEM_PATHS=TRUE
    -DBOOST_ROOT=/usr/local/Cellar/boost/1.71.0
    -DBOOST_LIBRARY_DIRS=/usr/local/Cellar/boost/1.71.0/lib
    -DBOOST_INCLUDE_DIR=/usr/local/Cellar/boost/1.71.0/include
    ../

But the log says:

  • Found Boost: /usr/local/Cellar/boost/1.71.0/include (found version "1.71.0")
  • Found PythonInterp: /bin/python3.7 (Required is at least version "3")
  • Found PythonLibs: /lib/libpython3.7.so (Required is at least version "3")
  • Detected Homebrew install at /usr/local
  • Found PythonInterp: /bin/python3.7
  • Found PythonLibs: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libpython.tbd (found version "2.7.10")
  • Found Boost: /usr/local/Cellar/boost/1.71.0/include (found suitable version "1.71.0", minimum required is "1.48") found components: filesystem program_options regex system thread chrono date_time atomic
    - Could NOT find Boost (missing: python) (found version "1.71.0")

As you can see, there are some components in Boost except for python.

  1. I've tried:

    -DBOOST_ROOT=/usr/local/Cellar/boost_python3/1.71.0_1 -DBOOST_LIBRARY_DIRS=/usr/local/Cellar/boost_python3/1.71.0_1/lib

But due to there's no "include" dir in boost_python3, I don't know how to edit BOOST_INCLUDE_DIR. Therefore, the log says:

Could NOT find Boost (missing: Boost_INCLUDE_DIR)

PLEASE HELP!!!!!!! I intend to compile FreeCAD on my mac but I've been stuck for a few days!

0

There are 0 best solutions below