From f6b7f597e108fdc7d8d5b58e0efdba9c2f741f5f Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 08:46:38 +0000 Subject: [PATCH 1/2] zttp: Add versions 0.0.32, 0.0.33, 0.0.34 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/zttp.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/packages/zttp.yaml b/docs/packages/zttp.yaml index 0bf5b4b4059..00d0b47865f 100644 --- a/docs/packages/zttp.yaml +++ b/docs/packages/zttp.yaml @@ -30,3 +30,6 @@ versions: - filename: zttp-0.0.31-cp314-cp314t-musllinux_1_2_riscv64.whl sha256: 5c008eebbc9b8e8607439841005511add743d1d3dd29d315134b8a002a394371 requires-python: '>=3.10' +- version: 0.0.32 +- version: 0.0.33 +- version: 0.0.34 From 749efc480284f39b72fb0a34fde30d181ca3daab Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 9 Oct 2026 16:32:26 +0000 Subject: [PATCH 2/2] zttp: carry forward riscv64 patches to 0.0.32, 0.0.33, 0.0.34 Nightly version bump omitted the patches/zttp/ directory for 0.0.32, 0.0.33, 0.0.34, so the build's unconditional `git apply .../*.patch` step failed with "No such file or directory" before any build/test ran. Copied forward the same patch set from 0.0.31 (unchanged since then). --- ...C-V-float-ABI-macros-for-translate-c.patch | 49 +++++++++++++++++++ ...C-V-float-ABI-macros-for-translate-c.patch | 49 +++++++++++++++++++ ...C-V-float-ABI-macros-for-translate-c.patch | 49 +++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 patches/zttp/0.0.32/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch create mode 100644 patches/zttp/0.0.33/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch create mode 100644 patches/zttp/0.0.34/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch diff --git a/patches/zttp/0.0.32/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch b/patches/zttp/0.0.32/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch new file mode 100644 index 00000000000..5c110dc8d2a --- /dev/null +++ b/patches/zttp/0.0.32/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sun, 4 Oct 2026 04:45:00 +0200 +Subject: [PATCH] build.zig: define RISC-V float ABI macros for translate-c + +Zig 0.16's translate-c runs on Aro, whose predefined macros for RISC-V +stop at `__riscv` and `__riscv_xlen`: it never emits `__riscv_flen` or +`__riscv_float_abi_double`, which clang and GCC define for an lp64d +target. glibc's riscv `bits/setjmp.h`, pulled in by Python.h through +pthread.h, requires one of the `__riscv_float_abi_*` macros: + + /usr/include/bits/setjmp.h:35:3: error: unsupported FLEN + +so the CPython C-API translation fails and no manylinux_riscv64 wheel +can be built. musl's headers do not test these macros, so +musllinux_riscv64 builds unaffected. Reproduces on any host with +`zig translate-c -lc -target riscv64-linux-gnu`. + +Zig master already emits these macros from Aro (ziglang/zig commit +b46a7f3a25a6, "sync aro & translate-c"); this is unnecessary once zttp +moves to a Zig release that contains it. + +Upstream-Status: To upstream [not yet submitted; workaround for Zig 0.16, fixed by ziglang/zig b46a7f3a25a6 on master] +--- + build.zig | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/build.zig b/build.zig +index 8fdf7d7..6ee8b5c 100644 +--- a/build.zig ++++ b/build.zig +@@ -149,6 +149,14 @@ pub fn build(b: *std.Build) void { + // on the build backend to pass it - so on Windows the translation silently + // targets the GIL ABI unless we define it here. + if (free_threaded and target.result.os.tag == .windows) translate.defineCMacro("Py_GIL_DISABLED", "1"); ++ // Zig 0.16's translate-c (Aro) predefines no RISC-V floating-point macros, ++ // so glibc's riscv bits/setjmp.h (reached via pthread.h) hits `#error ++ // unsupported FLEN`. Define what clang does for an lp64d target; Zig master ++ // already emits these itself. ++ if (target.result.cpu.arch.isRISCV() and target.result.cpu.has(.riscv, .d)) { ++ translate.defineCMacro("__riscv_flen", "64"); ++ translate.defineCMacro("__riscv_float_abi_double", "1"); ++ } + + const fixer = b.addExecutable(.{ + .name = "fix_cimport", +-- +2.43.0 + diff --git a/patches/zttp/0.0.33/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch b/patches/zttp/0.0.33/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch new file mode 100644 index 00000000000..5c110dc8d2a --- /dev/null +++ b/patches/zttp/0.0.33/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sun, 4 Oct 2026 04:45:00 +0200 +Subject: [PATCH] build.zig: define RISC-V float ABI macros for translate-c + +Zig 0.16's translate-c runs on Aro, whose predefined macros for RISC-V +stop at `__riscv` and `__riscv_xlen`: it never emits `__riscv_flen` or +`__riscv_float_abi_double`, which clang and GCC define for an lp64d +target. glibc's riscv `bits/setjmp.h`, pulled in by Python.h through +pthread.h, requires one of the `__riscv_float_abi_*` macros: + + /usr/include/bits/setjmp.h:35:3: error: unsupported FLEN + +so the CPython C-API translation fails and no manylinux_riscv64 wheel +can be built. musl's headers do not test these macros, so +musllinux_riscv64 builds unaffected. Reproduces on any host with +`zig translate-c -lc -target riscv64-linux-gnu`. + +Zig master already emits these macros from Aro (ziglang/zig commit +b46a7f3a25a6, "sync aro & translate-c"); this is unnecessary once zttp +moves to a Zig release that contains it. + +Upstream-Status: To upstream [not yet submitted; workaround for Zig 0.16, fixed by ziglang/zig b46a7f3a25a6 on master] +--- + build.zig | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/build.zig b/build.zig +index 8fdf7d7..6ee8b5c 100644 +--- a/build.zig ++++ b/build.zig +@@ -149,6 +149,14 @@ pub fn build(b: *std.Build) void { + // on the build backend to pass it - so on Windows the translation silently + // targets the GIL ABI unless we define it here. + if (free_threaded and target.result.os.tag == .windows) translate.defineCMacro("Py_GIL_DISABLED", "1"); ++ // Zig 0.16's translate-c (Aro) predefines no RISC-V floating-point macros, ++ // so glibc's riscv bits/setjmp.h (reached via pthread.h) hits `#error ++ // unsupported FLEN`. Define what clang does for an lp64d target; Zig master ++ // already emits these itself. ++ if (target.result.cpu.arch.isRISCV() and target.result.cpu.has(.riscv, .d)) { ++ translate.defineCMacro("__riscv_flen", "64"); ++ translate.defineCMacro("__riscv_float_abi_double", "1"); ++ } + + const fixer = b.addExecutable(.{ + .name = "fix_cimport", +-- +2.43.0 + diff --git a/patches/zttp/0.0.34/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch b/patches/zttp/0.0.34/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch new file mode 100644 index 00000000000..5c110dc8d2a --- /dev/null +++ b/patches/zttp/0.0.34/0001-build.zig-define-RISC-V-float-ABI-macros-for-translate-c.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sun, 4 Oct 2026 04:45:00 +0200 +Subject: [PATCH] build.zig: define RISC-V float ABI macros for translate-c + +Zig 0.16's translate-c runs on Aro, whose predefined macros for RISC-V +stop at `__riscv` and `__riscv_xlen`: it never emits `__riscv_flen` or +`__riscv_float_abi_double`, which clang and GCC define for an lp64d +target. glibc's riscv `bits/setjmp.h`, pulled in by Python.h through +pthread.h, requires one of the `__riscv_float_abi_*` macros: + + /usr/include/bits/setjmp.h:35:3: error: unsupported FLEN + +so the CPython C-API translation fails and no manylinux_riscv64 wheel +can be built. musl's headers do not test these macros, so +musllinux_riscv64 builds unaffected. Reproduces on any host with +`zig translate-c -lc -target riscv64-linux-gnu`. + +Zig master already emits these macros from Aro (ziglang/zig commit +b46a7f3a25a6, "sync aro & translate-c"); this is unnecessary once zttp +moves to a Zig release that contains it. + +Upstream-Status: To upstream [not yet submitted; workaround for Zig 0.16, fixed by ziglang/zig b46a7f3a25a6 on master] +--- + build.zig | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/build.zig b/build.zig +index 8fdf7d7..6ee8b5c 100644 +--- a/build.zig ++++ b/build.zig +@@ -149,6 +149,14 @@ pub fn build(b: *std.Build) void { + // on the build backend to pass it - so on Windows the translation silently + // targets the GIL ABI unless we define it here. + if (free_threaded and target.result.os.tag == .windows) translate.defineCMacro("Py_GIL_DISABLED", "1"); ++ // Zig 0.16's translate-c (Aro) predefines no RISC-V floating-point macros, ++ // so glibc's riscv bits/setjmp.h (reached via pthread.h) hits `#error ++ // unsupported FLEN`. Define what clang does for an lp64d target; Zig master ++ // already emits these itself. ++ if (target.result.cpu.arch.isRISCV() and target.result.cpu.has(.riscv, .d)) { ++ translate.defineCMacro("__riscv_flen", "64"); ++ translate.defineCMacro("__riscv_float_abi_double", "1"); ++ } + + const fixer = b.addExecutable(.{ + .name = "fix_cimport", +-- +2.43.0 +