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

gccgo: no Go files in /usr/src/golang.org/x/net/http/httpguts #41499

Closed
zhsj opened this issue Sep 19, 2020 · 4 comments
Closed

gccgo: no Go files in /usr/src/golang.org/x/net/http/httpguts #41499

zhsj opened this issue Sep 19, 2020 · 4 comments
Milestone

Comments

@zhsj
Copy link

@zhsj zhsj commented Sep 19, 2020

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

go version go1.14.6 gccgo (Debian 10.2.0-7) 10.2.0 linux/amd64

and

go version go1.15rc2 gccgo (Debian 20200809-1) 11.0.0 20200809 (experimental) [master revision fb9e3f79464:8ad857c7881:94d4f4387de8264ee289cf71f692d59ca6ac36f8] linux/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
GO111MODULE="off"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/zhsj/.cache/go-build"
GOENV="/home/zhsj/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/data/zhsj/go"
GOPRIVATE=""
GOPROXY="https://goproxy.io"
GOROOT="/usr"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/gcc/x86_64-linux-gnu/10"
GCCGO="/usr/bin/x86_64-linux-gnu-gccgo-10"
AR="ar"
CC="x86_64-linux-gnu-gcc-10"
CXX="x86_64-linux-gnu-g++-10"
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-build792107422=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

$ ls $GOPATH/src/golang.org/x/net/http/httpguts
guts.go  httplex.go  httplex_test.go

$ export GO111MODULE=off

$ cat test.go
package main

import (
        _ "golang.org/x/net/http/httpguts"
)

func main() {}

$ go run test.go

What did you expect to see?

go run test.go without error

What did you see instead?

go build golang.org/x/net/http/httpguts: no Go files in /usr/src/golang.org/x/net/http/httpguts

It happens with GOPATH, and GO111MODULE=off, and without vendor dir.

@gopherbot gopherbot added this to the Gccgo milestone Sep 19, 2020
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Sep 20, 2020

I'm not sure what is happening here, but it must have something to do with the fact that golang.org/x/net/http/httpguts is vendored into the standard library.

@zhsj
Copy link
Author

@zhsj zhsj commented Sep 20, 2020

Probably it's same as #41368

I just found someone is trying to build containerd with gollvm, then I double checked the gccgo build result. We build go packages with gccgo on ppc64 in Debian. https://buildd.debian.org/status/logs.php?pkg=containerd&arch=ppc64

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 21, 2020

Change https://golang.org/cl/256319 mentions this issue: libgo: don't put golang.org packages in zstdpkglist.go

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 21, 2020

Change https://golang.org/cl/256362 mentions this issue: gollvm: don't add golang.org packges to zstdpkglist.go

pull bot pushed a commit to Qwerty0x64/gcc that referenced this issue Sep 21, 2020
This ensures that internal/goroot.IsStandardPackage does not treat
golang.org packages as being in the standard library.

For golang/go#41368
Fixes golang/go#41499

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256319
kraj pushed a commit to kraj/gcc that referenced this issue Sep 22, 2020
This ensures that internal/goroot.IsStandardPackage does not treat
golang.org packages as being in the standard library.

For golang/go#41368
Fixes golang/go#41499

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256319
pingw33n pushed a commit to pingw33n/gollvm that referenced this issue Oct 6, 2020
When emitting zstdpkglist.go, don't include golang.org/x
packages.

This is a port to cmake of the gofrontend makefile change at
https://go-review.googlesource.com/c/gofrontend/+/256319.

Updates golang/go#41368
Updates golang/go#41499

Change-Id: Ia6e73936104deb125410ba0c5db32cf3cfe8f9f2
Reviewed-on: https://go-review.googlesource.com/c/gollvm/+/256362
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
rodgert added a commit to rodgert/gcc that referenced this issue Oct 16, 2020
This ensures that internal/goroot.IsStandardPackage does not treat
golang.org packages as being in the standard library.

For golang/go#41368
Fixes golang/go#41499

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256319
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.