Skip to content
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

x/tools/gopls: error with cgo definitions #43473

Open
shuxiao9058 opened this issue Jan 3, 2021 · 3 comments
Open

x/tools/gopls: error with cgo definitions #43473

shuxiao9058 opened this issue Jan 3, 2021 · 3 comments

Comments

@shuxiao9058
Copy link

@shuxiao9058 shuxiao9058 commented Jan 3, 2021

What version of Go are you using (go version)?

$ go version
go version go1.15.6 linux/386

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GO111MODULE=""
GOARCH="386"
GOBIN=""
GOCACHE="/home/jy/.cache/go-build"
GOENV="/home/jy/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/golang/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/golang/gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/golang/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/golang/go/pkg/tool/linux_386"
GCCGO="gccgo"
GO386="sse2"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g"
CGO_FFLAGS="-g"
CGO_LDFLAGS="-g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build579898133=/tmp/go-build"

What did you do?

"message": "char not declared by package C",
"source": "compiler",
"severity": 1,
"range": {
"end": {
"character": 15,
"line": 23
},
"start": {
"character": 11,
"line": 23
}
}

What did you expect to see?

What did you see instead?

@gopherbot gopherbot added the gopls label Jan 3, 2021
@stamblerre stamblerre added this to the gopls/v1.0.0 milestone Jan 5, 2021
@stamblerre stamblerre changed the title how to set gopls ignore cgo packages, since error happened x/tools/gopls: error with cgo definitions Jan 5, 2021
@stamblerre stamblerre added the Tools label Jan 5, 2021
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jan 5, 2021

Can you please share your gopls logs? Information on how to capture them can be found here.

@shuxiao9058
Copy link
Author

@shuxiao9058 shuxiao9058 commented Jan 12, 2021

This is too abnormal, it turned to be work well with some other small projects(with cgo).

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jan 12, 2021

Glad to hear it's working well with other projects. Is it OK to close this issue?

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.