Skip to content
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

cmake build without pkg-config fails on MacOS 10.14.4 #2424

Closed
zdenop opened this issue May 8, 2019 · 3 comments
Closed

cmake build without pkg-config fails on MacOS 10.14.4 #2424

zdenop opened this issue May 8, 2019 · 3 comments
Milestone

Comments

@zdenop
Copy link
Contributor

zdenop commented May 8, 2019

d5f23a6 actually works on MacOS 10.14.4

git clone https://github.com/tesseract-ocr/tesseract.git
cd tesseract
git reset --hard d5f23a61b36de564c660ce37fec28bbc2b58f1e1
mkdir build && cd build
cmake ..
make -j8
...
[100%] Built target tesseract

087576f fails (and 7a5b9b8 behaves exactly the same way)

git clone https://github.com/tesseract-ocr/tesseract.git
git reset --hard 087576f2d9d320cff5ba41df29120a8d8cc0e08b
cd tesseract
mkdir build && cd build
cmake ..
...
Configuring tesseract version 5.0.0-alpha-45-g7a5b...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
CMake Error at CMakeLists.txt:149 (message):
  Missing required pkg-config


-- Configuring incomplete, errors occurred!

Although which pkgconf outputs /usr/local/bin/pkgconf - but this error is fixable by specifying the pkgconf path explicitly:

cmake .. -D PKG_CONFIG_EXECUTABLE=/usr/local/bin/pkgconf
make -j8
...
[ 99%] Linking CXX shared library libtesseract.dylib
ld: library not found for -lleptonica
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libtesseract.5.0.0.dylib] Error 1
make[1]: *** [CMakeFiles/libtesseract.dir/all] Error 2
make: *** [all] Error 2

Altough Leptonica is present in /usr/local/lib:

ls /usr/local/lib/liblept*
/usr/local/lib/liblept.dylib -> libleptonica.1.79.0.dylib
/usr/local/lib/libleptonica.1.79.0.dylib
/usr/local/lib/libleptonica.5.3.0.dylib -> libleptonica.1.79.0.dylib
/usr/local/lib/libleptonica.dylib -> libleptonica.5.3.0.dylib

Thanks for the quick reply.

Originally posted by @gorankarlic in #2337 (comment)

@zdenop zdenop added this to the 4.1.0 milestone May 8, 2019
@zdenop
Copy link
Contributor Author

zdenop commented May 8, 2019

@gorankarlic : please test the lastet cmake

@zdenop
Copy link
Contributor Author

zdenop commented Jun 18, 2019

@gorankarlic: can you please check if 4.1.0 Release candidate 4 works for you?

@gorankarlic
Copy link

Works now - thank you!

I am having issues with Leptonica, but seem unrelated to tesseract / pgk-config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants