OpenCV Haskell: Missing C libraries (macOS)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

OpenCV Haskell: Missing C libraries (macOS)

Geraldus

Hi folks!

I'm trying to build opencv as dependency on my macOS Sierra. I stuck with missing _contrib and _legacy C libraries. I've installed OpenCV with contrib packages via brew. Here are the steps I've done.

Installation

I have installed opencv via brew (with some patches of brew formula):

brew install opencv3 --with-contrib --with-python3

python
Python 3.6.1 (default, Apr  4 2017, 09:40:21) 
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.2.0'

I have not installed Python 2.7 bindings. Python 3.6 only.

Now stack build need some attention too:

stack build
opencv-0.0.1.0: configure
Progress: 1/2
--  While building package opencv-0.0.1.0 using:
    Configuring opencv-0.0.1.0...
    setup: Missing dependencies on foreign libraries:
    * Missing C libraries: opencv_calib3d, opencv_imgproc, opencv_contrib,
    opencv_legacy,
    This problem can usually be solved by installing the system packages that
    provide these libraries (you may need the "-dev" versions). If the libraries
    are already installed but in a non-standard location then you can use the
    flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.

Following suggestion I've tried specify include and lib dirs:

stack build --extra-lib-dirs=/usr/local/opt/opencv3/lib --extra-include-dirs=/usr/local/opt/opencv3/include
opencv-0.0.1.0: configure
Progress: 1/2
--  While building package opencv-0.0.1.0 using:
    Configuring opencv-0.0.1.0...
    setup: Missing dependencies on foreign libraries:
    * Missing C libraries: opencv_contrib, opencv_legacy,
    This problem can usually be solved by installing the system packages that
    provide these libraries (you may need the "-dev" versions). If the libraries
    are already installed but in a non-standard location then you can use the
    flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.

I have no idea how to find where missing libraries are located.

Would appreciate any help! Arthur!


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.