-
Notifications
You must be signed in to change notification settings - Fork 3
patch for xrOS #6
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
patch for xrOS #6
Conversation
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.
The broad strokes of this PR look right; but there's a few details to sort out.
-
There's definitely an aclocal version issue; there shouldn't be a need for any changes to
aclocal.m4
. If you use theTools/build/regen-configure.sh
script mentioned at the top ofconfigure.ac
, that will guarantee all the right tool versions are in use (using Docker to provide a clean development environment). -
The
xros
vsvisionOS
naming convention flagged in your other visionOS PR. There are definitely some places here wherexros
will need to be used (most notably, asXROS_DEPLOYMENT_TARGET
- butac_sys_system
should definitely be resolving tovisionOS
so thatsys.platform
returnsvisionos
; and the modifications inplatform
should also be usingvisionOS
naming. -
There are some consistency issues with flagging the minimum visionOS version as 4.0, and the question of how that version is to be passed into the compiler - the compiler shims may need to be modified to include
XROS_DEPLOYMENT_TARGET
as part of the-target
definition. -
There's no need to provide
arm64_32
orx86_64
variants of the compiler shims, as those platforms don't exist for visionOS - and there's no need for thepyconfig.h
shim either, as there's only 1 architecture for vision OS.
Co-authored-by: Russell Keith-Magee <[email protected]>
Again, sorry for 4.0; I should've had more diligence when copy + pasting |
In addition -- I have some stuff I want to clarify --- I copy-pasted a lot of stuff from watchOS -- there's some stuff unavailable only for TV and Watch -- in that case, I think we should test those tv- and watchOS only stuff on visionOS and see if they're actually unavailable. |
OK I have configure running locally at this point, I changed some more stuff that I need to push |
visionos deployment target -- that variable i think is fine Besides the SDK everything else could use visionOS; I kept the xros target triples just in case someone needs to compile them using xros |
OK somehow make clean does not remove the generated info.plist. Haven't tried make install yet but configure and make could run (idk if correctly) |
Not very sure about the latest commit-- no way to test at this moment -- I will need to generate a patch and feed it into py-apple-support |
@freakboy3742 Ping |
As I mentioned yesterday - I get notified on every change to every BeeWare repo; there's no need to ping me directly. Also - timezones are a thing. I've literally just woken up :-) |
Oh sorry! Yeah I realized 5 seconds after I sent the ping comment that you were from australia I was from China UTC+8, moved a few years (<5) ago, and yes, time zones are relatable |
Something along these lines: visionOS 3D content must be done with SwiftUI and UIKit cannot be used for visionOS-specific or 3D content: https://developer.apple.com/documentation/visionos/bringing-your-app-to-visionos/ So... should we start writing rubicon-swift? |
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've flagged a bunch of consistency issues - mostly related to where the build scripts should be accepting visionOS
, and when they should be accepting xros
. However, there's also a bunch of 4.0 version references that I flagged in my last pass.
The same problem/limitation exists for watchOS. |
Just finished changing a bunch of stuff; sorry for the delay; will push once build finishes |
Also I got this while compiling: ./Modules/_hacl/Lib_Memzero0.c:52:6: warning: "Your platform does not support any safe implementation of memzero -- consider a pull request!" [-W#warnings] |
Still I pushed a commit to address the code style. |
I've just tried the laster version of this branch - and it's launching fine for me, on both iOS and visionOS, under Xcode. It's possible the cause of the problem you're seeing is that you need a "build" version of Python that must be the exact same version that is being used for testing. So - you need to build a macOS version of CPython off the patched branch, and that needs to be the version of CPython that the visionOS build finds - essentially your "build" python needs to be on the path before the version in If you're running the test suite through Xcode, you'll also need to turn on automated breakpoints, same as you do for iOS; without that, the test suite will halt about 5 tests in when then first SIGINT is raised With those two caveats, most of the test suite is running; however:
|
Caught where the issue for #2 is Current commands for build --
|
That would be consistent. Any new feature that alters CPython's bytecode definition will be a source of problems, and a7 included the addition of t-strings. Once beta 1 lands, these problems become less prevalent because new features are no longer allowed.
Yes, that's the hard crash I was talking about. As for how to handle it... it depends what is causing it. So - the next step is to narrow down on which subtest of Beyond that, it depends what the test is doing to cause a problem. It might be as simple as a test that is trying to access a file that isn't available in the visionOS sandbox. At the very least, we can skip that specific test. However, ideally we won't just skip the test, we'd disable the fix the underlying problem. If the issue is the specific filename, then we can find a better filename; if it's using an underlying feature, we can disable that feature. That's what these checks are controlling - it's identifying system calls that exist, but if you actually try to invoke them, an error is raised. If you want to test a theory about whether disabling a specific test will fix the problem, you can manually edit the contents of
Yes, that's fine -
That's about what I expected; glad to see it was an easy one.
Yes, this is a lot better - thanks for taking that feedback on board. |
<array> | ||
<string>iPhoneOS</string> | ||
</array> | ||
<key>MinimumOSVersion</key> | ||
<string>12.0</string> |
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.
Just noticed that these keys don't seem right
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.
Not sure about canoncial input for this, and don't know how to look it up (Google is failing me), but by searching up random stuff I managed to find that the tvOS value is AppleTVOS, so I used VisionOS as of right now.
Also it's funny |
Let's go iOS passing for the first time in forever on PAS... Will go investigate issue about zipfile now. Doing what you said; however, FYI your comment has a formatting issue, but don't worry i've had tons during translation. |
@freakboy3742 Sorry for sending a premature message 14 minutes ago. I set verbose + test_zipfile but it crashes without printing anything verbose (aka just the test name). Any ideas? Also never mind test_platform is failing, a reference to the fact that I was writing in C++ 5 minutes ago. |
My apologies - I forgot that
|
Hi @freakboy3742, apologies for the slow response time (and the many other times where I had to wake up before I could respond, even though I wake up as early as 5:30 in some days within the past month or so). The crashing test is
Now, the code is pretty short that I can post it here (if GitHub ever relicenses user-submitted contents under dirty stuff we can argue fair use here).
|
I guess my follow up question is to ask what line is actually throwing the error? Is it |
By monkey patching (changing the produced XCFramework) and putting
Will stop working today at GMT-5 (daylight saving time already applied into the time zone), and sorry for the brisk comment. |
Looks like I spoke too soon about I've done a poke around, and all the exiting uses are being skipped - including, in one case, this skip that identifies the test as "unstable". I'd like to have a little better understanding of exactly why it's failing on visionOS, so if you're able to dig into the internals of |
Just went ahead and re-checked this using flush=True on print and yes I can confirm :)
Yes, but that being skipped because it's unstable is because it produces different output because of system stuff tempering w/ the file descriptor count (which I have no idea about), not because it crashes AFAIK (by looking at the comments).
Crashing, not failing. In my own opinion I would not skip it. After extensive debugging, it is crashing on https://github.com/johnzhou721/cpython/blob/379c3d965724046bffcde63199893fe79dfdded7/Lib/test/support/os_helper.py#L689 for the 8th time it executes (fd=7, but 0-indexing :) ) If you got confused on my stuff above and would like to see concrete evidenceRelevant definition (see the lines
|
My apologies - that was loose language on my part. I'm aware it's a crash, not a soft fail. That testing definitely confirms it's The good news, though, is that the fix is staring us in the face. CPython macOS has already hit this problem, and applied a fix. At the top of So - if you modify the |
macOS Sonoma seems to have issues with support.fd_count, at pythongh-109981. However, after experimenting using macOS Sonoma on an attempt to support visionOS unofficially through another project, the simulator is hard-crashing, leading to the con- clusion that this probably applies on all Apple platforms. Hence this patch.
@freakboy3742 Done. |
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've just pushed a couple of minor updates to your patch - but with those changes, I'm getting a clean test run! Thanks for your work on this patch.
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.
sorry, finishing up a pending review from forever ago
<array> | ||
<string>iPhoneOS</string> | ||
</array> | ||
<key>MinimumOSVersion</key> | ||
<string>12.0</string> |
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.
Not sure about canoncial input for this, and don't know how to look it up (Google is failing me), but by searching up random stuff I managed to find that the tvOS value is AppleTVOS, so I used VisionOS as of right now.
Like I flagged those style things and forgot to click ``finish your review'' |
Patch for xrOS in Git commit format as mentioned in beeware/Python-Apple-support#269.
EDIT -- new PR for PAS is at beeware/Python-Apple-support#270
Context for more visitors: PAS = beeware/Python-Apple-Support, xrOS is internal codename in Apple for visionOS. This patch adds support to an already-patched version of CPython to support for visionOS.