dpilger26 / NumCpp

C++ implementation of the Python Numpy library
https://dpilger26.github.io/NumCpp
MIT License
3.51k stars 548 forks source link

Could NOT find Boost #176

Closed Michdo93 closed 1 year ago

Michdo93 commented 1 year ago

Hi I tried to install it on Ubuntu 20.04. Following error occured:

-- Compiling with C++ standard: 17
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least
  version "1.68.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:2179 (find_package_handle_standard_args)
  CMakeLists.txt:47 (find_package)

-- Configuring incomplete, errors occurred!

I have done following steps:

git clone https://github.com/dpilger26/NumCpp.git
cd NumCpp
mkdir build
cd build
cmake ..

I tried to solve it with:

sudo apt install build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev

Well it does not help.

Thanks in advance.

dpilger26 commented 1 year ago

You need to install the boost headers with sudo apt install libboost-all-dev You can also disable the parts of NumCpp that require boost with the -DNUMCPP_NO_USE_BOOST option into cmake.

Michdo93 commented 1 year ago

Well it does not help. After installing libboost-all-dev I receive the same errors. How could I run -DNUMCPP_NO_USE_BOOST? I tried cmake .. -DNUMCPP_NO_USE_BOOST and cmake -DNUMCPP_NO_USE_BOOST ..

dpilger26 commented 1 year ago

Looks like you need to sort out your environment. Did boost install into a non-standard location? Which version of boost is installed? 1.68 is the minimum supported version.

peghao commented 1 year ago

Find "option(NUMCPP_NO_USE_BOOST "Don't use the boost libraries" OFF)" in the CMakeLists.txt, and simply turn "OFF" to "ON".