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/cgo/internal/testshared: GOHOSTARCH=arm fails on go1.21rc2/arm64 with abi mismatch #61025
Comments
(attn @golang/compiler) |
If you run the test with environment varivable |
Wait, in go1.21rc2 tree there is no |
Ah, sorry for the confusion. The above error log is from the clean commit highlighted by Here is the failure log from go1.21rc2:
Full log from go1.21rc2
Same error, but from the new location for those tests. I'll test with |
Same failure mode with
|
FYI, building go1.21rc2 with cd77738 reverted works. Not to suggest this is the best approach, just to confirm. |
Which version of GNU ld are you using? |
|
Just to make sure the flag is propagated through, does |
Tested directly with |
Change https://go.dev/cl/511695 mentions this issue: |
Change https://go.dev/cl/511696 mentions this issue: |
Thanks. Not sure why the flag doesn't work. Maybe we did not pass the flag through for the test somehow... I don't have GNU ld 2.35.2 on hand. I tried an older version (2.31.1) and a newer version (2.40.50.20230611), also couldn't reproduce. And I'm also not on an ARM64 OS running ARM32 binary. I don't think the OS architecture matters here. Have you tried running it on an ARM32 OS? Anyway, I think it is okay to continue to switch to gold linker, at least for Go 1.21. Could you try if CL https://go.dev/cl/511695 helps? Also, are you actively using the shared build mode for your code, or you just run all.bash and see the failure? Thanks. |
We already skip testcarchive, testcshared, and testplugin in short mode and not on builders. The shared build mode is not more supported than the c-archive, c-shared, and plugin build modes. No need to run it everywhere by default. Updates #61025. Change-Id: I6a06e04c1a1dc78f0f85456320d128bd67277915 Reviewed-on: https://go-review.googlesource.com/c/go/+/511696 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Sorry, missed this earlier. I've been using an ARM32 distro (Rasbian) with an upgraded ARM64 kernel, I haven't tried other configurations. 1.21.0 fails similarly (as expected). I'm not using shared build mode - only building/testing the toolchain with |
Thanks. As we don't yet know if it affects real use case, we're probably not going to backport the CL yet. As you don't use shared build mode, you can ignore that test failure. Thanks. |
Thanks. FYI, the devel tree builds/tests fine with this configuration so it should be resolved in the next release (as expected). |
@mpx could you try the current Go tip with all.bash? If that works for you and you don't have specific concerns about the shared buildmode, we can close this. Thanks. |
Yes, tip works with all.bash since the tests are skipped. For anyone looking at this issue later,
|
@mpx Thanks. |
System:
All the
misc/cgo/testshared
tests now fail with go1.21rc2 when usingGOHOSTARCH=arm
on arm64:Full failure log from cd77738
The same build approach has worked for at many releases until now (eg, go1.20.5 builds and tests correctly).
Git bisect shows the failure started with the following commit for #22040:
cd77738: cmd/link: don't switch to gold on ARM Linux
Cc @ianlancetaylor
Edit: Failure log is from cd77738, not go1.21rc2. The same error occurs for go1.21rc2 but in a different location. go1.21rc2 error log below.
The text was updated successfully, but these errors were encountered: