This repository has been archived by the owner. It is now read-only.

Tesseract won't install with Xcode 4.3 due to missing aclocal #10423

Closed
thedjinn opened this Issue Feb 23, 2012 · 7 comments

Comments

Projects
None yet
6 participants
@thedjinn

After upgrading to Xcode 4.3 I cannot install Tesseract anymore. It complains about aclocal not being found, probably due to the removal of autoconf. Installing the autoconf formula from homebrew-alt didn't solve it for me.

Here is the exact output I am getting:

==> Downloading http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz
File already downloaded in /Users/djinn/Library/Caches/Homebrew
==> /bin/sh autogen.sh
Running aclocal
autogen.sh: line 45: aclocal: command not found

  Something went wrong, bailing out!

==> Exit Status: 1
http://github.com/mxcl/homebrew/blob/master/Library/Formula/tesseract.rb#L111
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 51d054c9a9616f0c5bba5955561b7486fc5cf139
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
Clang: 3.1 build 318
MacPorts or Fink? false
X11 installed? true
System Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl:   /usr/bin/perl
Which Python: /usr/bin/python
Which Ruby:   /Users/djinn/.rvm/rubies/ruby-1.9.3-p0-falcon/bin/ruby
==> Build Flags
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j2
@mistydemeo

This comment has been minimized.

Show comment Hide comment
@mistydemeo

mistydemeo Feb 24, 2012

Contributor

Can you try removing the aclocal line from the formula and let me know if it builds and runs correctly?

Contributor

mistydemeo commented Feb 24, 2012

Can you try removing the aclocal line from the formula and let me know if it builds and runs correctly?

@thedjinn

This comment has been minimized.

Show comment Hide comment
@thedjinn

thedjinn Feb 24, 2012

I've looked into it a bit further. The formula calls the following lines:

system "/bin/sh autogen.sh"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
...

Inside the autogen.sh is the call to aclocal. Commenting out the aclocal line generates a new error, because this script also calls libtoolize and automake. Both of these are also not present with Xcode 4.3. Simply commenting these lines out will not work because the tarball does not come with Makefile.in, so the configure script will fail unless automake is invoked.

I've looked into it a bit further. The formula calls the following lines:

system "/bin/sh autogen.sh"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
...

Inside the autogen.sh is the call to aclocal. Commenting out the aclocal line generates a new error, because this script also calls libtoolize and automake. Both of these are also not present with Xcode 4.3. Simply commenting these lines out will not work because the tarball does not come with Makefile.in, so the configure script will fail unless automake is invoked.

@josefprusa

This comment has been minimized.

Show comment Hide comment
@josefprusa

josefprusa Feb 25, 2012

Install Command Line Tools from Preferences -> Downloads

WTF Apple :-(

Install Command Line Tools from Preferences -> Downloads

WTF Apple :-(

@thedjinn

This comment has been minimized.

Show comment Hide comment
@thedjinn

thedjinn Feb 25, 2012

I already had the CLI tools installed. Didn't help of course because they don't provide autoconf/automake.

I already had the CLI tools installed. Didn't help of course because they don't provide autoconf/automake.

@mxcl mxcl closed this in b0c81fc Feb 27, 2012

etehtsea added a commit to etehtsea/homebrew that referenced this issue Mar 3, 2012

Autoconf, Automake and Libtool
We need these now for Xcode-4.3/CLT4X installations.

Also prevent m4 error in installer. And prevent brew doctor complaining if we're Xcode 4.3 or above.

Closes #10349. Fixes #10423. Refs #9179.

Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Jun 18, 2012

Autoconf, Automake and Libtool
We need these now for Xcode-4.3/CLT4X installations.

Also prevent m4 error in installer. And prevent brew doctor complaining if we're Xcode 4.3 or above.

Closes #10349. Fixes #10423. Refs #9179.

Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012

Autoconf, Automake and Libtool
We need these now for Xcode-4.3/CLT4X installations.

Also prevent m4 error in installer. And prevent brew doctor complaining if we're Xcode 4.3 or above.

Closes #10349. Fixes #10423. Refs #9179.
@yteng

This comment has been minimized.

Show comment Hide comment
@yteng

yteng Sep 26, 2012

To Fix the problem, You can install the latest GNU autoconf and automake as the following,
[Copy from the URL, http://www.mattvsworld.com/blog/2010/02/install-the-latest-autoconf-and-automake-on-mac-os-10-6/]

curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure --prefix=/usr/local # ironic, isn't it?
make
sudo make install
cd ..

here you might want to restart your terminal session, to ensure the new autoconf is picked up and used in the rest of the script

curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
tar xzvf libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure --prefix=/usr/local
make
sudo make install

yteng commented Sep 26, 2012

To Fix the problem, You can install the latest GNU autoconf and automake as the following,
[Copy from the URL, http://www.mattvsworld.com/blog/2010/02/install-the-latest-autoconf-and-automake-on-mac-os-10-6/]

curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure --prefix=/usr/local # ironic, isn't it?
make
sudo make install
cd ..

here you might want to restart your terminal session, to ensure the new autoconf is picked up and used in the rest of the script

curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
tar xzvf libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure --prefix=/usr/local
make
sudo make install

@mistydemeo

This comment has been minimized.

Show comment Hide comment
@mistydemeo

mistydemeo Sep 26, 2012

Contributor

@yteng That isn't necessary. Homebrew provides autoconf, automake and libtool formulae and they're used when appropriate.

Contributor

mistydemeo commented Sep 26, 2012

@yteng That isn't necessary. Homebrew provides autoconf, automake and libtool formulae and they're used when appropriate.

snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012

Autoconf, Automake and Libtool
We need these now for Xcode-4.3/CLT4X installations.

Also prevent m4 error in installer. And prevent brew doctor complaining if we're Xcode 4.3 or above.

Closes #10349. Fixes #10423. Refs #9179.
@neoneye

This comment has been minimized.

Show comment Hide comment
@neoneye

neoneye Dec 10, 2013

@yteng very helpful thank you

neoneye commented Dec 10, 2013

@yteng very helpful thank you

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.