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 (find_package) Caffe Error #44

Open
JeffCarpenter opened this issue Jul 21, 2019 · 5 comments
Open

CMake (find_package) Caffe Error #44

JeffCarpenter opened this issue Jul 21, 2019 · 5 comments

Comments

@JeffCarpenter
Copy link

JeffCarpenter commented Jul 21, 2019

Hi all.

I have my Caffe includes in /usr/include/caffe and library object at /usr/lib/libcaffe.so.1.0.0 (linked to by libcaffe.so).
If you want to see other file paths from my Caffe installation, see this gist.

Okay, so from a zsh prompt on Linux I run cmake -DWITH_BOOST_STATIC=OFF -DBUILD_INTERFACE_PYTHON=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_APPS=ON -DBUILD_TESTS=OFF cmake -DCMAKE_INSTALL_PREFIX=~/installations/face_swap -DCMAKE_BUILD_TYPE=Release ..

And I get this CMake output:

-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- 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
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.69.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   timer
--   thread
--   chrono
--   system
--   date_time
--   atomic
-- Found OpenCV: /usr (found version "4.1.0") found components:  highgui imgproc imgcodecs calib3d photo 
CMake Error at CMakeLists.txt:73 (find_package):
  By not providing "FindCaffe.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Caffe", but
  CMake did not find one.

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

    CaffeConfig.cmake
    caffe-config.cmake

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


-- Configuring incomplete, errors occurred!
See also "/home/jeff/code/vendor/face_swap/build/CMakeFiles/CMakeOutput.log".
See also "/home/jeff/code/vendor/face_swap/build/CMakeFiles/CMakeError.log".
@IsraelAbebe
Copy link

@JeffCarpenter have you found a solution?

@JeffCarpenter
Copy link
Author

No, I haven't yet =/

@YuvalNirkin
Copy link
Owner

You specified the wrong directory for cmake, the CMakeLists.txt file is in the root directory.
Please follow the Ubuntu guide more closely.

@JeffCarpenter
Copy link
Author

JeffCarpenter commented Sep 27, 2019

@YuvalNirkin, how do you figure? I cd build within the repo and call cmake ${ARGS} ..

@YuvalNirkin YuvalNirkin reopened this Sep 27, 2019
@YuvalNirkin
Copy link
Owner

There should be "CaffeConfig.cmake" installed but I don't see it in your provided gist. Try to reinstall caffe and make sure this file is generated.

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