beyondnet icon indicating copy to clipboard operation
beyondnet copied to clipboard

Builder fails with Xcode 15 (worked around for now)

Open lemonmojo opened this issue 2 years ago • 7 comments

Xcode 15 seems to have issues with symlinks when creating XCFrameworks.

The fix likely involves passing it absolute/resolved paths.

lemonmojo avatar Sep 25 '23 09:09 lemonmojo

Workaround is now in place until an Xcode update which fixes the issue is out.

lemonmojo avatar Sep 25 '23 13:09 lemonmojo

We could further improve the code by resolving symlinks on macOS using [NSString stringByResolvingSymlinksInPath].

For reference, here's a quick POC showing how to call ObjC from C#: https://github.com/lemonmojo/SimpleDotNETObjCInterop

There's now a string extension in the repo called ResolveSymlinks_AppleOnly which resolves symlinks using NSString APIs. It's not in use yet though.

lemonmojo avatar Sep 25 '23 13:09 lemonmojo

Another problem here is that .NET 8 RC1's NativeAOT doesn't play nice with Xcode 15's new linker. See https://github.com/dotnet/runtime/issues/92491.

As mentioned here, we worked around this by adding -ld_classic as an additional linker flag in the generated csproj for now.

We hope to be able to remove this once .NET 8 RC2 is out.

lemonmojo avatar Sep 25 '23 13:09 lemonmojo

-ld_classic is not required with RC2 anymore so the workaround has been removed in https://github.com/royalapplications/beyondnet/commit/e1336106d4a7ba6df72473f79cfc9d5347bc1cdb.

lemonmojo avatar Oct 12 '23 11:10 lemonmojo

I haven't yet tested if Xcode 15.1 Beta fixes the symlink issue with xcodebuild. I'll check when 15.1 is released.

lemonmojo avatar Oct 12 '23 11:10 lemonmojo

Still not fixed in Xcode 15.1

lemonmojo avatar Dec 15 '23 11:12 lemonmojo

Note to self: Test again with Xcode 16 Beta

lemonmojo avatar Jul 01 '24 20:07 lemonmojo