Tesseract: 'Missing autoconf-archive' under Mac

Created on 23 Apr 2018  路  19Comments  路  Source: tesseract-ocr/tesseract

Environment

  • Tesseract Version: LSTM based 4.0 version
    * Platform: Mac os High Sierra 10.13.3

Current Behavior:

when I run ./autogen.sh, it says Missing autoconf-archive. Check the build requirements.
, but I did install the autoconf-archive,when I input brew install autoconf-archive, it tell me Warning: autoconf-archive 2018.03.13 is already installed and up-to-date To reinstall 2018.03.13, run brew reinstall autoconf-archive
It drive me crazy, and sorry to bother you.

build_process

All 19 comments

Please provide the commit number for the source you are using?

What you see if you type in command line (in the same directory where autogen.sh is located) this:
grep -q AX_CHECK_COMPILE_FLAG configure

To 'Shreeshrii '锛欼'm using this version d3f6382.
To 'zdenop': It says grep: configure: No such file or directory
Thank you!

But then you should get error sooner from script! Did you modified it?

Maybe your autoconf and your autoconf-archive don't match, so the former does not use the latter.

To 'zdenop': I didn鈥榯 modified it, and in this folder just a configure.ac file, I haven't other file's name like configure, and if I input grep -q AX_CHECK_COMPILE_FLAG configure.ac and nothing come out.

To 'stweil': I just tried using brew to upgrade this two, but it tell me it is all up-to-date,I'm confused.

Thank for your patience!

That is strange because line above should create configure or quit.

Line 118 removes the newly created configure again if it is considered to be bad. @TonyDongLB, could you please remove that rm command from autogen.sh and try the grep command once more? Or run the commands from autogen.sh manually to see what is wrong with the generated configure file.

I have manually ran the commands from autogen.sh, and when it came to the line 116, below comes out.
TonyMaster@MBP tesseract$ if grep -q AX_CHECK_COMPILE_FLAG configure; then
echo "Missing autoconf-archive. Check the build requirements."
bail_out
fi
Missing autoconf-archive. Check the build requirements.
-bash: bail_out: command not found
And I input
TonyMaster@MBP tesseract$ grep -q AX_CHECK_COMPILE_FLAG configure
TonyMaster@MBP tesseract$
THANK YOU!

Yes. The unanswered question is "What did grep find in configure?". So please run grep AX_CHECK_COMPILE_FLAG configure before configure is removed. If autoconf works as expected and if there is also autoconf-archive, then grep will not find anything. In your case, it found something.

Yes, it is the same as you told.
AX_CHECK_COMPILE_FLAG(-mavx, avx=true, avx=false)
AX_CHECK_COMPILE_FLAG(-mavx2, avx2=true, avx2=false)
AX_CHECK_COMPILE_FLAG(-msse4.1, sse41=true, sse41=false)

So please run type autoconf and type brew. What is the result of both commands? How does your PATH look like (run echo $PATH)?

Can you please retest current master code?

Sorry for has been missing for tow days, I just finish my algorithm test.
@zdenop I just tried to retest current master code, and the error come out again.So I think this is my fault.
@stweil
TonyMaster@MBP tesseract$ type autoconf
autoconf is /sw/bin/autoconf
TonyMaster@MBP tesseract$ type brew
brew is /usr/local/bin/brew
TonyMaster@MBP tesseract$ $PATH
-bash: /Users/apple/anaconda2/bin:/usr/local/opt/opencv@2/bin:/sw/bin:/sw/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin:/etc/mentohust: No such file or directory

Is there also a /usr/local/bin/autoconf?

It looks like you have a mixture of two different installations, one in /sw, the other in /usr/local.

@TonyDongLB : can you react? Do you have multiple installation of build/installation tools?

I have the same OS X env (High Sierra, autoconf-archive 2018-03-13) as @TonyDongLB. With the latest commit (8e2344a4b00528d4d92a390896820e3f87c7f3e7), autogen.sh works correctly.

This is what we expected: there are a more OS X user and have no problem with current setup.
This (usually) indicate problem on user side which can not be solved (easily) by tesseract team. Better it to use user forum, where are involved more people.

I solved it by 'sudo apt install autoconf-archive'. I got Ubuntu 16.04

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dthrock picture dthrock  路  5Comments

clarkk picture clarkk  路  7Comments

clarkk picture clarkk  路  6Comments

mm-manu picture mm-manu  路  4Comments

Shreeshrii picture Shreeshrii  路  4Comments