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

gollvm: cmd/go: httpguts, hpack, idna are not using a known version control system #41368

Open
advancedwebdeveloper opened this issue Sep 13, 2020 · 16 comments

Comments

@advancedwebdeveloper
Copy link

@advancedwebdeveloper advancedwebdeveloper commented Sep 13, 2020

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

$ go version
go version go1.15rc2 gollvm LLVM 12.0.0git 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

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/oceanfish81/.cache/go-build"
GOENV="/home/oceanfish81/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oceanfish81/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oceanfish81/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/tools"
GCCGO="/usr/local/bin/llvm-goc"
AR="ar"
CC="/usr/bin/clang"
CXX="/usr/bin/clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build842983669=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

I was trying to get StreamSets Data Collector Edge working.

$ go get -u github.com/streamsets/datacollector-edge

What did you expect to see?

At least - no warning or errors.

What did you see instead?

package golang.org/x/net/http/httpguts: directory "/usr/local/src/golang.org/x/net/http/httpguts" is not using a known version control system
package golang.org/x/net/http2/hpack: directory "/usr/local/src/golang.org/x/net/http2/hpack" is not using a known version control system
package golang.org/x/net/idna: directory "/usr/local/src/golang.org/x/net/idna" is not using a known version control system

@bradfitz, @FiloSottile , @alanbato, @mpvl - any suggestions?

Ivan

@alanbato
Copy link

@alanbato alanbato commented Sep 13, 2020

None at all, I don't even use go 🤔

Maybe you meant to tag someone else? 😅

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Sep 13, 2020

CC @thanm @cherrymui

Do you have any replace directives in your go.mod file?

@ianlancetaylor ianlancetaylor changed the title [gollvm] httpguts, hpack, idna are not using a known version control system gollvm: cmd/go: httpguts, hpack, idna are not using a known version control system Sep 13, 2020
@ianlancetaylor ianlancetaylor added this to the gollvm milestone Sep 13, 2020
@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Sep 14, 2020

CC @thanm @cherrymui

Do you have any replace directives in your go.mod file?
@ianlancetaylor , which file are you referring here?

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Sep 14, 2020

https://github.com/streamsets/datacollector-edge project does not contain any go.mod file.

@thanm
Copy link
Member

@thanm thanm commented Sep 14, 2020

I took a look at this -- I can reproduce, but I don't have any insight into what's going wrong. I don't see any replace directives at least as far as I can tell.

@jayconrod
Copy link
Contributor

@jayconrod jayconrod commented Sep 14, 2020

I don't think this is related to modules. This error would be reported in GOPATH mode if a repository root path resolves to a directory in $GOPATH/src but that directory doesn't actually contain a repository subdirectory (like .git).

Does the directory $GOPATH/src/golang.org/x/net/.git exist? What about $GOPATH/src/golang.org/x/net/http/httpguts/.git?

@thanm
Copy link
Member

@thanm thanm commented Sep 14, 2020

Does the directory $GOPATH/src/golang.org/x/net/.git exist?

Yes, $GOPATH/src/golang.org/x/net/.git exists.

What about $GOPATH/src/golang.org/x/net/http/httpguts/.git?

No, that does not exist.

@bcmills
Copy link
Member

@bcmills bcmills commented Sep 14, 2020

Those three packages are vendored into the standard library:

golang.org/x/net/http/httpguts
golang.org/x/net/http/httpproxy
golang.org/x/net/http2/hpack
golang.org/x/net/idna

So probably this has something to do with standard-library vendoring in GOPATH mode, but I'm not sure what.

@bcmills
Copy link
Member

@bcmills bcmills commented Sep 14, 2020

Yeah, that go env output indicates GOROOT="/usr/local", so the path /usr/local/src/golang.org/x/net/http/httpguts would be in GOROOT/src, but it's presumably not in GOROOT/src because the correct path there (in Go 1.15rc2) would be /usr/local/src/vendor/golang.org/x/net/http/httpguts.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Sep 14, 2020

@bcmills , so what should be patched?

@bcmills
Copy link
Member

@bcmills bcmills commented Sep 14, 2020

@advancedwebdeveloper, that depends on what the root cause turns out to be. 😅

Could you run ls -d /usr/local/src/golang.org and ls -d /usr/local/src/vendor/golang.org and post the results?

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Sep 15, 2020

I don't think this is related to modules. This error would be reported in GOPATH mode if a repository root path resolves to a directory in $GOPATH/src but that directory doesn't actually contain a repository subdirectory (like .git).

Does the directory $GOPATH/src/golang.org/x/net/.git exist?

@jayconrod , $GOPATH is not defined (for some reason) - and that a "by default" state, since I have installed compiled "release" build of gollvm.
Better ask @thanm and @cherrymui , what is the problem with $GOPATH, during the installation process.

But a de-facto directory does exist:

~$ file $GOPATH/src/golang.org/x/net/.git
/src/golang.org/x/net/.git: cannot open `/src/golang.org/x/net/.git' (No such file or directory)
~$ file go/src/golang.org/x/net/.git
go/src/golang.org/x/net/.git: directory
~$ file go/src/golang.org/x/net/.git/
go/src/golang.org/x/net/.git/: directory
~$ ls go/src/golang.org/x/net/.git/
FETCH_HEAD HEAD ORIG_HEAD branches config description hooks index info logs objects packed-refs refs
$ cat go/src/golang.org/x/net/.git/HEAD
ref: refs/heads/master

What about $GOPATH/src/golang.org/x/net/http/httpguts/.git?

Well, in case of this file - neither de-facto nor relative path/fiel exists:

~$ file $GOPATH/src/golang.org/x/net/http/httpguts/.git
/src/golang.org/x/net/http/httpguts/.git: cannot open /src/golang.org/x/net/http/httpguts/.git' (No such file or directory) ~$ file go/src/golang.org/x/net/http/httpguts/.git go/src/golang.org/x/net/http/httpguts/.git: cannot open go/src/golang.org/x/net/http/httpguts/.git' (No such file or directory)
$ ls go/src/golang.org/x/net/http/httpguts/
guts.go httplex.go httplex_test.go
$ ls -a go/src/golang.org/x/net/http/httpguts/
. .. guts.go httplex.go httplex_test.go

Ivan

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Sep 15, 2020

Yeah, that go env output indicates GOROOT="/usr/local", so the path /usr/local/src/golang.org/x/net/http/httpguts would be in GOROOT/src, but it's presumably not in GOROOT/src because the correct path there (in Go 1.15rc2) would be /usr/local/src/vendor/golang.org/x/net/http/httpguts.

@bcmills ,
it is hirely undesirable to use system sub-folders - I would be glad to stick to my directories inside the home folder.
I can check by specifying $GOPATH (so it would point to "~/go") and report.
Ivan

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Sep 15, 2020

@advancedwebdeveloper, that depends on what the root cause turns out to be. 😅

Could you run ls -d /usr/local/src/golang.org and ls -d /usr/local/src/vendor/golang.org and post the results?

Surely I am able to do that:

$ ls -d /usr/local/src/golang.org
ls: cannot access '/usr/local/src/golang.org': No such file or directory

dir. does not exist

$ ls -d /usr/local/src/vendor/golang.org
ls: cannot access '/usr/local/src/vendor/golang.org': No such file or directory

same here.

Ivan

@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

gopherbot pushed a commit to golang/gofrontend 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

Change-Id: I58abc84c6c8544b3d7f513bda7a5e5a63d0a9937
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256319
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
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
7 participants
You can’t perform that action at this time.