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 — .pc for Android contains invalid syntax · Issue #138800 · python/cpython

.pc for Android contains invalid syntax #138800

New issue
Copy link
New issue
Copy link
Closed
#144776
Closed
.pc for Android contains invalid syntax#138800
#144776
Copy link
Labels
OS-androidbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@lazka
lazka
opened on Sep 11, 2025
Issue body actions

Bug report

Bug description:

Looking at the Android build here: https://www.python.org/downloads/android/

The .pc files look like this:

# See: man pkg-config
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Python
Description: Build a C extension for Python
Requires:
Version: 3.14
Libs.private: -ldl  -llog
Libs: -L${libdir} $(BLDLIBRARY)
Cflags: -I${includedir}/python3.14

The "Libs:" line contains some autotools internals instead of the library name resulting in linker errors like:

cannot find $(BLDLIBRARY): No such file or directory

Might be related to #115780

Disclaimer: The main reason I'm reporting this is that it also breaks the Cygwin build in the same way, but that's not a supported platform, so this is the next best thing. i.e. I've not actually tested on Android.

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

  • GH-138800: fix variable substitution in python3.pc for Android #144776
  • [3.15] GH-138800: Fix variable substitution in python3.pc for Android (GH-144776) #155107
  • [3.14] GH-138800: Fix variable substitution in python3.pc for Android (GH-144776) #155108
  • [3.13] GH-138800: Fix variable substitution in python3.pc for Android (GH-144776) #155111

Activity

Next
  1. lazka
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Sep 11, 2025
  2. StanFromIreland
    added
    OS-android
    on Sep 11, 2025
  3. StanFromIreland commented on Sep 11, 2025

    @StanFromIreland
    StanFromIreland
    on Sep 11, 2025
    Member
    More actions

    cc @mhsmith

  4. picnixz
    added
    buildThe build process and cross-buildThe build process and cross-build
    on Sep 11, 2025
  5. lazka
    added a commit that references this issue on Sep 12, 2025

    Work around broken pc file

    f50419a
  6. mhsmith commented on Sep 12, 2025

    @mhsmith
    mhsmith
    on Sep 12, 2025
    Member
    More actions

    Thanks for the report. I guess $(BLDLIBRARY) should probably be replaced with -lpython3.14. However, I'm not currently aware of anyone who uses the .pc file on Android, so I won't pick this up this myself just now.

  7. lazka commented on Sep 12, 2025

    @lazka
    lazka
    on Sep 12, 2025
    ContributorAuthor
    More actions

    Fair enough, I've hackily worked this around downstream now.

  8. lazka
    added 7 commits that reference this issue on Sep 23, 2025

    Work around broken pc file

    6c5ef6a

    Work around broken pc file

    7a2688e

    configure: Work around broken pc file

    4472a0b

    configure: Work around broken pc file

    3f4722f

    configure: Work around broken pc file

    b74ea9a

    configure: Work around broken pc file

    ea8e558

    configure: Work around broken pc file

    2293bf6
  9. mhsmith commented on Dec 16, 2025

    @mhsmith
    mhsmith
    on Dec 16, 2025
    Member
    More actions

    This affects any package using Meson, which uses pkgconfig to detect Python, so I'll implement a workaround in cibuildwheel.

    Example error:

    FAILED: numpy/_core/_struct_ufunc_tests.cpython-313-aarch64-linux-android.so 
    /Users/msmith/Library/Android/sdk/ndk/27.3.13750724/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang  -o numpy/_core/_struct_ufunc_tests.cpython-313-aarch64-linux-android.so numpy/_core/_struct_ufunc_tests.cpython-313-aarch64-linux-android.so.p/src_umath__struct_ufunc_tests.c.o -L/private/var/folders/2t/th8vxc813_gcch7lkh1sbbmc0000gp/T/cibw-run-5ef4oo3_/cp313-android_arm64_v8a/python/prefix/lib -I/private/var/folders/2t/th8vxc813_gcch7lkh1sbbmc0000gp/T/cibw-run-5ef4oo3_/cp313-android_arm64_v8a/python/prefix/include -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,-O1 -shared -fPIC -lm -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,-z,max-page-size=16384 -Wl,--no-undefined -D__BIONIC_NO_PAGE_SIZE_MACRO -DNDEBUG -O3 -Wall '$(BLDLIBRARY)'
    clang: error: no such file or directory: '$(BLDLIBRARY)'
    
    Reacted by Christoph Reiter
  10. 48 remaining items

  11. thunder-coding
    added 2 commits that reference this issue on Feb 20, 2026

    pythonGH-138800: fix variable substitution in python3.pc for Android

    dfd1070

    pythonGH-138800: fix variable substitution in python3.pc for Android

    8d4760a
  12. thunder-coding
    added a commit that references this issue on Mar 6, 2026

    pythonGH-138800: fix variable substitution in python3.pc for Android

    480c0f1
  13. lazka
    added 2 commits that reference this issue on Apr 10, 2026

    configure: Work around broken pc file

    113a1a6

    configure: Work around broken pc file

    b853df6
  14. lazka
    added a commit that references this issue on May 11, 2026

    configure: Work around broken pc file

    af85ed4
  15. lazka
    added a commit that references this issue on Jun 10, 2026

    configure: Work around broken pc file

    0378759
  16. freakboy3742
    closed this as completedin #144776on Aug 3, 2026
  17. freakboy3742
    added 2 commits that reference this issue on Aug 3, 2026

    GH-138800: Fix variable substitution in python3.pc for Android (#144776)

    5918085

    [3.15] GH-138800: Fix variable substitution in python3.pc for Android (…

    847d099
  18. lazka commented on Aug 3, 2026

    @lazka
    lazka
    on Aug 3, 2026
    ContributorAuthor
    More actions

    Thanks @freakboy3742 @thunder-coding !

  19. freakboy3742
    added 2 commits that reference this issue on Aug 3, 2026

    [3.14] GH-138800: Fix variable substitution in python3.pc for Android (…

    90be969

    [3.13] GH-138800: Fix variable substitution in python3.pc for Android (…

    df26596
  20. deadlovelll
    added a commit that references this issue on Aug 5, 2026

    [3.14] pythonGH-138800: Fix variable substitution in python3.pc for A…

    a014e95
  21. mbeijen
    added a commit that references this issue on Aug 14, 2026

    pythonGH-138800: Fix variable substitution in python3.pc for Android (p…

    9d2c7f6
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-androidbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    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.