linux: functions missing from the transpiled musl libc (semaphores, sched_*, pthread_condattr_setclock, pthread_kill, posix_spawn, forkpty, pthread_get/setname_np)

Project: modernc.org/libc (linux, transpiled musl)

Environment

  • modernc.org/libc v1.75.7, linux/amd64 and linux/arm64, as pinned by the originating project.

Origin

This report records findings made by the third-party project github.com/Tryanks/cpython-go, a ccgo transpilation of CPython 3.14 (commit ab9a153, 2026-09-05). The project is not mine; I am filing the findings so they are not lost. Unless stated otherwise, the items below are taken from comments in that repository and were not independently verified.

Findings

The project seeds CPython's configure with these answers so that CPython takes its fallback paths (generator.go, configureEnvOS["linux"], comment: "transpiled musl: no semaphores, scheduler, condattr clocks, ..."):

ac_cv_func_forkpty=no
ac_cv_func_posix_spawn=no
ac_cv_func_posix_spawnp=no
ac_cv_func_pthread_condattr_setclock=no
ac_cv_func_pthread_getname_np=no
ac_cv_func_pthread_setname_np=no
ac_cv_func_pthread_getcpuclockid=no
ac_cv_func_pthread_kill=no
ac_cv_func_sched_get_priority_max=no
ac_cv_func_sched_getaffinity=no
ac_cv_func_sched_getparam=no
ac_cv_func_sched_getscheduler=no
ac_cv_func_sched_rr_get_interval=no
ac_cv_func_sched_setaffinity=no
ac_cv_func_sched_setparam=no
ac_cv_func_sched_setscheduler=no
ac_cv_posix_semaphores_enabled=no

CPython's configure detects these functions through link tests against the native musl in the Alpine build container, so the answers are forced rather than detected. The consequences recorded in the project's TODO.md are that pthread_kill "remains a stub" and that multiprocessing is not built (also because fork is unavailable under the Go runtime, which is unrelated to libc).