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

Build fails on OSX M1 #34

Open
krummrey opened this issue Feb 8, 2022 · 2 comments
Open

Build fails on OSX M1 #34

krummrey opened this issue Feb 8, 2022 · 2 comments

Comments

@krummrey
Copy link

krummrey commented Feb 8, 2022

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

```
@SSARCandy
Copy link
Owner

SSARCandy commented Feb 8, 2022

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

@krummrey
Copy link
Author

krummrey commented Jun 21, 2022

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.

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

2 participants