GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow static, non-framework iOS builds · Issue #156109 · python/cpython

Allow static, non-framework iOS builds #156109

New issue
Copy link
New issue
Copy link
Closed
Closed
Allow static, non-framework iOS builds#156109
Copy link
Labels
OS-iosbuildThe build process and cross-buildThe build process and cross-buildtype-featureA feature request or enhancementA feature request or enhancement

Description

@clementperon
clementperon
opened on Aug 20, 2026
Issue body actions

Feature or enhancement

Proposal:

configure refuses any iOS build that is not a framework build, in both the explicit and the default path:

configure.ac:582   iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;;   # --disable-framework
configure.ac:692   iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;;   # no framework option given

The requirement is sound for a shared Python: an iOS app can only load a signed framework, never a bare dylib, so a dynamically loaded libpython has to be packaged as one. It does not hold for a static one. A --disable-shared build produces libpython3.x.a, which is linked into the app binary and loads nothing at runtime, so there is no framework to sign, package or load — but configure rejects that configuration before it can be attempted.

This matters for embedders, which link libpython statically into a single signed executable. Today they have to either patch configure locally or give up sys.platform == "ios" and cross-build as Darwin, which misreports the platform to the stdlib.

Two other places assume the framework exists whenever ac_sys_system is iOS:

configure.ac:3838  LINKFORSHARED="… $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)"
configure.ac:6767  MODULE_DEPS_SHARED="… $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)"

The Darwin arm immediately above the first one already guards the identical append with if test "$enable_framework"; the iOS arm does it unconditionally.

Suggested shape, keeping the change conservative:

  • refuse only the combination that genuinely cannot work — a shared build with no framework — checked once PY_ENABLE_SHARED is known;
  • gate the two framework appends on enable_framework, matching the Darwin arm;
  • leave the default path (no framework option at all) erroring, so a non-framework build stays an explicit opt-in, with the message naming --disable-framework.

I have this working against main and will open a PR. Verified locally on macOS/arm64:

  • --host=arm64-apple-ios12.0 --disable-shared --disable-framework configures and make libpython3.16.a succeeds, producing an arm64 archive with LC_BUILD_VERSION platform 2, minos 12.0;
  • --disable-framework --enable-shared is rejected with the new message;
  • no framework option is still rejected;
  • --enable-framework produces a byte-identical Makefile and pyconfig.h to unpatched main, so the supported framework build is unaffected.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

  • gh-156109: Allow static, non-framework iOS builds #156110

Activity

  1. aisk
    added
    type-featureA feature request or enhancementA feature request or enhancement
    buildThe build process and cross-buildThe build process and cross-build
    OS-ios
    on Aug 20, 2026
  2. clementperon
    added 7 commits that reference this issue on Aug 23, 2026

    pythongh-156109: Make non-framework iOS builds self-consistent

    bb30722

    pythongh-156109: Allow static, non-framework iOS builds

    80fe693

    pythongh-156109: Allow static, non-framework iOS builds

    d89c672

    pythongh-156109: Allow static, non-framework iOS builds

    14b7fc3

    pythongh-156109: Allow static, non-framework iOS builds

    1c88b0d

    pythongh-156109: Allow static, non-framework iOS builds

    87205e3

    pythongh-156109: Allow static, non-framework iOS builds

    abfa4b2
  3. freakboy3742
    added a commit that references this issue on Sep 8, 2026

    gh-156109: Allow static, non-framework iOS builds (#156110)

    465b3b8
  4. maurycy
    added a commit that references this issue on Sep 10, 2026

    Merge branch 'main' into tachyon-native-callable

    e028ff5
  5. clin1234
    added a commit that references this issue on Sep 12, 2026

    pythongh-156109: Allow static, non-framework iOS builds (python#156110)

    454508c
  6. johnslavik
    added a commit that references this issue on Sep 14, 2026

    pythongh-156109: Allow static, non-framework iOS builds (python#156110)

    e61dffe
  7. hugovk
    closed this as completedon Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-iosbuildThe build process and cross-buildThe build process and cross-buildtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.