0

Trying to install deepdetect by following the installation steps here I have eigen installed correctly at /usr/include/eigen3 I am trying to build from source but when I use

cmake ..

I get this error

Checking for one of the modules 'eigen3'
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:578 
(message):
None of the required 'eigen3' found
Call Stack (most recent call first):
CMakeLists.txt:52 (pkg_search_module)

Can someone please help me fix this? Thanks in advance.

sambeth
  • 1,550
  • 2
  • 10
  • 18
  • It might help if you give more information, e.g., what OS are you on. Have you checked the issues at deepdetect? This seems to be related: https://github.com/beniz/deepdetect/issues/279 – chtz Sep 17 '17 at 06:57
  • Ubuntu 16.04. I've applied the fixes in your repo but nothing seems to work for me. – sambeth Sep 18 '17 at 16:16
  • That's not my repo (nor have I ever used deepdetect), but it was just one click away from the link you provided. – chtz Sep 18 '17 at 20:10

1 Answers1

0

I guess the failing lines are:

find_package(PkgConfig)
pkg_search_module(Eigen3 REQUIRED eigen3)

I do not know if it used to work or why they did it like this but I would give the solution described here on so a try:

INCLUDE_DIRECTORIES ( "$ENV{EIGEN3_INCLUDE_DIR}" )

or

SET( EIGEN3_INCLUDE_DIR "$ENV{EIGEN3_INCLUDE_DIR}" )
IF( NOT EIGEN3_INCLUDE_DIR )
    MESSAGE( FATAL_ERROR "Please point the environment variable EIGEN3_INCLUDE_DIR to the include directory of your Eigen3 installation.")
ENDIF()
INCLUDE_DIRECTORIES ( "${EIGEN3_INCLUDE_DIR}" )
pattakosn
  • 365
  • 4
  • 13
  • Thanks very much. It worked. But wont they update tit into their repo? – sambeth Sep 19 '17 at 09:57
  • I have no idea what they will do, I did not even know of this project when I saw your question :) . A patch could be sent to the project and they could decide whether they want to change it or not. Even though I do not undestand why they did it like they this, I think that the solution I sent you is simpler and more failproof. – pattakosn Sep 20 '17 at 08:15
  • 1
    I just came across this on Eigen3 doc: [Using Eigen in CMake Projects](https://eigen.tuxfamily.org/dox/TopicCMakeGuide.html). edit: btw, if you find this useful, please upvote me :) – pattakosn Sep 21 '17 at 14:01