Hi, We have the same error, did you end up finding a solution? On Wednesday, February 16, 2022 at 12:36:31 PM UTC+2 Oskar Gargas wrote:
> Hello, > > I try to compile Tesseract for macOS on arm64. I use the following > commands: > > ``` > export LIBS="-lz -lpng -ljpeg -ltiff" > export > SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk" > export > CFLAGS="-I/Users/---/Developer/---/libtesseract/tesseract-5.0.1/arm-apple-darwin64/ > > -arch arm64 -pipe -no-cpp-precomp -isysroot $SDKROOT > -mios-simulator-version-min=11.0 -O2 -fembed-bitcode" > export CPPFLAGS=$CFLAGS > export > CXXFLAGS="-I/Users/---/Developer/---/libtesseract/tesseract-5.0.1/arm-apple-darwin64/ > > -arch arm64 -pipe -no-cpp-precomp -isysroot $SDKROOT > -mios-simulator-version-min=11.0 -O2 -Wno-deprecated-register" > export LDFLAGS="-L$SDKROOT/usr/lib/ > -L/Users/---/Developer/---/libtesseract/simulator/arm-apple-darwin64 > -L/Users/---/Developer/---/libtesseract/leptonica-1.82.0/arm-apple-darwin64/src/.libs" > export > LIBLEPT_HEADERSDIR=/Users/---/Developer/---/libtesseract/tesseract-5.0.1/arm-apple-darwin64/ > export > PKG_CONFIG_PATH=/Users/---/Developer/---/libtesseract/leptonica-1.82.0/arm-apple-darwin64/ > export CXX="/usr/bin/clang++ --target=arm-apple-darwin64" > export CXX_FOR_BUILD="/usr/bin/clang++ --target=arm-apple-darwin64" > export CC="/usr/bin/clang --target=arm-apple-darwin64" > mkdir -p > /Users/---/Developer/---/libtesseract/tesseract-5.0.1/arm-apple-darwin64 > cd /Users/---/Developer/---/libtesseract/tesseract-5.0.1/arm-apple-darwin64 > ln -s /Users/---/Developer/---/libtesseract/leptonica-1.82.0/src/ leptonica > ../configure --host=arm-apple-darwin64 --prefix=`pwd` --enable-shared=no > --disable-graphics --disable-legacy --without-curl > ``` > > In configure output I get the following lines (can share full output if > its usefull for somebody): > ``` > checking whether C++ compiler accepts -mfpu=neon... no > checking whether C++ compiler accepts -fopenmp-simd... yes > checking for /usr/bin/clang++ --target=arm-apple-darwin64 option to > support OpenMP... unsupported > checking if -framework Accelerate works... yes > ``` > > Then compilation goes ok but I get fail on linking. Is a problem with > `Accelerate` not being linked correctly? Something else? Any help will be > appreciated. > ``` > ... > CXX src/lstm/libtesseract_lstm_la-series.lo > CXX src/lstm/libtesseract_lstm_la-stridemap.lo > CXX src/lstm/libtesseract_lstm_la-tfnetwork.lo > CXX src/lstm/libtesseract_lstm_la-weightmatrix.lo > CXXLD libtesseract_native.la > CXXLD libtesseract_ccutil.la > CXXLD libtesseract_lstm.la > CXXLD libtesseract.la > CXXLD tesseract > Undefined symbols for architecture arm64: > "tesseract::IntSimdMatrix::intSimdMatrixNEON", referenced from: > tesseract::SIMDDetect::SIMDDetect() in > libtesseract.a(libtesseract_la-simddetect.o) > tesseract::SIMDDetect::Update() in > libtesseract.a(libtesseract_la-simddetect.o) > "tesseract::DotProductNEON(float const*, float const*, int)", referenced > from: > tesseract::SIMDDetect::SIMDDetect() in > libtesseract.a(libtesseract_la-simddetect.o) > tesseract::SIMDDetect::Update() in > libtesseract.a(libtesseract_la-simddetect.o) > ld: symbol(s) not found for architecture arm64 > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > make[1]: *** [tesseract] Error 1 > make: *** [all-recursive] Error 1 > ``` > > FYI: This script worked great for 4.1.3 but it's time to upgrade > -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/c3c4cbd5-d74e-43d7-8cc0-83079676e8edn%40googlegroups.com.