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

build script, autogen.sh, fails #4011

Open
z160896 opened this issue Jan 31, 2023 · 3 comments
Open

build script, autogen.sh, fails #4011

z160896 opened this issue Jan 31, 2023 · 3 comments

Comments

@z160896
Copy link

z160896 commented Jan 31, 2023

Basic Information

I followed the Tesseract build instructions, installed all requirement packages. When I run autogen.sh, it breaks with this problem:

Running aclocal
Running /opt/local/bin/glibtoolize
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
glibtoolize: copying file 'config/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
Running aclocal
Running autoconf
Missing pkg-config. Check the build requirements.

Something went wrong, bailing out!

in the autogen.sh script:

if grep -q PKG_CHECK_MODULES configure; then

The generated configure is invalid because pkg-config is unavailable.

rm configure
echo "Missing pkg-config. Check the build requirements."
bail_out
fi

do you know where is PKG_CHECK_MODULES defined?
I installed pkg-config:
tesseract % pkg-config --version
0.29.2

how can I fix this problem:
Missing pkg-config. Check the build requirements.

Something went wrong, bailing out!

gmake: *** [Makefile:383: tesseract.built] Error 1

Operating System

macOS 13 Ventura

Other Operating System

No response

uname -a

./autogen.sh
Running aclocal
Running /opt/local/bin/glibtoolize
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
glibtoolize: copying file 'config/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
Running aclocal
Running autoconf
Missing pkg-config. Check the build requirements.

Something went wrong, bailing out!

Compiler

Xcode, gcc

Virtualization / Containers

No response

CPU

No response

Current Behavior

No response

Expected Behavior

No response

Suggested Fix

No response

Other Information

No response

@zdenop
Copy link
Contributor

zdenop commented Jan 31, 2023

Please do not cherry-pick error messages and code snippets.
Follow documentation and provide a WHOLE log of each step.

@z160896
Copy link
Author

z160896 commented Feb 1, 2023

@zdenop how about these steps on MacOS, following the instruction here, https://tesseract-ocr.github.io/tessdoc/Compiling.html#macos:

tesseract % brew install libomp
Running brew update --auto-update...
==> Fetching libomp
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/manifests/15.0.7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/blobs/sha256:762c461db6af3cf78983b1eb58aee62699652b96237abf79469c8ac034b2156b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:762c461db6af3cf78983b1eb58aee62699652b96237abf79469c8ac034b2156b?se=2023-02
######################################################################## 100.0%
==> Pouring libomp--15.0.7.ventura.bottle.tar.gz
==> Caveats
libomp is keg-only, which means it was not symlinked into /usr/local,
because it can override GCC headers and result in broken builds.

For compilers to find libomp you may need to set:
export LDFLAGS="-L/usr/local/opt/libomp/lib"
export CPPFLAGS="-I/usr/local/opt/libomp/include"

==> Summary
🍺 /usr/local/Cellar/libomp/15.0.7: 7 files, 1.6MB
==> Running brew cleanup libomp...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).

tesseract % brew install autoconf
automake
libtool
pkgconfig
leptonica
Warning: autoconf 2.71 is already installed and up-to-date.
To reinstall 2.71, run:
brew reinstall autoconf
Warning: automake 1.16.5 is already installed and up-to-date.
To reinstall 1.16.5, run:
brew reinstall automake
Warning: libtool 2.4.7 is already installed and up-to-date.
To reinstall 2.4.7, run:
brew reinstall libtool
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
brew reinstall pkg-config
Warning: leptonica 1.82.0_1 is already installed and up-to-date.
To reinstall 1.82.0_1, run:
brew reinstall leptonica

tesseract % cd ..
(base) robertzhou@ip-192-168-1-106 github % git clone https://github.com/tesseract-ocr/tesseract.git
Cloning into 'tesseract'...
remote: Enumerating objects: 46542, done.
remote: Counting objects: 100% (298/298), done.
remote: Compressing objects: 100% (179/179), done.
remote: Total 46542 (delta 150), reused 202 (delta 116), pack-reused 46244
Receiving objects: 100% (46542/46542), 51.48 MiB | 22.26 MiB/s, done.
Resolving deltas: 100% (36413/36413), done.
Updating files: 100% (731/731), done.

github % cd tesseract

tesseract % ./autogen.sh
Running aclocal
Running /opt/local/bin/glibtoolize
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
glibtoolize: copying file 'config/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
Running aclocal
Running autoconf
Missing pkg-config. Check the build requirements.

Something went wrong, bailing out!

@zdenop
Copy link
Contributor

zdenop commented Feb 1, 2023

I do not have a MacOS, but there is no problem to build tesseract from source - see relevant github action log and workflow file.

Hopefully somebody with MacOS 13 will explain what is wrong with your setup.

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

No branches or pull requests

2 participants