alicevision / CCTag

Detection of CCTag markers made up of concentric circles.
https://cctag.readthedocs.io
Mozilla Public License 2.0
358 stars 89 forks source link

[question] make fails with "fatal error: 'devil_cpp_wrapper.hpp' file not found" #205

Closed McCannDahl closed 1 year ago

McCannDahl commented 1 year ago

Describe the problem Using Mac M1, following instructions here https://cctag.readthedocs.io/en/latest/install/install.html#building-the-library, when I run "make -j nproc", I get the following error

Screenshots

image

Log I installed devil from brew, but still same error shows.

image

Desktop

simogasp commented 1 year ago

Can you try to modify the include statements and add the prefix IL as in

#include <IL/devil_cpp_wrapper.hpp>
McCannDahl commented 1 year ago

Hmmm no same error image image

simogasp commented 1 year ago

It seems like that the wrapper is not installed anymore, at least in homebrew. As a quick workaround you can comment the find_package(DevIL COMPONENTS IL ILU)at line 82 of src/applications/detection/CMakeLists.txt. Devil is only optional and if not found it will fallback to opencv for loading the images.

McCannDahl commented 1 year ago

That worked and the make passed. But when I run the detection example it says "Library not loaded: @rpath/libCCTag.1.0.3.dylib"

image
simogasp commented 1 year ago

Did you do a make install? It's strange that it looks for libCCTag.dylib in /opt/homebrew/lib/ and other system paths like that. Usually it should be in ./build/Darwin-arm64/. You can try to run

export DYLD_LIBRARY_PATH=/Users/path/to/build/Darwin-arm64/:${DYLD_LIBRARY_PATH}

replacing the path/to/ with your path to the build directory. And there run detection as you did.

McCannDahl commented 1 year ago

I switched over to my PC and got it to work. We can close this for me or leave it open for other mac users