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

1.13beta1: can't load package: package -trimpath: #32800

Closed
mattheusv opened this issue Jun 27, 2019 · 6 comments
Closed

1.13beta1: can't load package: package -trimpath: #32800

mattheusv opened this issue Jun 27, 2019 · 6 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@mattheusv
Copy link

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

$ go version

go1.13beta1 linux/amd64

Does this issue reproduce with the latest release?

Latest beta version

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

go env Output
$ go env

GO111MODULE="auto"
GOARCH="amd64"
GOBIN="/home/matheus/go/bin"
GOCACHE="/home/matheus/.cache/go-build"
GOENV="/home/matheus/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/matheus/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/matheus/sdk/go1.13beta1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/matheus/sdk/go1.13beta1/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/matheus/dev/go/test-go1.13beta1/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build630365835=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Simple hello world

package main

import "fmt"

func main() {
	fmt.Println("Hello go 1.13 :D")	
}

What did you expect to see?

Build program

What did you see instead?

error:
can't load package: package -trimpath: unknown import path "-trimpath": malformed module path "-trimpath": leading dash

@dmitshur
Copy link
Contributor

dmitshur commented Jun 27, 2019

Thanks for the report.

Your go env output mentions:

GOMOD="/home/matheus/dev/go/test-go1.13beta1/go.mod"

Can you please include the contents of that go.mod file? Also, what was the exact command you ran to build the program?

I can't reproduce the issue with just the main.go file you provided but without a go.mod, and I suspect it's very relevant.

@dmitshur dmitshur added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jun 27, 2019
@ianlancetaylor
Copy link
Contributor

I think there is some confusion in your GOROOT. Did you unpack 1.13beta1 into a clean, empty, directory?

@mattheusv
Copy link
Author

My go.mod file

module github.com/msalcantara/test-go1.13beta1

go 1.13

@mattheusv
Copy link
Author

I'm follow the next steps to install go1.13beta1

  • $ go get golang.org/dl/go1.13beta1

  • $ go1.13beta1 download

@dmitshur
Copy link
Contributor

dmitshur commented Sep 4, 2019

@msAlcantara That should be successful. Can you try again with a newer version (e.g., go1.13) and let us know if it works?

Can you also answer this question please:

what was the exact command you ran to build the program?

@agnivade agnivade added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Sep 4, 2019
@mattheusv
Copy link
Author

All works good now with new go1.13 :D

@golang golang locked and limited conversation to collaborators Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants