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 Error MacOS #41

Open
KDederichs opened this issue Feb 24, 2020 · 4 comments
Open

Build Error MacOS #41

KDederichs opened this issue Feb 24, 2020 · 4 comments

Comments

@KDederichs
Copy link

Hey,
I'm trying to install the node openCV package on my Mac development machine but sadly it's spitting out compile errors:

In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/baseapi.h:26:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/apitypes.h:23:
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:33:1: error: unknown type name 'constexpr'
constexpr int kPointsPerInch = 72;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:33:11: error: expected unqualified-id
constexpr int kPointsPerInch = 72;
          ^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:38:1: error: unknown type name 'constexpr'
constexpr int kMinCredibleResolution = 70;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:38:11: error: expected unqualified-id
constexpr int kMinCredibleResolution = 70;
          ^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:40:1: error: unknown type name 'constexpr'
constexpr int kMaxCredibleResolution = 2400;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:40:11: error: expected unqualified-id
constexpr int kMaxCredibleResolution = 2400;
          ^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:45:1: error: unknown type name 'constexpr'
constexpr int kResolutionEstimationFactor = 10;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:45:11: error: expected unqualified-id
constexpr int kResolutionEstimationFactor = 10;

Is there any special flag that needs to be set for it to work on Mac?
All build tools/Xcode are up to date.

@jnguyen19
Copy link

Yeah, i am getting the same thing trying to do an: npm install --save opencv4nodejs:

[ 85%] Building CXX object modules/tracking/CMakeFiles/opencv_tracking.dir/src/trackerMILModel.cpp.o
In file included from /Users//node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /Users//node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/baseapi.h:26:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/apitypes.h:23:
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:33:1: error: unknown type name 'constexpr'
constexpr int kPointsPerInch = 72;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:38:1: error: unknown type name 'constexpr'
constexpr int kMinCredibleResolution = 70;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:40:1: error: unknown type name 'constexpr'
constexpr int kMaxCredibleResolution = 2400;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:45:1: error: unknown type name 'constexpr'
constexpr int kResolutionEstimationFactor = 10;
^
[ 86%] Building CXX object modules/tracking/CMakeFiles/opencv_tracking.dir/src/trackerMedianFlow.cpp.o
In file i

@jnguyen19
Copy link

tried all sorts of suggested solution, pretty much same issue, with the latest code of everything:
[ 86%] Building CXX object modules/tracking/CMakeFiles/opencv_tracking.dir/src/trackerSamplerAlgorithm.cpp.o
In file included from /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/baseapi.h:26:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/apitypes.h:23:
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:33:1: error: unknown type name 'constexpr'
constexpr int kPointsPerInch = 72;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:38:1: error: unknown type name 'constexpr'
constexpr int kMinCredibleResolution = 70;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:40:1: error: unknown type name 'constexpr'
constexpr int kMaxCredibleResolution = 2400;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:45:1: error: unknown type name 'constexpr'
constexpr int kResolutionEstimationFactor = 10;
^
In file included from /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/baseapi.h:30:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/resultiterator.h:27:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/ltrresultiterator.h:27:
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/unichar.h:171:8: error: function definition does not declare parameters
char chars[UNICHAR_LEN]{};

@chris-ryu
Copy link

I have same problem
[ 84%] Building CXX object modules/text/CMakeFiles/opencv_text.dir/src/ocr_tesseract.cpp.o
In file included from /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/baseapi.h:26:
In file included from /usr/local/Cellar/tesseract/4.1.1/include/tesseract/apitypes.h:23:
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:33:1: error:
unknown type name 'constexpr'
constexpr int kPointsPerInch = 72;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:38:1: error:
unknown type name 'constexpr'
constexpr int kMinCredibleResolution = 70;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:40:1: error:
unknown type name 'constexpr'
constexpr int kMaxCredibleResolution = 2400;
^
/usr/local/Cellar/tesseract/4.1.1/include/tesseract/publictypes.h:45:1: error:
unknown type name 'constexpr'
constexpr int kResolutionEstimationFactor = 10;

@chris-ryu
Copy link

brew unlink tesseract

After that problem solved.

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

3 participants