no leptonica/allheaders.h
duodu021 opened this issue · 4 comments
duodu021 commented
Summary
go: downloading github.com/otiai10/gosseract v0.0.0-20191223175935-1da940ed3a18
github.com/otiai10/gosseract
tessbridge.cpp:5:10: fatal error: leptonica/allheaders.h: No such file or directory
/#include <leptonica/allheaders.h>
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Reproducibility Frequency
- 100%
Environment
win11
go 1.17
uname -a
win11 no Uname
go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\81628\AppData\Local\go-build
set GOENV=C:\Users\81628\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\81628\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\81628\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.2
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\81628\AppData\Local\Temp\go-build2576307336=/tmp/go-build -gno-record-gcc-switches
go version
go version go1.17.2 windows/amd64
tesseract --version
tesseract v5.0.0.20211201
leptonica-1.78.0
libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.3) : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.11 : libwebp 0.6.1 : libopenjp2 2.3.0
Found AVX2
Found AVX
Found FMA
Found SSE4.1
Found libarchive 3.5.0 zlib/1.2.11 liblzma/5.2.3 bz2lib/1.0.6 liblz4/1.7.5 libzstd/1.4.5
Found libcurl/7.77.0-DEV Schannel zlib/1.2.11 zstd/1.4.5 libidn2/2.0.4 nghttp2/1.31.0
oxycoder commented
Try add leptonica path to your go get command:
example for mac:
brew install tesseract
CGO_CXXFLAGS="-I/usr/local/Cellar/leptonica/1.82.0/include -I/usr/local/Cellar/tesseract/4.1.3/include" go get -t github.com/otiai10/gosseract/v2
5HT2 commented
libtesseract-dev
in addition to tesseract-ocr
fixes this (Ubuntu 20.04). I already had libleptonica-dev
and got the error