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
tesseract 4.1.1 compile fails on macOS with a case insensitive filesystem #3447
Comments
This was fixed in git master (see commit bf3421f). A similar fix is still needed for the 4.1 branch. Builds using a subdirectory show the same problem. A lot of other projects are affected by the same problem (for example QEMU). So ideally the issue should be fixed by Apple on their side. |
Commit 6dc4b18 fixes the 4.1 branch. More fixes are still required for |
Fixed in commit dbc79b0. |
Not really sure what there is for Apple to fix here. Things that Apple can do:
1 is a huge breaking change, and is unlikely to happen. 2 would violate the C++ standard. I don't think we want a non-standards-compliant compiler. 3 won't fix the same issues for users who try to compile software with GCC (when GCC has implemented enough of C++20 -- not sure it has), or with a Clang that isn't provided by Apple. |
Does the C++ standard require an include file called "version"? Even if it does, there is no need to include it from other system header files. Other implementations of the C++ standard don't do that. |
That's already supported. OpenWRT for example suggests a case-sensitive mount for builds on MacOS. |
Yes.
They don't do it yet. They will. See https://bugs.llvm.org/show_bug.cgi?id=42540.
Ok, so, as an alternative to sanitising your include paths, are you proposing that everyone else instead mount a case-sensitive file system and move their source tree and SDK there whenever they want to build something? Or are you proposing that Apple implement some magic hackery that makes the file system case-sensitive whenever anyone tries to use |
Maybe I should have been clearer. Current implementations of the latest C++ standard on Linux provide the
No, I don't propose that. I fixed the issue for Tesseract 4.1 and master (so it can be closed here). But I also think that Apple could have found a better solution to implement the standard. And mounting a case-sensitive file system can be one way to handle the problem if other alternatives are not possible. |
but according to @stweil
|
Our documentation also includes several examples for autotools builds in subdirectories. |
I close this issue because it is fixed in the 4.1 branch. |
Environment
Darwin macbook-pro 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
Current Behavior:
Compiling 4.1.1 on macOS 11.4 (Big Sur) using the provided Xcode SDK, clang++ and a case-insensitive filesystem produces a compilation error due to the combination of the macOS SDK having
#include <version>
in a header file and theVERSION
file in the root of the tesseract distributionThis is a sibling issue to Homebrew/homebrew-core#78450 where they asked me to report it here
Expected Behavior:
Compilation succeeds even with an SDK that has
#include <version>
in itSuggested Fix:
VERSION
file toVERSION.txt
-I.
in the CPPFLAGS to keep the root directory out of the include pathI tried to reproduce this failure using GitHub Actions but it seems their macos build agents are not new enough to reproduce this failure
The text was updated successfully, but these errors were encountered: