Skip to content

import/path: Unable to run go program prompt invalid UTF-8 encoding #71047

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

Closed
zhuzi0125 opened this issue Dec 28, 2024 · 4 comments
Closed

import/path: Unable to run go program prompt invalid UTF-8 encoding #71047

zhuzi0125 opened this issue Dec 28, 2024 · 4 comments

Comments

@zhuzi0125
Copy link

Go version

go version go1.23.4 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/zhengzhoutan/Library/Caches/go-build'
GOENV='/Users/zhengzhoutan/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/zhengzhoutan/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/zhengzhoutan/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.4'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/zhengzhoutan/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='0'
GOMOD='/Users/zhengzhoutan/Documents/wechat-bot/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 -arch arm64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/tq/0z89psw52v1_fpjshlgk89qr0000gn/T/go-build571077288=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

zhengzhoutan@ZhengzhuiMac wechat-bot % go run main.go

internal/bytealg

go_asm.h:1:1: invalid UTF-8 encoding
go_asm.h:1: expected identifier, found "\u0a11"
asm: assembly of /usr/local/go/src/internal/bytealg/compare_arm64.s failed

internal/runtime/atomic

go_asm.h:1:1: invalid UTF-8 encoding
go_asm.h:1: expected identifier, found "\u0a11"
asm: assembly of /usr/local/go/src/internal/runtime/atomic/atomic_arm64.s failed

What did you see happen?

When running the Go program, the following error was encountered:

internal/bytealg

go_asm.h:1:1: invalid UTF-8 encoding
go_asm.h:1: expected identifier, found "\u0a11"
asm: assembly of /usr/local/go/src/internal/bytealg/compare_arm64.s failed

internal/runtime/atomic

go_asm.h:1:1: invalid UTF-8 encoding
go_asm.h:1: expected identifier, found "\u0a11"
asm: assembly of /usr/local/go/src/internal/runtime/atomic/atomic_arm64.s failed

I have verified that atomic_arm64.s is an etf-8 file, but I don't know how to solve it now

What did you expect to see?

Successfully run the go program

@zhuzi0125 zhuzi0125 changed the title import/path: issue title import/path: Unable to run go program prompt invalid UTF-8 encoding Dec 28, 2024
@seankhliao
Copy link
Member

sounds like you have a corrupted installation of go.

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2024
@zhuzi0125
Copy link
Author

sounds like you have a corrupted installation of go.

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

I have tried many installation methods but nothing works

@ianlancetaylor
Copy link
Contributor

@zhuzi0125 Please use a forum. See https://go.dev/wiki/Questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants