Open fin-eng opened 6 years ago
Please provide full log and not only last line.
Sure, here it is:
make
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.9 -Wl,-rpath,/anaconda3/lib -o release/qt-box-editor-1.12rc1.app/Contents/MacOS/qt-box-editor-1.12rc1 build/release/main.o build/release/MainWindow.o build/release/ChildWidget.o build/release/DelegateEditors.o build/release/TessTools.o build/release/SettingsDialog.o build/release/GetRowIDDialog.o build/release/ShortCutsDialog.o build/release/FindDialog.o build/release/DrawRectangle.o build/release/qrc_application.o build/release/qrc_QBE-GNOME.o build/release/qrc_QBE-Faenza.o build/release/qrc_QBE-Oxygen.o build/release/qrc_QBE-Tango.o build/release/moc_MainWindow.o build/release/moc_ChildWidget.o build/release/moc_DelegateEditors.o build/release/moc_SettingsDialog.o build/release/moc_GetRowIDDialog.o build/release/moc_ShortCutsDialog.o build/release/moc_FindDialog.o build/release/moc_DrawRectangle.o -L/usr/local/lib -L/anaconda3/lib -lQt5Svg -framework DiskArbitration -framework IOKit -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Core -framework OpenGL -framework AGL
Undefined symbols for architecture x86_64:
"tesseract::TessBaseAPI::GetBoxText(int)", referenced from:
TessTools::makeBoxes(QImage const&, int) in TessTools.o
"tesseract::TessBaseAPI::GetThresholdedImage()", referenced from:
TessTools::GetThresholded(QImage const&) in TessTools.o
"tesseract::TessBaseAPI::End()", referenced from:
TessTools::makeBoxes(QImage const&, int) in TessTools.o
TessTools::GetThresholded(QImage const&) in TessTools.o
"tesseract::TessBaseAPI::Init(char const, char const, tesseract::OcrEngineMode, char*, int, GenericVector
Problem is here:
Undefined symbols for architecture x86_64: "tesseract::TessBaseAPI::GetBoxText(int)" ... ld: symbol(s) not found for architecture x86_64
I am not familiar with Mac OS, but if I got it right log: you do not have 64bit tesseract library (or you are mixing 64bit build with 32bit library...) Can you check where is located/installed tesseract?
Sorry for the late reply, was already posting but somehow it got lost on its way.
Do you mean that information?
brew info tesseract tesseract: stable 3.05.02 (bottled), HEAD OCR (Optical Character Recognition) engine https://github.com/tesseract-ocr/ /usr/local/Cellar/tesseract/3.05.02 (235 files, 1.2GB) * Built from source on 2018-06-26 at 16:10:48 with: --with-all-languages From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/tesseract.rb ==> Dependencies Build: autoconf ✔, autoconf-archive ✔, automake ✔, libtool ✔, pkg-config ✔ Required: leptonica ✔, libtiff ✔ ==> Options --with-all-languages Install recognition data for all languages --with-opencl Enable OpenCL support --with-serial-num-pack Install serial number recognition pack --with-training-tools Install OCR training tools --HEAD Install HEAD version
I am sorry - this seems to be Mac OS specific and I am not familiar with it. @IRobL @xErik can you check/help with this?
No worries @zdenop, thanks for your fast response
Hey there,
I encountered this myself and looked into it. I have created a PR to fix the issue.
The gist of it is that the qmake configuration for macOS is currently expecting a custom installation of Tesseract, instead of the official Homebrew package. It was also not linking libtesseract or liblept.
I am guessing the original custom install was expected because at the time (three years ago?), the official Tesseract package did not support installing training tools. It does, now, so I don't see a need for it.
Ryan
Hi Ryan,
Many thanks for working on that issue, only tried it today, but it works wonderful.
Cheers & have a nice weekend!
"Make" exits with the following: clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [release/qt-box-editor-1.12rc1.app/Contents/MacOS/qt-box-editor-1.12rc1] Error 1
I guess it has to do with the tesseract version: tesseract -v tesseract 3.05.02 leptonica-1.76.0 libjpeg 9c : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.11
Wanted to try the 3.02 of tesseract but that seems unavailable at homebrew.
Any idea how to make it up and running on Mac os?