Closed dmigowski closed 3 years ago
You seem to have a debug build, which is larger by nature.
The script .github/workflows/build.sh
runs a release build, but all binaries include debug information (important for debugging and profiling).
Use x86_64-w64-mingw32-strip
to remove that debug information.
Here you can see the effect of x86_64-w64-mingw32-strip libtesseract-5.dll
:
# size with debug information
-rwxr-xr-x 1 debian debian 110669963 6. Mai 12:35 libtesseract-5.dll
# size without debug information
-rwxr-xr-x 1 debian debian 3172864 6. Mai 12:48 libtesseract-5.dll
Different compilers (gcc, clang) and compiler versions also create different sizes (more or less optimizations, more or less debug information). As the debug information also includes path names, the name of your local source and build directory also contributes to the debug information and to the binary code (because that also includes assertions with the full name of the source file).
@dmigowski, can I close this issue or do you need more information?
Wasn't able to test this sooner but now it works and the binaries are even smaller than the VC binaries. Thank you!
Hello,
I am trying to compile my own tesseract to be able to test some code. I am doing this:
Binaries seem to be created at ... ./bin/ndebug/x86_64-w64-mingw32-/usr/x86_64-w64-mingw32/bin ...
However, when I compare them to the binaries build by you I find that all of them are 50% bigger
My System:
Any ideas?