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
msAlcantara opened this issue Jun 27, 2019 · 6 comments

Comments

@msAlcantara
Copy link

commented Jun 27, 2019

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

This comment has been minimized.

Copy link
Member

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.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2019

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

@msAlcantara

This comment has been minimized.

Copy link
Author

commented Jun 28, 2019

My go.mod file

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

go 1.13
@msAlcantara

This comment has been minimized.

Copy link
Author

commented Jun 28, 2019

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

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

  • $ go1.13beta1 download

@dmitshur

This comment has been minimized.

Copy link
Member

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?

@msAlcantara

This comment has been minimized.

Copy link
Author

commented Sep 5, 2019

All works good now with new go1.13 :D

@msAlcantara msAlcantara closed this Sep 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.