DeepGraphLearning / graphvite

GraphVite: A General and High-performance Graph Embedding System
https://graphvite.io
Apache License 2.0
1.21k stars 151 forks source link

pybind11 wrong while use cmake #76

Open missximon opened 3 years ago

missximon commented 3 years ago

The error looks like this:

#cd build && cmake .. && make && cd -
-- The CXX compiler identification is GNU 4.8.5
-- The CUDA compiler identification is NVIDIA 10.1.105
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
-- Could NOT find GFlags (missing: GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)
CMake Error at CMakeLists.txt:23 (find_package):
  By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "pybind11",
  but CMake did not find one.

  Could not find a package configuration file provided by "pybind11" with any
  of the following names:

    pybind11Config.cmake
    pybind11-config.cmake

  Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
  "pybind11_DIR" to a directory containing one of the above files.  If
  "pybind11" provides a separate development package or SDK, be sure it has
  been installed.

but I have installed the pybind11 by pip install. what's problem and what should I do?

KiddoZhu commented 3 years ago

Pip doesn't install pybind11 search script to cmake. If I remember correctly, the conda version of pybind11 will do the correct job if your cmake is also installed by conda.

A simple workaround is open build/CMakeCache.txt and directly modify pybind11_DIR to the correct path, and then re-run cmake