justadudewhohacks / justadudewhohacks/opencv4nodejs
Build fails on OSX with latest FFMPEG release
- Dominant language
- C++
- Stars
- 5.1k
- Forks
- 826
- PR merge metrics
- No merged PRs in 30d
Description
Hi there - this is more of an FYI / PSA than an issue :)
I have been experiencing a build error on OSX Mojave ...
```
[ 87%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/calibinit.cpp.o
In file included from /Users/stuart/Workspaces/GITHUB/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
/Users/stuart/Workspaces/GITHUB/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:10: fatal error:
'tesseract/baseapi.h' file not found
#include
^~~~~~~~~~~~~~~~~~~~~
```
Looking at a bunch of other issues that have been raised and mostly solved, it appears that this is in part due to the presences of `tesseract` on my machine (see issue #179). Prior to this change the the brew formula for `ffmpeg` ...
https://github.com/Homebrew/homebrew-core/commit/3e99e5d2717c30ebc1f555d9d70b08cf6b6d33f8#diff-8f4deb87ce96b9c5efe97be3288bb406
.. `tesseract` was not automatically installed and therefore when the auto-build executed the tesseract library was not found etc.
I've checked that the tesseract header files are installed correctly by brew, and these seem to be in the right place (/usr/local/include/tesseract), so I am guessing that there is a problem with the opencv build scripts.
I haven't got time to start debugging all of that so my work around is (horribly) to rollback the ffmpeg install for the time being.
**UPDATE**
Whilst the build goes through I have 'amused' myself by digging into the CMake files for OpenCV and I think that the problem I am getting is related to this change ...
https://github.com/opencv/opencv_contrib/commit/fdb575d43b0f75b8546da313b93892033fc487be#diff-cad4fd9d74cc81b36a9dc481ed253200
.. it looks like the `Tesseract_INCLUDE_DIRS` should be set (see https://github.com/opencv/opencv_contrib/blob/3.4/modules/text/cmake/FindTesseract.cmake).
Anyway, there is a 'switch' that can block the inclusion of the `tesseract` OCR (`OPENCV_FIND_TESSERACT`) ... just not sure where it could be set ... any ideas @justadudewhohacks
Contributor guide
Assessment
This issue has not been assessed yet.