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 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

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Mar 20, 2019

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

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Mar 20, 2019

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

This comment has been minimized.

Copy link
Author

@ddreyer 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 Mar 20, 2019
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.