Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error: #70

Open
agarnitin86 opened this issue Nov 30, 2016 · 14 comments
Open

CMake Error: #70

agarnitin86 opened this issue Nov 30, 2016 · 14 comments

Comments

@agarnitin86
Copy link

I am running the following command
cmake -DBOOST_ROOT:PATH=.. ..

I am getting the following error :
-- Detected architecture 'x86_64'
-- Using Python3
CMake Error at /usr/share/cmake-3.2/Modules/FindBoost.cmake:1202 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt:50 (find_package)

-- Boost Paths:
-- Include : Boost_INCLUDE_DIR-NOTFOUND
-- Libraries:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/src
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/example
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/example
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/example
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/example
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/example
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/example
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/example
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test
used as include directory in directory /home/nitin/git/Boost.NumPy/libs/numpy/test

-- Configuring incomplete, errors occurred!
See also "/home/nitin/git/Boost.NumPy/CMakeFiles/CMakeOutput.log".

@TallJimbo
Copy link
Member

Could you try just cmake -DBOOST_ROOT=/absolute/path/to/boost?

I'm not sure if relative directories are supported there, and I'm also not familiar with the :PATH part of your argument. I'm far from a CMake expert, so it's possible I'm not supporting most CMake users would expect to work, but the above is how I've used this option in the past.

@agarnitin86
Copy link
Author

I tried running : cmake -DBOOST_ROOT=/home/nitin/git/Boost.NumPy/boost
But still got the same error. I guess it also wants me to set BOOST_INCLUDEDIR variable

@termoshtt
Copy link
Contributor

BOOST_ROOT means the root of Boost library not the root of Boost.NumPy.
I guess that you did not install system boost library by e.g. apt-get install libboost-dev.
This project dose not contains Boost itself.
This flag is for compiling Boost.NumPy against Boost lib which you manually compiled.

@agarnitin86
Copy link
Author

Hi Termoshtt, I installed libboost-dev and now i running the following the command :
cmake -DBOOST_ROOT=/usr/include/boost ..

I get a different error now
CMake Error at /usr/share/cmake-3.2/Modules/FindBoost.cmake:1202 (message):
Unable to find the requested Boost libraries.

Boost version: 1.54.0

Boost include path: /usr/include

Could not find the following Boost libraries:

      boost_python3

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:50 (find_package)

-- Boost Paths:
-- Include : /usr/include
-- Libraries:
-- Configuring incomplete, errors occurred!

@termoshtt
Copy link
Contributor

Please confirm libboost-python-dev is also installed.
I guess you only install boost_python (for Python2.7), and you could compile with it.

find_package(Boost COMPONENTS python REQUIRED) # not python3

@agarnitin86
Copy link
Author

I installed libboost-dev and libboost-python-dev as u suggested. But still getting the same error. Also i dont know about find_package (where and how to run it.)

@termoshtt
Copy link
Contributor

Also i dont know about find_package (where and how to run it.)

Sorry, I misunderstood what you are doing. Please forget the above comment :<

I reproduce same error when I install libboost-dev, and it is recovered when libboost-python-dev is installed. I guess -DBOOST_ROOT=/usr/include/boost might cause this error.

@agarnitin86
Copy link
Author

From both the commands

  1. cmake -DBOOST_ROOT=/usr/include/boost ..

  2. cmake ..
    i get the same error :
    Could not find the following Boost libraries:

       boost_python3
    

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:50 (find_package)

@termoshtt
Copy link
Contributor

Could you confirm libboost_python3.so or libboost_python-py34.so exits. Its name is different by distributions.

@agarnitin86
Copy link
Author

I have following softlink files in directory :/usr/lib/x86_64-linux-gnu/
libboost_python.so
libboost_python-py27.so
libboost_python-py34.so

@agarnitin86
Copy link
Author

Hey, thanks for continuously helping me. I did the following and it worked
cd /usr/lib/x86_64-linux-gnu/
sudo ln -s libboost_python-py34.so libboost_python3.so
cmake -DBOOST_ROOT=/usr/include/boost ..

Followed the link : belltailjp/selective_search_py#6

@termoshtt
Copy link
Contributor

Good 👍

I think this issue has been resolved by #56, but it seems not complete :<
Could you let me know your environment?

  • how to install Python3
  • distribution (ubuntu?)

@agarnitin86
Copy link
Author

I installed anaconda
I m using ubuntu 14.0.4

@termoshtt
Copy link
Contributor

Thanks, I will test on such env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants