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

Can't Install Latest Head With Brew #864

Closed
jsl303 opened this issue May 2, 2017 · 13 comments
Closed

Can't Install Latest Head With Brew #864

jsl303 opened this issue May 2, 2017 · 13 comments

Comments

@jsl303
Copy link

jsl303 commented May 2, 2017

I was able to install head with brew before, but now I get this error. :(
Could someone help?
Thanks!
$ brew install tesseract --HEAD
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

==> Using the sandbox
==> Cloning https://github.com/tesseract-ocr/tesseract.git
Cloning into '/Users/user/Library/Caches/Homebrew/tesseract--git'...
remote: Counting objects: 724, done.
remote: Compressing objects: 100% (694/694), done.
remote: Total 724 (delta 88), reused 163 (delta 12), pack-reused 0
Receiving objects: 100% (724/724), 3.74 MiB | 0 bytes/s, done.
Resolving deltas: 100% (88/88), done.
Checking connectivity... done.
==> Checking out branch master
==> Downloading https://github.com/tesseract-ocr/tesseract/commit/b18cad4.patch
######################################################################## 100.0%
==> Patching
==> Applying b18cad4.patch
patching file configure.ac
Hunk #1 FAILED at 220.
1 out of 1 hunk FAILED -- saving rejects to file configure.ac.rej
patching file api/Makefile.am
Hunk #1 FAILED at 45.
1 out of 1 hunk FAILED -- saving rejects to file api/Makefile.am.rej
Error: Failure while executing: /usr/bin/patch -g 0 -f -p1 -i /private/tmp/tesseract--patch-20170502-16295-cpuv7w/b18cad4.patch

@Shreeshrii
Copy link
Collaborator

Shreeshrii commented May 2, 2017 via email

@jsl303
Copy link
Author

jsl303 commented May 2, 2017 via email

@amitdo
Copy link
Collaborator

amitdo commented May 2, 2017

The brew formulae is for version 3.05, while the HEAD is 4.00 (alpha).

@jsl303
Copy link
Author

jsl303 commented May 2, 2017 via email

@amitdo
Copy link
Collaborator

amitdo commented May 2, 2017

Dunno. I don't have a a Mac...

@Shreeshrii
Copy link
Collaborator

@stweil
Copy link
Contributor

stweil commented May 4, 2017

@zdenop, maybe a new release 3.05.01 would help making such patches unnecessary.

@amitm02
Copy link

amitm02 commented May 12, 2017

same here

@atuyosi
Copy link
Contributor

atuyosi commented May 16, 2017

@jsl303,

As you might already know, Homebrew's Formula can edit locally.

$ brew edit tesseract

If you want to skip the patch, comment out line 71-74, and save it.

( /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/tesseract.rb )

$ brew install tesseract --HEAD

or, wrapping patch block with 'if-end' block such like below.

--- a/Formula/tesseract.rb
+++ b/Formula/tesseract.rb
@@ -68,10 +68,12 @@ class Tesseract < Formula
   # remove on next release, > 3.05.00
   # upstream fix for building with OpenCL enabled
   # https://github.com/tesseract-ocr/tesseract/pull/814
+  if !build.head?
   patch do
     url "https://github.com/tesseract-ocr/tesseract/commit/b18cad4.patch"
     sha256 "10c59baa54c3406fcd03f36cd0f1e3cc2ba150f082d14f919274a541b3cff7b2"
   end
+  end

   def install
     if build.head?

atuyosi added a commit to atuyosi/homebrew-core that referenced this issue May 16, 2017
@atuyosi
Copy link
Contributor

atuyosi commented May 17, 2017

My PR got merged. So, no need to edit Formula.

@jsl303, It should work with the following command.

$ brew update
$ brew install tesseract --HEAD

@stweil
Copy link
Contributor

stweil commented May 17, 2017

This issue can be closed. brew install tesseract --HEAD now works.

@zdenop zdenop closed this as completed May 17, 2017
@Shreeshrii
Copy link
Collaborator

@stweil Please see the recent post at https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/tesseract-ocr/H9JmIRU2dQk/oMtSIvtHAwAJ regarding problem with install of training tools on mac os. Thanks!

@stweil
Copy link
Contributor

stweil commented Jul 31, 2017

Please see the recent post ...

I need more information because I currently cannot reproduce the build problem (building training tools works for me with MacPorts and with Homebrew).

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

7 participants