-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/link: fingerprint mismatch: after adding default.pgo #61376
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
I tried replicating this following the provided steps and it happens for me on tip as well. The fingerprint mismatch message relates to the symbol |
Okay I was able to bisect this testing with -pgo=auto and found it started failing after this commit 74502e9bb4. |
cc @cherrymui |
cc @golang/compiler |
Thanks for report. I can reproduce as well. Some observations: in my run of
This contains BOTH b003 and b141, along with many other duplicates, which can't be right... If I do
The TestImports contains the non-PGO version of the packages. These probably should be fixed. I'll look into it. |
Change https://go.dev/cl/510835 mentions this issue: |
Change https://go.dev/cl/511698 mentions this issue: |
When running "go test" including a main package which has a PGO profile, we currently build the package being tested and its dependencies with PGO, but we failed to attach the profile to test-only dependencies. If a package is (transitively) imported by both the package being tested and the test, the PGO version and the non-PGO version of the package are both linked into the binary, causing link-time error. This CL fixes this by attaching the PGO profile to dependencies of the test. Fixes #61376. Change-Id: I2559db9843c4cdab596b31e2025d8475ffbf58ec Reviewed-on: https://go-review.googlesource.com/c/go/+/510835 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit af0609b) Reviewed-on: https://go-review.googlesource.com/c/go/+/511698
When running "go test" including a main package which has a PGO profile, we currently build the package being tested and its dependencies with PGO, but we failed to attach the profile to test-only dependencies. If a package is (transitively) imported by both the package being tested and the test, the PGO version and the non-PGO version of the package are both linked into the binary, causing link-time error. This CL fixes this by attaching the PGO profile to dependencies of the test. Fixes golang#61376. Change-Id: I2559db9843c4cdab596b31e2025d8475ffbf58ec Reviewed-on: https://go-review.googlesource.com/c/go/+/510835 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit af0609b) Reviewed-on: https://go-review.googlesource.com/c/go/+/511698
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
git clone https://gitee.com/u-language/u-language.git test
cd test
cd pkg
su
go test ./...
What did you expect to see?
Normal operation test.
What did you see instead?
output
# gitee.com/u-language/u-language/pkg.test
/home/qiu-lai-dong-feng/.go/current/pkg/tool/linux_amd64/link: fingerprint mismatch: os has d62759c2b920f031, import from gitee.com/u-language/u-language/pkg expecting 18ac6ddfd6f53c08
? gitee.com/u-language/u-language/pkg/astdata [no test files]
FAIL gitee.com/u-language/u-language/pkg [build failed]
ok gitee.com/u-language/u-language/pkg/ast 0.037s
ok gitee.com/u-language/u-language/pkg/cast 0.006s
? gitee.com/u-language/u-language/pkg/config [no test files]
ok gitee.com/u-language/u-language/pkg/check 0.014s
? gitee.com/u-language/u-language/pkg/enum [no test files]
? gitee.com/u-language/u-language/pkg/errcode [no test files]
ok gitee.com/u-language/u-language/pkg/data 0.029s
? gitee.com/u-language/u-language/pkg/format [no test files]
? gitee.com/u-language/u-language/pkg/internal/debug [no test files]
? gitee.com/u-language/u-language/pkg/internal/errutil [no test files]
ok gitee.com/u-language/u-language/pkg/fasm/amd64 0.007s
? gitee.com/u-language/u-language/pkg/internal/parser [no test files]
? gitee.com/u-language/u-language/pkg/internal/teco [no test files]
? gitee.com/u-language/u-language/pkg/internal/time [no test files]
? gitee.com/u-language/u-language/pkg/internal/utils [no test files]
ok gitee.com/u-language/u-language/pkg/internal/math/big 0.011s [no tests to run]
ok gitee.com/u-language/u-language/pkg/ir 0.008s
? gitee.com/u-language/u-language/pkg/parser [no test files]
ok gitee.com/u-language/u-language/pkg/lex 0.013s
The text was updated successfully, but these errors were encountered: