You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case is fairly simple - I need OpenCV to analyze image file and return true/false result, nothing too fancy, really a single call to function from imgproc module.
Creating Windows dist package was easy: take a go generated binary, pack it up with OpenCV DLLs, and call it a day.
However, doing same thing on macOS seems to be almost impossible task, but to be fair, I might be missing few tricks here and there.
In order to get the go binary to run, I need to pull in half of my /opt/local/lib folder into the dist package, only to have it running on the latest macOS version (if built on 10.13, it only runs on 10.12/10.13). Attempting to run on 10.10 throws an error about missing CoreImage - quite understandably, as this is system framework available starting with 10.11.
Mentioning /opt/local/lib means that I used OpenCV package from MacPorts (it uses ffmpeg compiled on the spot, meaning it links to other libraries from MacPorts universe), but from what I've noticed, OpenCV distributed via Homebrew has exact same problem.
Does anyone here have some practical take on this?
I know that opencv-python team managed to solve distribution problem somehow, and on PyPi you can get wheel package with staticallly linked dependencies that work on every macOS version since 10.6. I haven't really analyzed that yet, but I guess taking some hints from there would be the best way forward!
The text was updated successfully, but these errors were encountered:
Why can't we statically compile by the way? Is it because of the way CGO works? That means we always need opencv installed along with the Go binary, is that correct?
My use case is fairly simple - I need OpenCV to analyze image file and return true/false result, nothing too fancy, really a single call to function from imgproc module.
Creating Windows dist package was easy: take a go generated binary, pack it up with OpenCV DLLs, and call it a day.
However, doing same thing on macOS seems to be almost impossible task, but to be fair, I might be missing few tricks here and there.
In order to get the go binary to run, I need to pull in half of my
/opt/local/lib
folder into the dist package, only to have it running on the latest macOS version (if built on 10.13, it only runs on 10.12/10.13). Attempting to run on 10.10 throws an error about missing CoreImage - quite understandably, as this is system framework available starting with 10.11.Mentioning
/opt/local/lib
means that I used OpenCV package from MacPorts (it uses ffmpeg compiled on the spot, meaning it links to other libraries from MacPorts universe), but from what I've noticed, OpenCV distributed via Homebrew has exact same problem.Does anyone here have some practical take on this?
I know that opencv-python team managed to solve distribution problem somehow, and on PyPi you can get wheel package with staticallly linked dependencies that work on every macOS version since 10.6. I haven't really analyzed that yet, but I guess taking some hints from there would be the best way forward!
The text was updated successfully, but these errors were encountered: