build for windows arch fail
bijialin opened this issue · 1 comments
This text is generated based on
ISSUE_TEMPLATE.md
. The issue reporter must read and remove this block before submitting.
Summary
use windows or ubuntu can not build for windows x86
Reproducibility
Reproducibility Frequency
- 100%
Reproducible Dockerfile
FROM your-os:your-version
# Describe how to reproduce your problem
# on your environment
Otherwise, describe how to reproduce
run build cmd fail
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
error info
# ams-ocr
./ocr.go:10:6: main redeclared in this block
./main.go:8:6: other declaration of main
./ocr.go:11:22: undefined: gosseract.NewClient
./main.go:9:22: undefined: gosseract.NewClient
Environment
uname -a
Linux ubuntu-Parallels-Virtual-Platform 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
go env
GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/ubuntu/.cache/go-build'
GOENV='/home/ubuntu/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/ubuntu/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/ubuntu/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/ubuntu/GolandProjects/ams-ocr/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2247014722=/tmp/go-build -gno-record-gcc-switches'
go version
go version go1.21.3 linux/amd64
tesseract --version
tesseract 4.1.1
leptonica-1.82.0
libgif 5.1.9 : libjpeg 8d (libjpeg-turbo 2.1.1) : libpng 1.6.37 : libtiff 4.3.0 : zlib 1.2.11 : libwebp 1.2.2 : libopenjp2 2.4.0
Found AVX2
Found AVX
Found FMA
Found SSE
Found libarchive 3.6.0 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 liblz4/1.9.3 libzstd/1.4.8
Update gosseract version