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/net/http2: errors when building with gccgo #30941

Closed
ddreyer opened this issue Mar 20, 2019 · 3 comments
Closed

x/net/http2: errors when building with gccgo #30941

ddreyer opened this issue Mar 20, 2019 · 3 comments
Milestone

Comments

@ddreyer
Copy link

ddreyer commented Mar 20, 2019

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

$ go version
go version go1.12.1 linux/amd64

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
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/sgx/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/sgx/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build844707027=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I tried to build the http2 package with gccgo by running the command go build -compiler gccgo golang.org/x/net/http2.

What did you expect to see?

I expected the build to succeed.

What did you see instead?

The following error occurs:

# golang.org/x/net/http2
./go111.go:15:30: error: reference to undefined field or method ‘WroteHeaderField’
  return trace != nil && trace.WroteHeaderField != nil
                              ^
./go111.go:19:26: error: reference to undefined field or method ‘WroteHeaderField’
  if trace != nil && trace.WroteHeaderField != nil {
                          ^
./go111.go:20:8: error: reference to undefined field or method ‘WroteHeaderField’
   trace.WroteHeaderField(k, []string{v})
        ^
./go111.go:26:15: error: reference to undefined field or method ‘Got1xxResponse’
   return trace.Got1xxResponse
               ^
@gopherbot gopherbot added this to the Gccgo milestone Mar 20, 2019
@ianlancetaylor
Copy link
Contributor

Which version of gccgo are you using?

@ianlancetaylor ianlancetaylor changed the title x/net/http2 building with gccgo x/net/http2: errors when building with gccgo Mar 20, 2019
@ianlancetaylor
Copy link
Contributor

I suspect that the problem is that the go tool is using the gc release version, but you are using a version of gccgo that is at a different release version.

Have you tried building with the go tool that comes with gccgo instead?

@ddreyer
Copy link
Author

ddreyer commented Mar 20, 2019

Resolved. Didn't realize there was a go tool that came with gccgo. Will close this now, thanks!

@ddreyer ddreyer closed this as completed Mar 20, 2019
@golang golang locked and limited conversation to collaborators Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants