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

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

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

shuxiao9058 opened this issue Jan 3, 2021 · 3 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@shuxiao9058
Copy link

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 Issues related to the Go language server, 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 This label describes issues relating to any tools in the x/tools repository. label Jan 5, 2021
@stamblerre
Copy link
Contributor

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

@shuxiao9058
Copy link
Author

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

@stamblerre
Copy link
Contributor

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

@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 12, 2021
@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Jan 25, 2021
@golang golang locked and limited conversation to collaborators Jan 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants