Coherent-Line-Drawing icon indicating copy to clipboard operation
Coherent-Line-Drawing copied to clipboard

Build fails on OSX M1

Open krummrey opened this issue 3 years ago • 2 comments

Hi, I'd love to try it out, but the supplied binary doesn't seem to work and the build process fails even though I have boost installed. Monterey 12.1 boost 1.76.0 is already installed and up-to-date.

/usr/sbin/sysctl
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jan/Documents/ML/Coherent-Line-Drawing/build
Consolidate compiler generated dependencies of target cld
Consolidate compiler generated dependencies of target Coherent-Line-Drawing
[  9%] Building CXX object CMakeFiles/cld.dir/src/cmd.cpp.o
[ 18%] Building CXX object CMakeFiles/cld.dir/src/postProcessing.cpp.o
[ 45%] Building CXX object CMakeFiles/cld.dir/src/CLD.cpp.o
[ 81%] Built target Coherent-Line-Drawing
/Users/jan/Documents/ML/Coherent-Line-Drawing/src/cmd.cpp:1:10: fatal error: 'boost/program_options.hpp' file not found
#include <boost/program_options.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/cld.dir/src/cmd.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/Users/jan/Documents/ML/Coherent-Line-Drawing/src/postProcessing.cpp:71:63: warning: implicit conversion from 'double' to 'int' changes value from 1.5 to 1 [-Wliteral-conversion]
            cv::arrowedLine(dst, p1, p2, cv::Scalar(1, 0, 0), 1.5, 8, 0, 0.3);
            ~~                                                ^~~
1 warning generated.
make[1]: *** [CMakeFiles/cld.dir/all] Error 2
make: *** [all] Error 2

```

krummrey avatar Feb 08 '22 16:02 krummrey

interesting, never tried on M1 yet. but from the error log, I think it is include path issue. And actually boost was not required if you only want to build GUI version. it is totally fine to comment out CLI part in cmakelist.txt

SSARCandy avatar Feb 08 '22 17:02 SSARCandy

I've tried to find a way to set the path right. Cmake looks for it in:

-- Boost_FOUND: TRUE
-- Boost_INCLUDE_DIRS: /opt/homebrew/include

There is a link to the "real" loacation.

I tried to override the path and used SET(Boost_INCLUDE_DIRS PATHS /opt/homebrew/Cellar/boost/1.78.0_1/include) and the output is

-- Boost_FOUND: TRUE
-- Boost_INCLUDE_DIRS: PATHS;/opt/homebrew/Cellar/boost/1.78.0_1/include/

It still fails with fatal error: 'boost/program_options.hpp' file not found even though the file is right there.

I did get the GUI to compile, no errors show. However it only renders black squares. Screenshot Saving the output is possible. So it kinda works, just no display in the GUI.

krummrey avatar Jun 21 '22 21:06 krummrey