zdenop / qt-box-editor

QT Box Editor of tesseract-ocr box files
https://zdenop.github.io/qt-box-editor/
Apache License 2.0
173 stars 65 forks source link

Error after running 'make' command #67

Closed MehulBhardwaj91 closed 6 years ago

MehulBhardwaj91 commented 6 years ago

Hi, I am running Ubuntu 16.04. Tesseract-3.05, leptonica-1.74 I was running Tesseract-4.00.00alpha previously and used QT box editor to edit box files. I couldn't train version-4 and so decided to roll back to 3.05 on account of more help being available. So I installed 3.05 but after that QT box editor wouldn't run. So i removed it, and decided to install it again. But now I am getting this error after running the 'make' command.

g++ -m64 -Wl,-O1 -o qt-box-editor-1.13dev temp/main.o temp/MainWindow.o temp/ChildWidget.o temp/DelegateEditors.o temp/TessTools.o temp/SettingsDialog.o temp/GetRowIDDialog.o temp/ShortCutsDialog.o temp/FindDialog.o temp/DrawRectangle.o temp/qrc_application.o temp/qrc_QBE-GNOME.o temp/qrc_QBE-Faenza.o temp/qrc_QBE-Oxygen.o temp/qrc_QBE-Tango.o temp/moc_MainWindow.o temp/moc_ChildWidget.o temp/moc_DelegateEditors.o temp/moc_SettingsDialog.o temp/moc_GetRowIDDialog.o temp/moc_ShortCutsDialog.o temp/moc_FindDialog.o temp/moc_DrawRectangle.o   -L/usr/X11R6/lib64 -llept -ltesseract -lQt5Svg -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Core -lGL -lpthread 
//usr/local/lib/libtesseract.so: undefined reference to `pixReadFromMultipageTiff'
//usr/local/lib/libtesseract.so: undefined reference to `pixReadMemFromMultipageTiff'
collect2: error: ld returned 1 exit status
Makefile:200: recipe for target 'qt-box-editor-1.13dev' failed
make: *** [qt-box-editor-1.13dev] Error 1
zdenop commented 6 years ago

If I understood it correctly: this error message is not coming from qt-box-editor (it does not use this function) but from tesseract and it is related to leptonica. Do you have more leptonica version in you system? The missing functions were added to leptonica 2 year ago). So it should be part of 1.74 version (anyway I would suggest to user recent version 1.75.3)

MehulBhardwaj91 commented 6 years ago

I am currently using Leptonica-1.74.4 I will try to install 1.75.3 and see if the problem vanishes

Thanks.

MehulBhardwaj91 commented 6 years ago

So, I realised what was causing the issue (probably). As per the INSTALL guide in your package, I was installing libleptonica-dev using sudo apt-get install libleptonica-dev This was installing libleptonica-dev version 1.73.1 I had also separately installed leptonica-1.75.3. I still got the same error as before. So, I removedlibleptonica-dev package sudo apt-get remove libleptonica-dev And then ran the make command which ran successfully and now QT box editor is running as before. As per my understanding libleptonica-dev and leptonica (both installed separately) are different packages. But I guess I am wrong. Because as per documentation QT requires libleptonica-dev but I have only leptonica and QT is working fine. Please correct me if I am mistaken Best Regards

zdenop commented 6 years ago

You are mixing topics: libleptonica-dev is package of development files of leptonica library. So you had installed 2 version of same library (but they provide different features). Advanced users should know how to handle such situation. From my experiences to have installed more version of leptonica (or tesseract) is just source of pain...