-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
CMake: builds always use -march=native
#4030
Comments
Linux distributions should use the automake build which fixed that in commit 5884036. Does openSUSE use the cmake build? Why? |
https://code.opensuse.org/package/tesseract-ocr/blob/master/f/tesseract-ocr.spec#_79 says we use cmake since we moved from automake 2 months ago. |
People see that we support both Autotools and CMake, and they choose the tool they prefer. |
That's okay for individual users and for those who have special needs like using IDEs for Windows or macOS. But for Linux distributions I suggest to move back to automake. That minimized their risk and makes it easier for us. |
Even outside of Linux, #3864 would be useful, because not everyone runs their binaries on the same type of machine as their build machine. |
-march=native
-march=native
@stweil .. usually is cmake faster, you can use different builder than make like ninja, and it can be pretty easy debug and modified in comparsion with autotools ? |
Please check current code. Now the default setting should be the same as at autotools. |
commit f779c43 looks good, except that it does not mention this issue. |
Autotools by default builds shared and static libraries and builds executables which use the shared tesseract library. CMake by default seems to build only the static library, so the executables don't use a shared tesseract library and are much larger. @bmwiedemann, Linux distributions typically prefer shared linking. Do you use special flags when running CMake? A single threaded build with CMake takes around 1:46 on my MacBook and uses 99 % cpu. |
I don't think it's a good default. what do you think? |
As far as I know that's the normal default for autotools. And typically a distribution requires both, shared libraries for the binaries and additional static libraries for development packages. So for distributions that default is fine. |
Current Behavior
While working on reproducible builds for openSUSE, I found that
when building packages, machine code depends on which build worker is selected from our build pool.
Expected Behavior
It should be possible to build without
-march=native
to get reproducible binaries.Suggested Fix
There is a fix in #3864
tesseract -v
5.3.0
Operating System
No response
Other Operating System
openSUSE-Tumbleweed 20230315
uname -a
6.2.4
Compiler
gcc-12
CPU
various
Virtualization / Containers
No response
Other Information
No response
The text was updated successfully, but these errors were encountered: