-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Asahi Linux] undefined: gosseract.NewClient when CGO_ENABLED=0 #311
Comments
This works for me
|
Hi, I'm pretty sure @isrealbm is trying to run this on Asahi Linux on a Macbook with ARM, looking at the GOARCH value (correct me if I'm wrong). Edit: It says Darwin, which I think means Mac OS. Sorry for the mistake. I can reproduce the issue myself, but I'm not sure if this is related to this library or due to the missing packages on Asahi Linux. Which exact packages are needed for Fedora? I have the following installed on Ubuntu 24.04 and the library is working great:
On Asahi Linux I have installed the following packages which leads to the error mentioned in the issue:
|
Still I don't have an env to test for Asahi Linux, though, for Fedora, this is the working answer |
For Asahi, I'll work on it |
@ayanel-ci test |
Could you try and build within a podman-machine Linux VM? It appears as though this is an attempt to build for Linux on macOS |
Hello guys, sorry for a busy week. Yes, I have tried to build an application on the ARM64 chip (Apple silicon) to deploy to a VM running with AMD64 CPU. I think the problem happened by this library itself. I tried to install Tesseract directly in that VM and use other lib then everything was work as expected.
|
Hey there! I actually have the similar issue where i cannot compile my project with I have also testing this with ubuntu:24.04 and alpine base image in docker and both gave the same result. Working Docker Example With Dynamically Linked BuildFROM alpine:latest
RUN apk add --no-cache \
go \
tesseract-ocr \
tesseract-ocr-dev \
leptonica-dev \
g++ \
tesseract-ocr-data-eng \
ffmpeg \
&& rm -rf /var/cache/apk/*
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN GOOS=linux GOARCH=amd64 go build -o /bin/subtle/subtle ./cmd/subtle
WORKDIR /media
CMD ["/bin/subtle/subtle"] Non Working Docker Example with Statically Linked BuildFROM alpine:latest
RUN apk add --no-cache \
go \
tesseract-ocr \
tesseract-ocr-dev \
leptonica-dev \
g++ \
tesseract-ocr-data-eng \
ffmpeg \
&& rm -rf /var/cache/apk/*
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/subtle/subtle ./cmd/subtle
WORKDIR /media
CMD ["/bin/subtle/subtle"] Errorundefined: gosseract.Client
undefined: gosseract.NewClient The above error is made during the building of the application with Please let me know if there are any more information you would need. |
I have made an error in my previous comment which should be clarified. |
Summary
go build failed:
undefined: gosseract.NewClient
when CGO_ENABLED=0If I change CGO_ENABLED to CGO_ENABLED=1 then will get other errors:
Reproducibility
Reproducibility Frequency
Environment
The text was updated successfully, but these errors were encountered: