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

cmd/dist: error when GOROOT is inside a module #36701

Closed
marwan-at-work opened this issue Jan 22, 2020 · 3 comments
Closed

cmd/dist: error when GOROOT is inside a module #36701

marwan-at-work opened this issue Jan 22, 2020 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@marwan-at-work
Copy link
Contributor

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

$ go version
go version go1.14beta1 darwin/amd64

Does this issue reproduce with the latest release?

Yes, go1.14beta1

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/marwansulaiman/Library/Caches/go-build"
GOENV="/Users/marwansulaiman/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB="obstructed..."
GOOS="darwin"
GOPATH="/Users/marwansulaiman/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/marwansulaiman/marwan/uhh/go/src/go.mod"
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=/var/folders/qs/msp1047d0yz4dgtrnp5rnhdc0000gn/T/go-build178043932=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Go to golang.org/dl and download the Go1.14beta1 for MacOS. Specifically go1.14beta1.darwin-amd64.pkg

  2. git clone https://go.googlesource.com/go

  3. cd go/src

  4. ./make.bash

What did you expect to see?

Go successfully compiles

What did you see instead?

./make.bash
Building Go cmd/dist using /usr/local/go. (go1.14beta1 darwin/amd64)
Building Go toolchain1 using /usr/local/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go: github.com/DataDog/[email protected]+incompatible: no http in bootstrap go command
go tool dist: FAILED: /Users/marwansulaiman/marwan/uhh/go/pkg/tool/darwin_amd64/go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 1
@ianlancetaylor
Copy link
Contributor

Do any of the parents of the directory in which you are doing the build contain a go.mod file that refers to github.com/DataDog?

CC @bcmills @jayconrod

@marwan-at-work
Copy link
Contributor Author

marwan-at-work commented Jan 22, 2020

@ianlancetaylor bingo! 😄 😓

I accidentally had a go.mod file a few parent directories up...I wonder if make.bash can catch that by any chance?

Running go list -m -json showed that to me as well

go list -m -json
{
	"Path": "one",
	"Main": true,
	"Dir": "/Users/marwansulaiman/marwan",
	"GoMod": "/Users/marwansulaiman/marwan/go.mod",
	"GoVersion": "1.13"
}

@jayconrod jayconrod changed the title make.bash: build tries to download a DataDog module and fails cmd/dist: error when GOROOT is inside a module Jan 22, 2020
@jayconrod jayconrod added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 22, 2020
@jayconrod jayconrod added this to the Backlog milestone Jan 22, 2020
@jayconrod jayconrod self-assigned this Jan 22, 2020
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/215939 mentions this issue: cmd/dist: print error if GOROOT is inside a module

@golang golang locked and limited conversation to collaborators Jan 22, 2021
@dmitshur dmitshur modified the milestones: Backlog, Go1.14 Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants