Closed bertsky closed 8 months ago
Confirmed. Since Tesseract 5.3.4, C++17 is required.
So in setup.py we should make another case distinction...
Are you sure your system is not miss configured and/or outdated? e.g. I did not see python 3.8 for a long time (actually 3.11 is already in bugfix stage). I use tesserocr on windows, opensuse, rasberianpi and I do not remember problem regarding c++17. Anyway #343 does no cause any harm.
@zdenop this has nothing to do with Python versions, obviously. (And no, Python 3.8 is not EOL just yet.)
As you well know, a C++17 compiler is required with Tesseract now. The Tesserocr build still only used C++11 setting. So even newer compilers would have misbehaved AFAIK.
@bertsky : I did not write Py3.8 is EOL. I asked if you can check that your system is not misconfigured or outdated.
Tesseract required c++17 for several years. AFAIK -std=c++17
is need only when your code is using c++17 features (as far as I see tesserocr does not)
Your issue claims "does not build on current Tesseract anymore" however github action run 5 months ago (for 2.6.2 release) states something else https://github.com/sirfz/tesserocr/actions/runs/6456160629 (yes also it build wheel for python8 without problem). So either we should improve github action or you should fix your system...
@zdenop the build status from 5 months ago is irrelevant. Up until a week ago, the CI would install Tesseract 5.3.3. As the issue says, this starts happening with 5.3.4. It's also happening with g++ 11.
@sirfz could you please make a new release on PyPI so installing tesserocr via pip works again?
There were no changes in tesseract or tesserocr runtime code regarding C++17 vs C++14 in the last months... C++17 code is located in the training tools, which are not used in tesserocr. And yes it is there for more than a year so the build status from 5 months ago regarding your claim is relevant.
I understand from @zdenop that your issue was unrelated to the C++ version used to build tesserocr as the lib would still successfully compile with C++14.
In any case, I guess the change is welcome and v2.6.3 has been published on Pypi.
Yes, this change is ok (in line with the current Tesseract build where it is needed).
On current tesserocr:master and tesseract:main with Python 3.8, we now got:
full log: see this build
I believe, the reason is that Tesseract now requires C++17. Will investigate...