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
x/mobile: gomobile is building for macOS 12.0, but I need 10.11 #52506
Comments
I don't know what we can do here. Starting from Go 1.15, Go requires macOS 10.12, and Go 1.15 is already not supported today. This basically means gomobile may not work for 10.11. Maybe you could roll back to the historical gomobile version to see if it can be used to build for macOS 10.11? For instance, back to this? |
macOS 10.12 is actually good enough for me (I might get away with macOS 10.14, actually). What's the latest Go version that supports 10.12? How do I find that mapping of Go version to minimum supported macOS versions? |
I found more information from the Go Release notes:
I'll try to downgrade to 1.17 or 1.16 and see if that works for me. |
@changkun the wiki you shared says "Go 1.17 and later only support macOS High Sierra 10.13 or newer". It doesn't say anything about Go 1.18, and I just realized that the Go 1.18 release notes referred to iOS, not macOS, v12. Also: "We only have builders for 10.12, 10.14, 10.15, and 11.0 as of 2021-09-28." Doesn't that mean that Go 1.18 should be outputting code for macOS 10.14 instead of macOS 12? |
@changkun I built the framework with
And still got the exact same error:
(Note that I've upgraded minimum version to macOS 10.14) |
The same issue happens with Go 1.16.15. 😩 Is the problem the gomobile version, not the go version? I can try to rollback gomobile, but that will be a bit of a pain because the old one doesn't support xcframeworks and I'll need to figure it out. I'd like to be confident that it would work. |
I guess I need to specify gomobile has the Perhaps it can be implemented similarly to what's done for iOS: https://github.com/golang/mobile/blob/fea317f4e1ac8a39cd725d852b60936f25f2b23d/cmd/gomobile/env.go#L211 |
Change https://go.dev/cl/402294 mentions this issue: |
I haven't tried CL 402294 yet. I did try setting
And only the object files with 12.0 trigger the warning:
That's progress, but I need all the object files to be 10.14. I don't know why they didn't all change. In any case, it would be great to see the CL merged. macos is already a gomobile target. I don't see the harm of being able to configure it. Alternatively, we could add an "extra cflags" flag to gomobile, that way I could just pass the |
Wait, IT WORKED! The problem was the build cache. After I did a |
@fortuna Is it worked after a cache clean or worked because of the CL? |
@changkun It worked because of the cache clean. I did not use the CL. |
Thanks, I think this is not an issue anymore. Close. |
At outline-go-tun2socks, I build a Framework that I import in an app (outline-client).
I recently upgraded Go to 1.18 and gomobile to "v0.0.0-20220407111146-e579adbbc4a2" to get support for xcframeworks. However, now gomobile outputs a Framework for macOS 12.0, but my app needs to support macOS 10.11.
How does gomobile specify the minimum macOS version, and is there a way to change it?
This is an example warning I now get when building my app:
The text was updated successfully, but these errors were encountered: