How to Build Tesseract from Source Code on M1 Macbook?

35 views
Skip to first unread message

Yaofu Zhou

unread,
May 19, 2024, 11:14:54 PMMay 19
to tesseract-ocr
Dear Community,

Has anyone using M1 Macbook or a similar ARM architecture been able to compile Tesseract from the latest source code from GitHub? If so, could you share with me the process?

Just to clarify, I have been running the official binary with Homebrew, but I really want to be able to build the project from the source code because of the hacks needed -

1. I wish to adjust the batch size during the training process, which seems to be accessible only via the source code. Feel free to correct me if otherwise.

2. I wish to enable more parallel computing by either enabling OpenMP with gcc/g++, or by enabling TensorFlow (with GNU or X-code c/c++ compiler). Each attempt resulted in errors during the compiling process.

Thanks!

Yaofu Zhou

unread,
May 21, 2024, 1:58:37 PMMay 21
to tesseract-ocr
The particular solution to my gcc/g++ issue was found at https://github.com/pyenv/pyenv/issues/2862. In short, I had to remove `/opt/homebrew/opt/binutils/bin` from my `PATH` so that the system version of the utility could take over and avoid a GNU-specific issue.
Reply all
Reply to author
Forward
0 new messages