Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/build-pyorc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,14 @@ jobs:
path: python-wheels
persist-credentials: false

# Only some versions need patching (0.12.0's setup.py already passes
# -DSTOP_BUILD_ON_WARNING=OFF), so a missing directory is not an error.
- name: Patch pyorc source
run: git apply python-wheels/patches/pyorc/${{ env.PYORC_VERSION }}/*.patch
run: |
patches="$PWD/python-wheels/patches/pyorc/${PYORC_VERSION}"
if [ -d "$patches" ]; then
git apply -v "$patches"/*.patch
fi

- name: Stage the vendored Apache ORC/lz4/zstd licences
# setup.py downloads and compiles all three from source; none of their
Expand Down
1 change: 1 addition & 0 deletions docs/packages/pyorc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ versions:
- filename: pyorc-0.11.0-cp314-cp314t-manylinux_2_39_riscv64.whl
sha256: 9a83b8f46e268b5c78713e9647e0da6d1757acca735e47ce34f4e52e956e8705
requires-python: <4.0,>=3.6
- version: 0.12.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
From c332c54a506abef333f41f687088a1e95e4f5f75 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Tue, 8 Sep 2026 08:31:16 +0200
Subject: [PATCH] setup.py: silence -Werror=unused-parameter in liborc's
CpuInfoUtil.cc fallback stubs

Upstream-Status: To upstream [not filed: this session does not open issues/PRs against third-party repos]

liborc's CpuInfoUtil.cc gates its CPU-detection code on x86/ARM/PPC; any other
architecture (riscv64 included) falls into the '#else' stub branch, whose
no-op ArchParseUserSimdLevel/ArchVerifyCpuRequirements bodies leave
simdLevel/hardwareFlags/ci unused. liborc's CMakeLists.txt defaults
STOP_BUILD_ON_WARNING to ON, turning GCC's -Wunused-parameter into a hard
build error on any architecture that hits this branch; upstream's own CI
only ever builds x86/ARM/PPC, so it never trips this. Add explicit (void)
casts to the extracted source right after download, mirroring the existing
_patch_protobuf_version fixup.

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
setup.py | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/setup.py b/setup.py
index e00a766..ab3b15e 100644
--- a/setup.py
+++ b/setup.py
@@ -112,6 +112,30 @@ class BuildExt(build_ext):
tar_src.extractall(self.output_dir)
tar_src.close()

+ def _fix_cpuinfo_util_unused_params(self) -> None:
+ file_path = (
+ self.output_dir / f"orc-{self.orc_version}" / "c++" / "src" / "CpuInfoUtil.cc"
+ )
+ text = file_path.read_text(encoding="utf-8")
+ text = text.replace(
+ "bool ArchParseUserSimdLevel(const std::string& simdLevel, int64_t* hardwareFlags) {\n"
+ " return true;\n"
+ " }",
+ "bool ArchParseUserSimdLevel(const std::string& simdLevel, int64_t* hardwareFlags) {\n"
+ " (void)simdLevel;\n"
+ " (void)hardwareFlags;\n"
+ " return true;\n"
+ " }",
+ 1,
+ )
+ text = text.replace(
+ "void ArchVerifyCpuRequirements(const CpuInfo* ci) {}",
+ "void ArchVerifyCpuRequirements(const CpuInfo* ci) { (void)ci; }",
+ 1,
+ )
+ file_path.write_text(text, encoding="utf-8")
+ logging.info("Silenced unused-parameter warnings in CpuInfoUtil.cc's non-x86/ARM/PPC stubs")
+
def _patch_protobuf_version(self, version, hash) -> None:
file_path = (
self.output_dir
@@ -372,6 +396,7 @@ class BuildExt(build_ext):
)
if not os.path.isdir(self.output_dir / f"orc-{self.orc_version}"):
self._download_source()
+ self._fix_cpuinfo_util_unused_params()

if self.download_only:
logging.info("Only downloaded the ORC library source. Skip build_ext")
--
2.50.1 (Apple Git-155)

Loading