Skip to content

iOS testbed clone breaks on some symlinks #130025

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

Closed
freakboy3742 opened this issue Feb 12, 2025 · 2 comments
Closed

iOS testbed clone breaks on some symlinks #130025

freakboy3742 opened this issue Feb 12, 2025 · 2 comments
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-ios type-bug An unexpected behavior, bug, or error

Comments

@freakboy3742
Copy link
Contributor

freakboy3742 commented Feb 12, 2025

Bug report

Bug description:

The iOS testbed project is able to use symlinks when referring to the XCframework (or simulator Framework slice of an XCframework). This saves significant disk space and startup time as the need to copy the full framework is eliminated.

The clone subcommand of the testbed will duplicate this symlink; or, if a path to an XCframework (or simulator slice) is provided, that framework will be used instead.

However:

  1. If the testbed is cloned and no new framework is provided, and the symlink is specified as a relative link, the symlink will not work in the new location
  2. If the existing framework symlink is invalid, any attempt to replace it fails because the existing link won't resolve.

To replicate, generate an arm64 simulator build, then:

  1. python iOS/testbed clone testbed-1 --framework cross-build/arm64-apple-ios-simulator/iOS/Frameworks/arm64-iphonesimulator (substitute path to simulator framework as appropriate)
  2. python testbed-1 clone tmp/testbed-2
  3. Inspect tmp/testbed-2/Python.xcframework/ios-arm64_x86_64-simulator - it will be an invalid symlink.
  4. python tmp/testbed-2 clone tmp/testbed-3 - this will fail because testbed-2 doesn't contain a simulator framework.
  5. python tmp/testbed-2 clone tmp/testbed-3 --framework cross-build/arm64-apple-ios-simulator/iOS/Frameworks/arm64-iphonesimulator - this will fail with a FileNotFoundError looking for .../cpython/tmp/cross-build/arm64-apple-ios-simulator/iOS/Frameworks/arm64-iphonesimulator, which is what the testbed-2 framework symlink would resolve to (but doesn't exist).

CPython versions tested on:

3.14

Operating systems tested on:

Other

Linked PRs

@freakboy3742 freakboy3742 added 3.13 bugs and security fixes 3.14 bugs and security fixes needs backport to 3.13 bugs and security fixes OS-ios type-bug An unexpected behavior, bug, or error labels Feb 12, 2025
@picnixz picnixz removed the needs backport to 3.13 bugs and security fixes label Feb 12, 2025
@picnixz
Copy link
Member

picnixz commented Feb 12, 2025

(Note: we use the plain X.Y labels on issues and the "needs backport to X.Y" labels on PRs)

@picnixz picnixz added build The build process and cross-build and removed build The build process and cross-build labels Feb 12, 2025
freakboy3742 added a commit that referenced this issue Feb 13, 2025
…installation. (#130026)

Correct handling of symlinks during iOS testbed framework installation.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 13, 2025
…ework installation. (pythonGH-130026)

Correct handling of symlinks during iOS testbed framework installation.
(cherry picked from commit 625470a)

Co-authored-by: Russell Keith-Magee <[email protected]>
@freakboy3742
Copy link
Contributor Author

Fixed by #130026 and #130073.

freakboy3742 added a commit that referenced this issue Feb 13, 2025
…mework installation. (GH-130026) (#130073)

Correct handling of symlinks during iOS testbed framework installation.
(cherry picked from commit 625470a)

Co-authored-by: Russell Keith-Magee <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Feb 18, 2025
…ework installation. (python#130026)

Correct handling of symlinks during iOS testbed framework installation.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Feb 18, 2025
…ed framework installation. (pythonGH-130026) (python#130073)

Correct handling of symlinks during iOS testbed framework installation.
(cherry picked from commit 625470a)

Co-authored-by: Russell Keith-Magee <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Mar 16, 2025
…ed framework installation. (pythonGH-130026) (python#130073)

Correct handling of symlinks during iOS testbed framework installation.
(cherry picked from commit 625470a)

Co-authored-by: Russell Keith-Magee <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Mar 16, 2025
…ed framework installation. (pythonGH-130026) (python#130073)

Correct handling of symlinks during iOS testbed framework installation.
(cherry picked from commit 625470a)

Co-authored-by: Russell Keith-Magee <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Mar 16, 2025
…d framework installation. (pythonGH-130026) (python#130073)

Correct handling of symlinks during iOS testbed framework installation.
(cherry picked from commit 625470a)

Co-authored-by: Russell Keith-Magee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-ios type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants