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/link: -pluginpath seems to no longer work with go1.13 #34143

Open
e-nikolov opened this issue Sep 6, 2019 · 0 comments

Comments

@e-nikolov
Copy link

commented Sep 6, 2019

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

$ go version
go version go1.13 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/enikolov/.cache/go-build"
GOENV="/home/enikolov/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY="bitbucket.org/unchain/*"
GONOSUMDB="bitbucket.org/unchain/*"
GOOS="linux"
GOPATH="/home/enikolov/go"
GOPRIVATE="bitbucket.org/unchain/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/enikolov/.gvm/gos/go1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/enikolov/.gvm/gos/go1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
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-build411225951=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go build -ldflags "-pluginpath=custom/path" -buildmode=plugin ./path/to/plugin

With go1.13 this seems to no longer map the packages to the custom path.

What did you expect to see?

I have the variable Version in my main package

With go 1.12 after running the strings utility on the produced binary, I would see this somewhere in the output:

custom/path.Version

What did you see instead?

With go1.13 I now see this instead:

path/to/plugin.Version

Could this be related to go modules?

@ianlancetaylor ianlancetaylor changed the title -pluginpath seems to no longer work with go1.13 cmd/link: -pluginpath seems to no longer work with go1.13 Sep 6, 2019

@ianlancetaylor ianlancetaylor added this to the Go1.14 milestone Sep 6, 2019

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