-
-
Notifications
You must be signed in to change notification settings - Fork 76
Apple: Update to Apple 26.0 SDKs; patch llvm-project/release/21; add swift toolchain #155
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
Conversation
18acd40 to
0144815
Compare
akien-mga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! I haven't had time to test yet.
| echo "=== Copying SDK using tar to preserve special files ===" | ||
| cd "$sdk_dir" | ||
| tar -cf - "$sdk_name" | (cd "/tmp" && tar -xf -) | ||
| tar -cf - "$sdk_name" | tar -xf - -C /tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a pre-existing issue, but we should make use mktemp -d instead of just unarchiving in /tmp.
|
If I understand correctly we'll need this to be able to build iOS templates for 4.6-dev2, so this can likely be merged as is and improved in a follow-up PR. I won't be around next week to work on this. |
0144815 to
c19f8b4
Compare
| ENV OSX_SDKV= | ||
| ENV IOS_SDKV= | ||
| ENV TVOS_SDKV= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these can be removed.
|
|
||
| ENV XCODE_SDKV=26.0.1 | ||
| ENV APPLE_SDKV=26.0 | ||
| ENV OSX_SDK=26.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be removed and replaced by APPLE_SDKV below.
|
I will verify it works from a |
c19f8b4 to
2df1f94
Compare
|
@akien-mga I've pushed up a separate img_version=4.6-f42 podman build --build-arg img_version=${img_version} -v $(realpath files):/root/files:z -t godot-swift:${img_version} -f Dockerfile.swift .Here is the tail of my output from that command: |
|
Same error with the new dockerfile sadly: I'm running on a Fedora 42 host for the record, and with |
2df1f94 to
ce13ef7
Compare
Did some more research, and apparently |
|
Still no luck with the latest commit: |
|
@akien-mga I am running the podman container under Ubuntu; do you think there are differences between the OSs as to why it is failing for you? The other difference is that your container is running as x86_64 and mine is arm64. I don't see why the architecture should matter, but it is a difference. It's slightly amusing that we're using containers to avoid conflicts from the local machine, yet here we are… |
|
For the record, I made a test build without
Yeah there's probably some system configuration difference or some of the underlying stack for |
|
@akien-mga I am going to set up a Fedora 42 x86_64 host VM and run podman inside that to match your environment as closely as possible. I'll also extract Xcode from the 26.0.1 |
|
@akien-mga I'm now at a loss, as I set up an environment that very closely models yours:
Important What version of podman --version
sudo podman run -it --rm -v $(realpath files):/root/files:z -v /Volumes/Data:/root/data:z -e XCODE_SDKV=26.0.1 -e XCODE_XIP_PATH=/root/data/Xcode_26.0.1_Apple_silicon.xip -e APPLE_SDKV=26.0 godot-xcode:${img_version}
sudo podman build --build-arg img_version=${img_version} -v $(realpath files):/root/files:z -t godot-swift:${img_version} -f Dockerfile.swift . |
|
@akien-mga could I build the Apple containers for you and push them to a repository, so you can pull them down? |
That could work as a stopgap measure, but the purpose of these containers is to be reproducible, and they're not just used by us for our builds but potential other users who want to make their custom builds of Godot. So if this PR only works on some machines we need to figure out why and solve that. HP started looking into it to see what might cause this difference in behavior. If we can't find how to make it work quickly, I would likely prefer that we temporarily revert the PR that made Swift a requirement for iOS and visionOS, so we can build 4.6-dev2 (this is currently the main blocker to making new builds). Then we can take our time to ensure that the build pipeline is ready for it before merging it again. |
Absolutely agree! It baffles me that I've set up a mostly similar environment to you and still can't reproduce it. The supposed benefit of containers is to avoid host incompatibilities 😅
No problem at all and the right decision if we can't resolve it. |
If HP needs anything from me, don't hesitate to ping me. |
|
The error is cosmetic After a successful run of the script: An unsuccessful run: The contents are identical (the symbolic link also points to the same place) The root cause is this: Probably because the buildsystem has selinux enabled (it is, however, in permissive mode), or because we use a different filesystem than you @stuartcarnie the swift installer thinks that it can run the swift installed will then give up, even though it seems to have done all it is ever going to do. The 'fix' for this I suppose is to ignore this error, I would suggest doing a grep on stderr to ensure that the error that is being ignored is in fact the error we are 'expecting' in this case. EDIT: Alternatively, just don't use the script at all, and manually copy This appears all that |
|
@hpvb great – I'll just try copy the files, as you are right, that is probably all it is doing. |
ce13ef7 to
40fed86
Compare
|
@akien-mga I've pushed up the changes and verified I could still build an iOS object file using Swift. No longer uses swift to install the SDK |
40fed86 to
4b58ce1
Compare
akien-mga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work well now.
There are still a few SDK-specific variables like IOS_SDKV/VISIONOS_SDKV/etc. that could be streamlined now that there's only one APPLE_SDKV, but this can be done in a follow-up cleanup. The priority now is to have functional build containers.
Thanks a lot for the great work @stuartcarnie, and thanks @hpvb for the help debugging the copy issue.
This PR:
iOS Build Status
visionOS Build Status
When the swift compiler attempts to compile modules that have the same availability checks as is mentioned in swiftlang/llvm-project/issues/10782, it fails due to the bug in llvm
In order to resolve this, the Swift 6.2 toolchain will need to be compiled with the same patched llvm-project toolchain.