-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Allow compilation with clang-7 #3663
Conversation
Signed-off-by: Stefan Weil <sw@weilnetz.de>
These small modifications allow building Tesseract 5 with clang-7 on Debian stretch. They are not sufficient for g++ 6.3 (see issue #3255). |
This happens when no C++17 available in stdlib. (Compilers port some core language (not std) features into older standards. Like such |
Therefore I think that it's good to check for C++17 to get at least a compiler which nearly supports it. If we would lower the requirements and only check C++14, we might risk getting more reports for old compilers which are nearly compatible with C++14. Maybe we also want to use more C++17 features (which may then break builds with clang from Debian stretch, too) in later 5.x.y releases. |
5.x.x releases won't get too much attention and code changes, so they could live with current "semi-C++17" standard. As always I propose to move forward with the next 6,7... main branch (C++20/23). |
By the way, do we have v5 branch already? Such fixes could land exactly there. |
Before applying this patch, did you try to install libc++-7-dev, and tell clang to use it: |
Also note that Debiain Stretch is not maintained by the Debian project anymore.
EOL of Debian Stretch LTS: June 30, 2022. Personally, I don't think we should support it in 5.0.0. |
https://gcc.gnu.org/gcc-12/changes.html
|
These warnings are also available in Clang: https://clang.llvm.org/docs/DiagnosticsReference.html#wc-17-extensions |
Signed-off-by: Stefan Weil sw@weilnetz.de