Closed hktalent closed 2 years ago
I'm getting the same issue. Did you find a way to fix it?
Seems like cross compiling for arm64 from an amd64 pc causes this issue.
Cross platform cross compilation is a beautiful lie. Let's give it up
Ran into this issue on WSL2 when compiling the go code. The solution was to install gcc
which wasn't installed yet and the code is just silently NOT being compiled. After installing gcc everything compiled fine.
code $ cat chat.go
error
$ CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o linux_amd64 chat.go
$ brew install FiloSottile/musl-cross/musl-cross $ CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o linux_amd64 chat.go