I expected the command to create xcframework. It works when I switch to Xcode 13.4.1 (13F100) developer tools.
What did you see instead?
When using Xcode 14 (14A5228q) developer tools, the command fails with the following error:
$ gomobile bind -target ios gitlab.com/elixxir/client/bindings
gomobile: ios/arm64: go build -buildmode=c-archive -o /var/folders/bh/t75dvhh939lbvnsq6n60mgtr0000gn/T/gomobile-work-1445876485/bindings-ios-arm64.a ./gobind failed: exit status 2
cgo: C compiler "2022-06-09" not found: exec: "2022-06-09": executable file not found in $PATH
The text was updated successfully, but these errors were encountered:
I think gomobile picks up the C compiler from running xcrun --find clang, and that command on darwin/arm64 can sometimes contains bogus logging output starting with the date and time. That probably confuses gomobile.
Could you try running that command again, maybe twice?
gomobile should probably be more resilient on that. Maybe it should only use stdout of xcrun, not stderr. cc @hyangah @golang/ios
I tried to run the command several times yesterday, but the result was always the same. I'm unfamiliar with golang, but the error message "exec: 2022-06-09 not found" seemed suspicious. I thought it could be some kind of parsing issue.
I'm not sure if the problem is caused by parsing the result of xcrun --find clang, which gives the following output:
However, I rerun the command today, and... it works! Still, I believe there is a bug hiding somewhere, as the problem was probably caused by the given date when the command was run (2022-06-09). Thankfully today (2022-06-10) it works fine :-)
On my mac M1 machine, it sometimes print messages like
2022-06-07 22:25:25.471 xcodebuild[8405:27734] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-07 22:25:25.471 xcodebuild[8405:27734] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
It doesn't always print that. In my experience it is more likely to print if it is the first time to use such commands in a while. And the second and subsequent runs just behave normally, without the extra output.
Maybe it will print if you restart the machine and run that command immediately.