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

runtime/race: building for iOS, but linking in object file built for macOS #46931

Closed
eliasnaur opened this issue Jun 25, 2021 · 6 comments
Closed

Comments

@eliasnaur
Copy link
Contributor

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

Happens on tip on the Corellium iOS builders that have recently upgraded to iOS 14.6 while debugging #35851.

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

ios/arm64

What did you do?

$ CC=$HOME/bin/clangwrap PATH=$PATH:$HOME/bin ./all.bash

What did you expect to see?

No errors.

What did you see instead?

# runtime/race.test
/var/root/goroot/pkg/tool/ios_arm64/link: running /var/root/bin/clangwrap failed: exit status 1
ld: building for iOS, but linking in object file built for macOS, file '/tmp/go-link-1066573738/000000.o' for architecture arm64
Not signing file
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)

FAIL	runtime/race [build failed]

I'm guessing the problem is that the race runtime .syso files are hard-coded to macOS.

CC @cherrymui.

@cherrymui
Copy link
Member

Yeah, the race detector is not implemented for iOS, only for macOS. Maybe we should skip that test.

@gopherbot
Copy link

Change https://golang.org/cl/331050 mentions this issue: runtime/race: use race build tag on syso_test.go

@eliasnaur
Copy link
Contributor Author

The test fails at build which is unfortunate. Perhaps the linker should skip .syso files whose LC_VERSION_MIN_*/LC_BUILD_VERSION load commands don't match GOOS?

@gopherbot
Copy link

Change https://golang.org/cl/372218 mentions this issue: [release-branch.go1.16] runtime/race: use race build tag on syso_test.go

@cherrymui
Copy link
Member

@gopherbot please backport this to Go 1.16. This fixes a test currently failing on 1.16 branch.

@gopherbot
Copy link

Backport issue(s) opened: #50194 (for 1.16).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

gopherbot pushed a commit that referenced this issue Dec 21, 2021
All other test files in the runtime/race package have race build
tag, except syso_test.go. The test is only relevant if the race
detector is supported. So apply the build tag.

Updates #46931.
Fixes #50194.

Change-Id: Icdb94214d3821b4ccf61133412ef39b4d7cc7691
Reviewed-on: https://go-review.googlesource.com/c/go/+/331050
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Elias Naur <mail@eliasnaur.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
(cherry picked from commit ed01cea)
Reviewed-on: https://go-review.googlesource.com/c/go/+/372218
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants