-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/link: run test in -linkshared mode failed #26582
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
Comments
Bug reason: The Shlib record of the pkg "expvar" should be cleaned once the expvar pkg being rebuilt. Otherwise, the "packageshlib" key word in importcfg.link file will render the "packagefile" ineffective, in which the "packagefile" indicate the path of _pkg_.a( or cached _pkg_.a) and the "packageshlib" indicate the path of it's shlib( antiquated path: pkg/linux_amd64_dynlink/libstd.so ). |
Change https://golang.org/cl/125441 mentions this issue: |
@hengwu0 - I see you closed the PR. Is this still an issue for you ? |
I tested this issue now again. It still can be reproduced with the golang1.11.5, and I don't know how to fix it. |
I can close this issue if you want to. |
We can reopen to put it up for investigation. |
Obsoleted by #47788 |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?Linux jim-PC 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jim/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jim/go"
GORACE=""
GOROOT="/home/jim/golang/go"
GOTMPDIR=""
GOTOOLDIR="/home/jim/golang/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build891088383=/tmp/go-build -gno-record-gcc-switches"
What did you do?
1、 go install -buildmode=shared std
2、 go test -short -linkshared expvar
What did you expect to see?
expvar test PASS
What did you see instead?
failure details:
expvar (testmain)
main.statictmp_0: relocation target expvar.TestNil·f not defined
main.statictmp_0: relocation target expvar.TestInt·f not defined
main.statictmp_0: relocation target expvar.TestFloat·f not defined
main.statictmp_0: relocation target expvar.TestString·f not defined
main.statictmp_0: relocation target expvar.TestMapInit·f not defined
main.statictmp_0: relocation target expvar.TestMapCounter·f not defined
main.statictmp_0: relocation target expvar.TestFunc·f not defined
main.statictmp_0: relocation target expvar.TestHandler·f not defined
main.statictmp_1: relocation target expvar.BenchmarkIntAdd·f not defined
main.statictmp_1: relocation target expvar.BenchmarkIntSet·f not defined
main.statictmp_1: relocation target expvar.BenchmarkFloatAdd·f not defined
main.statictmp_1: relocation target expvar.BenchmarkFloatSet·f not defined
main.statictmp_1: relocation target expvar.BenchmarkStringSet·f not defined
main.statictmp_1: relocation target expvar.BenchmarkMapSet·f not defined
main.statictmp_1: relocation target expvar.BenchmarkMapSetDifferent·f not defined
main.statictmp_1: relocation target expvar.BenchmarkMapSetString·f not defined
main.statictmp_1: relocation target expvar.BenchmarkMapAddSame·f not defined
main.statictmp_1: relocation target expvar.BenchmarkMapAddDifferent·f not defined
main.statictmp_1: relocation target expvar.BenchmarkMapAddSameSteadyState·f not defined
main.statictmp_1: relocation target expvar.BenchmarkMapAddDifferentSteadyState·f not defined
main.statictmp_1: relocation target expvar.BenchmarkRealworldExpvarUsage·f not defined
/home/jim/golang/go/pkg/tool/linux_amd64/link: too many errors
FAIL expvar [build failed]
The text was updated successfully, but these errors were encountered: