cmd/link: unresolved inter-package jump message on ppc64le building godoc #19764
Comments
I'm not sure why this happens: why golang.org/x/tools/go/ssa.(*UnOp).Type is considered defined in package golang.org/x/tools/godoc/analysis? I'll look into how this went wrong. |
The failure starts at commit 295307a (CL https://go-review.googlesource.com/c/38139/). It now makes a direct call to We probably need to special-case wrappers in the trampoline pass. I'll make a fix. |
CL https://golang.org/cl/39150 mentions this issue. |
Dupok symbols may be defined in multiple packages. Its associated package is chosen sort of arbitrarily (the first containing package that the linker loads). Canonicalize its package to the package with which it will be laid down in text, which is the first package in dependency order that defines the symbol. So later passes (for example, trampoline insertion pass) know that the dupok symbol is laid down along with the package. Fixes golang#19764. Change-Id: I7cbc7474ff3016d5069c8b7be04af934abab8bc3 Reviewed-on: https://go-review.googlesource.com/39150 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: David Chase <drchase@google.com>
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go tip
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04 ppc64le
What did you do?
Built golang from master, then tried to build the latest from golang.org/x/tools/cmd/godoc
What did you expect to see?
Successful build
What did you see instead?
At the link step for the build of a.out:
golang.org/x/tools/go/ssa.makeWrapper: unresolved inter-package jump to golang.org/x/tools/go/ssa.(*UnOp).Type(golang.org/x/tools/godoc/analysis)
I tried the following to see if it was related to the recent change to plt stubs:
go version devel +43afcb5 Wed Mar 15 04:27:49 2017 +0000 linux/ppc64le
The error message is generated in the trampoline function in data.go. @cherrymui could you look at this because I'm not sure of the reason for this error message or why it could fail in this situation.
go get -u -a -x -work golang.org/x/tools/cmd/godoc
.....
/home/boger/golang/base/go/pkg/tool/linux_ppc64le/compile -o $WORK/golang.org/x/tools/cmd/godoc.a -trimpath $WORK -p main -complete -buildid 4cfbc09d338fcdd7fcdcc7de9d716e0c693792f7 -D _/home/boger/gocode/src/golang.org/x/tools/cmd/godoc -I $WORK -I /home/boger/gocode/pkg/linux_ppc64le -pack ./blog.go ./codewalk.go ./dl.go ./doc.go ./handlers.go ./index.go ./main.go ./play.go ./remotesearch.go ./x.go
cd .
/home/boger/golang/base/go/pkg/tool/linux_ppc64le/link -o $WORK/golang.org/x/tools/cmd/godoc/_obj/exe/a.out -L $WORK -L /home/boger/gocode/pkg/linux_ppc64le -extld=gcc -buildmode=exe -buildid=4cfbc09d338fcdd7fcdcc7de9d716e0c693792f7 $WORK/golang.org/x/tools/cmd/godoc.a
golang.org/x/tools/cmd/godoc
golang.org/x/tools/go/ssa.makeWrapper: unresolved inter-package jump to golang.org/x/tools/go/ssa.(*UnOp).Type(golang.org/x/tools/godoc/analysis)
The text was updated successfully, but these errors were encountered: