-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Leptonica build fail (in process of installing Tesseract OCR engine) #18135
Comments
I've been trying to figure this out. If I use By the way, how does homebrew make its environment for including header files? I see lines like this scrolling by: libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c bilinear.c -o bilinear.o >/dev/null 2>&1 And I wonder how that could possibly work when its only looking for header files in the current directory The build doesn't complain about lacking a Thanks in advance for the assistance! |
Nope, that's expected; on 10.7 the symbol
(a) system header directories are always searched by default and (b) superenv intercepts calls to |
It seems that on my system at least, there is no such EDIT: The path of the only png.h I found on my filesystem:
I see, it seems I will have to learn a bit more about this superenv thing. Is there any way to debug the statements it generates? Also, is there a list of which paths are considered system paths? Does homebrew decide this or the compiler toolchain? |
@jacknagel : At any rate it seems that the development files for libpng are not (by default) installed on my 10.7. Shouldn't homebrew look inside the XCode sdk as well for files? Maybe that got left out with the switch to the superenv? Maybe the testing only focused on 10.8 (where I get the idea that another way is used to add |
@aktau On 10.7, png.h should be in |
@mistydemeo That's very odd, I had already checked for the presence of a
Any idea on what could've gone wrong with my install? I'm finding very little information about this on the web. Could I try to reinstall X11? Thing is I've heard that apple no longer supports it and wants people to go for xquartz... |
I'm having the idea that maybe the /usr/X11/include directory only includes the right files if at some point an older version of Xcode existed on the system which installed its files all over the system. The earliest Xcode I ever installed was 4.4, which was already an |
I'm running Mac OS X 10.6.8 and was having the same problem. Xcode can't be installed via the app store, so I followed http://blog.strug.de/2011/09/homebrew-without-xcode-save-15-gb/ png.h was nowhere to be found, so I did brew install libpng followed by brew edit leptonica: def install
+ ENV["CPPFLAGS"] = "-I/usr/local/opt/libpng/include"
+ ENV["LDFLAGS"] = "-L/usr/local/opt/libpng/lib"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install" This fixed the problem for me. |
And I just installed the command-line tools, which fixed it for me. Personally, I think that it might be advantageous for homebrew to look for the X11 header files in the XCode bundle because I prefer not to install the commandline tools. Should I open another bug or...? |
@aktau open a pull request |
@foolip If you install the tools that way, you don't get X11, which is where we source libpng on 10.6.8. You should install X11 or XQuartz. |
@mistydemeo We should probably add a doctor check for those tools at this point. |
@MikeMcQuaid Agreed, but the unfortunate thing is I'm not sure if there's a single identifying characteristic we could use to detect them. Ping @kennethreitz? |
Closing since the original poster's problem was solved in one way or another. |
Problem
It appears that a
png.h
file was not found. How would I go about remediating that?brew doctor and brew --config
: https://gist.github.com/Aktau/5055678brew install -v tesseract
: https://gist.github.com/Aktau/5055687The text was updated successfully, but these errors were encountered: