YuvalNirkin / face_swap

End-to-end, automatic face swapping pipeline
GNU General Public License v3.0
825 stars 203 forks source link

CMake (find_package) Caffe Error #44

Open JeffCarpenter opened 5 years ago

JeffCarpenter commented 5 years ago

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 commented 4 years ago

@JeffCarpenter have you found a solution?

JeffCarpenter commented 4 years ago

No, I haven't yet =/

YuvalNirkin commented 4 years ago

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

JeffCarpenter commented 4 years ago

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

YuvalNirkin commented 4 years ago

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.