-
Notifications
You must be signed in to change notification settings - Fork 384
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
leptonica 1.78 make install successfully, but tesseract/configure: error: Leptonica 1.74 or higher is required. #410
Comments
If I run below, I do not get anything returns, no "lept" [root@localhost build]# ldconfig -p | grep -i lept Is "make install" the last step or there is post install needs to run for other to recognize existence of Leptonica 1.78 that I have successfully run on centOS 7 machine? Appreciate your inputs, George |
Is this expected: -- Installing: /usr/local/lib/libleptonica.so.1.78.0 1.78.0 is the version number, not the so number, which is 5.3.0 |
See #253. |
Thanks Dan and Amit so much to take time to reply my query. I checked config.log in running tesseract/configure and trace configure shell script, and figure out it looks for lept from /usr/bin/pkg-config --CFLAGS lept [root@localhost ~]# export PKG_CONFIG=/usr/bin/pkg-config [root@localhost ~]# $PKG_CONFIG --cflags The Leptonica I installed from source is 1.78 higher than 1.74, If I do below [root@localhost ~]# $PKG_CONFIG --cflags "lept" It is not /usr/local/include/leptonica What is the best approach for $PKG_CONFIG --cflags "lept" to output I/usr/local/include/leptonica Thanks again, George |
I finally made tesseract/configure to work by: vi ./usr/lib64/pkgconfig/lept.pc Change version number to 1.78 as it was made installed from source Link so file ln -s /usr/local/lib/liblept.so ./usr/lib64/liblept.so Then check below by running below /usr/bin/pkg-config --cflags "lept >= 1.74" Now run It installed tesseract successfully. While I have installed tesseract, I feel the approach I did is a hack. There could be more graceful way to do this. Thanks a lot for your replies, Dan and Amit! |
That is a hack. Here is a more graceful way:
|
Basic problem is that you are mixing build tools with expectation they provide the same features: |
It would be very helpful to add a section in readme, will save lot of people lots of time. Thanks all for the inputs, I will note them for my next build. I will close this comment. |
I made reference on tesseract compiling wiki. I hope this will help on tesseract side. |
Thanks. That should cover it. I'll reference the tesseract page in the leptonica readme. |
run ./configure CC=gcc-8 CXX=g++-8 CPPFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib checking for lept >= 1.74... yes why? |
Why do you ask here? It's not an issue with Leptonica. Use tesseract-ocr forum for support. |
I made it working, too! One needs to also make sure that these two variables are defined: Thanks! |
Thankyou very much! |
I have successfully cmake, make, make install leptonica 1.78.
But in tesseract,
run configure
Got error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.
Following is the make install leptonica 1.78
[root@localhost build]# make install
[100%] Built target leptonica
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/pkgconfig/lept.pc
-- Installing: /usr/local/cmake/LeptonicaConfig.cmake
-- Installing: /usr/local/cmake/LeptonicaConfig-version.cmake
-- Installing: /usr/local/lib/libleptonica.so.1.78.0
-- Installing: /usr/local/lib/libleptonica.so.5.3.0
-- Installing: /usr/local/lib/libleptonica.so
-- Old export file "/usr/local/cmake/LeptonicaTargets.cmake" will be replaced. Removing files [/usr/local/cmake/LeptonicaTargets-noconfig.cmake].
-- Installing: /usr/local/cmake/LeptonicaTargets.cmake
-- Installing: /usr/local/cmake/LeptonicaTargets-noconfig.cmake
-- Installing: /usr/local/include/leptonica/allheaders.h
-- Installing: /usr/local/include/leptonica/alltypes.h
-- Installing: /usr/local/include/leptonica/array.h
-- Installing: /usr/local/include/leptonica/arrayaccess.h
-- Installing: /usr/local/include/leptonica/bbuffer.h
-- Installing: /usr/local/include/leptonica/bilateral.h
-- Installing: /usr/local/include/leptonica/bmf.h
-- Installing: /usr/local/include/leptonica/bmfdata.h
-- Installing: /usr/local/include/leptonica/bmp.h
-- Installing: /usr/local/include/leptonica/ccbord.h
-- Installing: /usr/local/include/leptonica/dewarp.h
-- Installing: /usr/local/include/leptonica/endianness.h
-- Installing: /usr/local/include/leptonica/environ.h
-- Installing: /usr/local/include/leptonica/gplot.h
-- Installing: /usr/local/include/leptonica/heap.h
-- Installing: /usr/local/include/leptonica/imageio.h
-- Installing: /usr/local/include/leptonica/jbclass.h
-- Installing: /usr/local/include/leptonica/leptwin.h
-- Installing: /usr/local/include/leptonica/list.h
-- Installing: /usr/local/include/leptonica/morph.h
-- Installing: /usr/local/include/leptonica/pix.h
-- Installing: /usr/local/include/leptonica/ptra.h
-- Installing: /usr/local/include/leptonica/queue.h
-- Installing: /usr/local/include/leptonica/rbtree.h
-- Installing: /usr/local/include/leptonica/readbarcode.h
-- Installing: /usr/local/include/leptonica/recog.h
-- Installing: /usr/local/include/leptonica/regutils.h
-- Installing: /usr/local/include/leptonica/stack.h
-- Installing: /usr/local/include/leptonica/stringcode.h
-- Installing: /usr/local/include/leptonica/sudoku.h
-- Installing: /usr/local/include/leptonica/watershed.h
-- Installing: /usr/local/include/leptonica/endianness.h
How to make tesseract configure to recognize newly made install leptonica 1.78? Thanks!
The text was updated successfully, but these errors were encountered: