-
Notifications
You must be signed in to change notification settings - Fork 808
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
fatal error: 'tesseract/baseapi.h' file not found #179
Comments
Strange. I have now run the same test on my other machine and it worked fine. Any idea what could be wrong with the first setup? |
Strange, it tries to include tesseract, although it shouldn't be enabled. On the system with the failing build, do you have any version of tesseract installed, maybe this is the reason why it is included in the build? Could you also post the cmake output from the log? |
If I remember correctly was a line naming tesseract
also included on the machine where it had worked, but I will double check. I am actually not sure if tesseract was installed globally. I had experimented with an app, which had it included, if I am not mistaken. Though this I think I did also on both machines. The machines have different npm and node versions I noticed. Could that be responsible for this error? Error machine: Here is the log |
I have now brew uninstalled tesseract and also updated npm and node to the latest version
Your guess regarding uninstalling tesseract, seems to have worked. Not sure if the next error is somehow related though. |
Yeah I think it was due to having tesseract installed. I guess your error is due to missing codecs. The example images are encoded with h.264 (avc), Updating libav should make it. Maybe also updating ffmpeg does the job for you: Homebrew/legacy-homebrew#40001 |
Thanks for the link, but the steps described with reinstalling libav and ffmpeg did not solve the issue. I am confused as I thought that with packaging opencv into node, one would not have any external dependencies anymore. Is that not the case? |
You don't need any external dependencies that OpenCV does not need as well. The Anyway just noticed Long story short since libX11 could not be loaded I suspect you either don't have it or it is not linked correctly. If you do have it installed you could try Are you using OpenCV on the system with this issue the first time or is this issue just apparent in the electron example? |
Thanks for pointing me into the right direction. I have to admit that my setup was kind of messed up. Probably due to an old MacPort install, osx upgrading and naive experimenting some time ago. @justadudewhohacks sorry that I took up your time. I really appreciate the work you put into into this! |
Great, always glad if I can help somehow. |
|
I passed the direct location from tesseract/baseapi.h file. Afterwards I was able to compile and install opencv. |
@superhuy how did you passed the direct location from tesseract/baseapi.h file??? |
@GiulioPettenuzzo
The non-ideal, but definitely workable solution is to:
This assumes of course that's where base directory of tesseract is, but that's how you can " |
in my case Solution for me was to make tesseract-includes availble by defining About headers: https://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art026 |
The suggestion from @robie2011 for adding |
@javadba happy to hear that :) For me compiling OpenCV C++ Library seems to be a challange in general. |
It worked for me, Thanks |
export CPATH="/usr/local/Cellar/tesseract/4.1.0/include" It works, Thanks |
Hi,
I have seen that with the new version @justadudewhohacks has made it possible to build opencv within node. That is fantastic, thank you so much! With my hobby skills I could have never achieved that :-)
I have now tried to run your opencv-electron example using this new version
3.0.3
. First I had to update electron and electron-rebuild, but then when runningnpm install
I keep receivingHere is the whole output:
The text was updated successfully, but these errors were encountered: