tesseract: `make training` ld error when building 4.0 on macOS
When I was compiling Tesseract 4.0 on macOS according compiling. At last step, make training came with the following error:
/bin/sh ../libtool --tag=CXX --mode=link g++-6 -g -O2 -std=c++11 -L/usr/local/opt/icu4c/lib -o text2image text2image.o libtesseract_training.la libtesseract_tessopt.la -licui18n -licuuc ../api/libtesseract.la -licui18n -licuuc -lpango-1.0 -lpangocairo-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -lpangoft2-1.0 -lfontconfig -L/usr/local/Cellar/leptonica/1.74.4/lib -llept
libtool: link: g++-6 -g -O2 -std=c++11 -o .libs/text2image text2image.o -Wl,-bind_at_load -L/usr/local/opt/icu4c/lib ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.dylib -L/usr/local/Cellar/leptonica/1.74.4/lib -licui18n -licuuc -lpango-1.0 -lpangocairo-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -lpangoft2-1.0 -lfontconfig -llept -fopenmp
ld: library not found for -lpango-1.0
collect2: error: ld returned 1 exit status
make[1]: *** [text2image] Error 1
make: *** [training] Error 2
I checked my lib in /usr/local/Cellar/pango/1.40.6/lib, libpango-1.0 was there.
So what’s the problem?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 23 (7 by maintainers)
I can’t help more because I do not have a mac…
The wiki actually suggests to install gcc for homebrew.
@zdenop, I suggest to close this issue. Building on macOS works fine as long as people use the default compiler from Apple (not install their own gcc!) and only use the pre-build packages as described in the Wiki. I tested this on two different Macbooks with recent versions of macOS.
Please mark it also as question.