otiai10/gosseract

tessbridge.cpp:5:10: fatal error: 'tesseract/baseapi.h' file not found

VincentWijaya opened this issue · 2 comments

Summary

I'm using Macbook Pro M1, and already install tesseract-ocr via homebrew but when I try to run gosseract project it keep throw error like this

image

Tesseract is already running and no error in my local
image

Reproducibility

Reproducibility Frequency

  • XX%

Reproducible Dockerfile

FROM your-os:your-version
# Describe how to reproduce your problem
# on your environment

Otherwise, describe how to reproduce

  1. foo bar
  2. spam ham
  3. hoge fuga

Environment

uname -a

Darwin 192.168.100.27 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64
go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/vincent/Library/Caches/go-build"
GOENV="/Users/vincent/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/vincent/go/pkg/mod"
GONOPROXY="gitlab.com/gobang"
GONOSUMDB="gitlab.com/gobang"
GOOS="darwin"
GOPATH="/Users/vincent/go"
GOPRIVATE="gitlab.com/gobang"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/vincent/Documents/skripshit/ocr/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/99/bpkbh3jx52qcw444n5f11pvh0000gp/T/go-build3412033394=/tmp/go-build -gno-record-gcc-switches -fno-common"
go version

go version go1.18 darwin/amd64
tesseract --version

tesseract 5.2.0
 leptonica-1.82.0
  libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 2.1.4) : libpng 1.6.38 : libtiff 4.4.0 : zlib 1.2.11 : libwebp 1.2.4 : libopenjp2 2.5.0
 Found NEON
 Found libarchive 3.6.1 zlib/1.2.11 liblzma/5.2.7 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.2
 Found libcurl/7.84.0 SecureTransport (LibreSSL/3.3.6) zlib/1.2.11 nghttp2/1.47.0

Maybe try this? #234 (comment)

Also check the comment in the dockerfile about the library path: https://github.com/otiai10/gosseract/blob/main/Dockerfile

#234 (comment) This works for me in mac