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
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@zhsj
Copy link
Contributor

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 ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 20, 2020
@ianlancetaylor
Copy link
Contributor

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

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

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

@gopherbot
Copy link

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

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
@golang golang locked and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants