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 — platform.libc_ver() returns no information on Alpine Linux · Issue #87414 · python/cpython

platform.libc_ver() returns no information on Alpine Linux #87414

New issue
Copy link
New issue
Copy link
Closed
Closed
platform.libc_ver() returns no information on Alpine Linux#87414
Copy link
Labels
3.8 (EOL)end of lifeend of lifeOS-unsupportedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory

Description

thedrow
mannequin
opened on Feb 18, 2021
Issue body actions
BPO 43248
Nosy @The-Compiler, @thedrow, @corona10

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-02-18.11:13:38.696>
labels = ['3.8']
title = 'platform.libc_ver() returns no information on Alpine Linux'
updated_at = <Date 2021-07-05.08:01:18.532>
user = 'https://github.com/thedrow'

bugs.python.org fields:

activity = <Date 2021-07-05.08:01:18.532>
actor = 'The Compiler'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2021-02-18.11:13:38.696>
creator = 'Omer.Katz'
dependencies = []
files = []
hgrepos = []
issue_num = 43248
keywords = []
message_count = 2.0
messages = ['387211', '387396']
nosy_count = 3.0
nosy_names = ['The Compiler', 'Omer.Katz', 'corona10']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue43248'
versions = ['Python 3.8']

Linked PRs

  • gh-87414: add musl support to platform.libc_ver #103784

Activity

  1. thedrow commented on Feb 18, 2021

    @thedrow
    thedrowmannequin
    on Feb 18, 2021
    MannequinAuthor
    More actions

    When calling platform.libc_ver() on Alpine I get the following tuple: ('', '')

    Instead, I expect to get ('muslc', '<version number>') or an exception if the libc type & version cannot be detected.
    If one of them is not detected, the returned value shouldn't be an empty string but None.
    The current API is not what most people would expect it to be.
    This is verified on Python 3.8 since that's the latest one available on Alpine.

    This code reliably detects musl libc and its version: https://github.com/lovell/detect-libc/blob/master/lib/detect-libc.js

    I'd be happy to contribute a PR if needed.

  2. thedrow
    added
    3.8 (EOL)end of lifeend of life
    on Feb 18, 2021
  3. corona10 commented on Feb 20, 2021

    @corona10
    corona10
    on Feb 20, 2021
    Member
    More actions

    @Omer.Katz

    This issue should be fixed, feel free to submit the PR

  4. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  5. mara004 commented on Apr 30, 2022

    @mara004
    mara004
    on Apr 30, 2022
    Contributor
    More actions

    Any progress on this? Is there any other function to check whether the host system is using musl or glibc?

  6. mara004
    added a commit that references this issue on Apr 30, 2022

    Adapt musl recognition

    9350d46
  7. mara004 commented on Jan 19, 2023

    @mara004
    mara004
    on Jan 19, 2023
    Contributor
    More actions

    How about just integrating packaging's musl detection code into the standard library?
    https://github.com/pypa/packaging/blob/main/src/packaging/_musllinux.py

    (Actually, I'm a bit surprised this wasn't done directly on the implementation of PEP 656.)

    Reacted by Manuel Kaufmann
  8. iritkatriel
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Dec 1, 2023
  9. encukou
    added
    OS-unsupported
    on Mar 8, 2024
  10. github-project-automation
    added this to Unsupported platformson Mar 8, 2024
  11. jollaitbot
    added a commit that references this issue on Oct 30, 2024

    fix[util]: remove is_libc_musl

    144eb3f
  12. jollaitbot
    added a commit that references this issue on Apr 15, 2025

    fix[util]: remove is_libc_musl

    48f98ed
  13. zware commented on Apr 28, 2025

    @zware
    zware
    on Apr 28, 2025
    Member
    More actions

    Strictly speaking, this issue has been fixed by GH-131313. However, GH-103784 is still open which may or may not improve on the situation, and the commit message from GH-131313 mentions that WASI/Emscripten support is still lacking.

  14. sertonix commented on Jul 17, 2025

    @sertonix
    sertonix
    on Jul 17, 2025
    More actions

    This issue also causes platform.platform() to return a nonsensical output: Linux-6.15.6-0-stable-x86_64-with (The -with doesn't makes sense when libcname+libcversion is empty)

    Edit: tested a version without #131313 , probably works fine with

  15. zware commented on Sep 6, 2025

    @zware
    zware
    on Sep 6, 2025
    Member
    More actions
    ~/cpython $ ./python
    Python 3.15.0a0 (heads/main:c117b03, Sep  6 2025, 22:03:51) [GCC 14.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import platform
    >>> platform.platform()
    'Linux-6.15.10-200.fc42.x86_64-x86_64-with-musl1.2.5'
    >>> platform.libc_ver()
    ('musl', '1.2.5')
    Reacted by mara004
  16. zware
    closed this as completedon Sep 6, 2025
  17. github-project-automation
    moved this to Done in Unsupported platformson Sep 6, 2025
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

    3.8 (EOL)end of lifeend of lifeOS-unsupportedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory

    Projects

    • Unsupported platforms
      Status
      Done
      Show more project fields

    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.