Summary: | Tesseract not compiling with Xcode 12.5 | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Bruno Voisin <bruno.voisin> |
Component: | Other Driver | Assignee: | Chris Liddell (chrisl) <chris.liddell> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 9.54.0 | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | Word Size: | --- | |
Attachments: | make output just before failure |
Description
Bruno Voisin
2021-05-26 14:06:38 UTC
I don't follow this: we don't run the tesseract configure script when building into Ghostscript, so changes to it shouldn't affect the Ghostscript build at all. Building Ghostscript with the OCR devices, with XCode 12.5.1 seems to work just fine for me.... Unfortunately, my setup has changed somewhat compared with that for which the report was made. It's now macOS 12.0 and Xcode 13.0, both in Beta 5 version (on Apple Silicon chip). To compile Ghostscript 9.54.0, two changes now need to be made to the source: - First, in configure, replace libstdc++ on line 7131 by libc++, giving cxxflags_to_try="-std=c++17 -stdlib=libc++" Otherwise, at the make stage, when gcc processes base/tessocr.cpp, you get an error clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] - Second, rename tesseract/VERSION to anything other than "VERSION". Otherwise, again when gcc processes base/tessocr.cpp, you get the errors I reported initially. The name change prevents gcc from reading this tesseract/VERSION instead of the intended /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/version for a full Xcode install, or /Library/Developer/CommandLineTools/usr/include/c++/v1/version in case only the Command Line Tools are installed. The change in configure.ac plays no role here. It was for consistency, based on the analysis at https://groups.google.com/g/tesseract-ocr/c/MpCZe5wRYQE/m/BBVgEtVhCAAJ so that the configure script could be recreated by autoconf if need be. As for your not experiencing the problem with Xcode 12.5.1, the only explanation I could think of is that your hard drive may be formatted as Case-sensitive instead of the (default) Case-insensitive. I just checked, to be sure, when formatting a hard drive in Disk Utility you have a choice between APFS and HFS+ (aka Mac OS Extended), either Default (= Case-insensitive) or Case-sensitive, with or without encryption. The disk on which I observed the reported behaviour is APFS Encrypted Case-insensitive. |