Repository navigation
Description
The Ubuntu app build (build-project.yaml ubuntu-build, the OBS-Studio-Rust variant) fails on current master at -Werror=pedantic in shared/obs-scripting. PR CI cannot see it — PRs run no app build, and the Push workflow builds no OBS app — so this only shows in the nightly / a dispatched Scheduled run.
Evidence
Dispatched Scheduled on fix/2626-msvc-w4 (= origin/master c2af3f9c3 plus two Windows-only commits, so nothing in this failure is branch-specific), job Build 🧱 / Ubuntu 🐧 (OBS-Studio-Rust):
build_ubuntu/shared/obs-scripting/swig/swigpyrun.h:2610:22: error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic]
build_ubuntu/shared/obs-scripting/swig/swigpyrun.h:2611:19: error: ... [-Werror=pedantic]
build_ubuntu/shared/obs-scripting/swig/swigpyrun.h:2612:18: error: ... [-Werror=pedantic]
build_ubuntu/shared/obs-scripting/swig/swigpyrun.h:2613:23: error: ... [-Werror=pedantic]
shared/obs-scripting/obs-scripting-python.h:157:57: error: ISO C does not support '__FUNCTION__' predefined identifier [-Werror=pedantic]
169 | #define py_error() py_error_(__FUNCTION__, __LINE__)
shared/obs-scripting/obs-scripting-python-frontend.c.h:295:17: note: in expansion of macro 'py_error'
cc1: all warnings being treated as errors
Same run: Build 🧱 / Flatpak 📦 also failed (step Build Flatpak Manifest 🧾, not yet triaged), and the Windows/macOS app jobs died earlier at Install the Rust toolchain 🦀 (infrastructure, unrelated).
Cause
#2643 / #2623 added -Wpedantic to the Clang and GNU C option lists in cmake/common/compiler_common.cmake. shared/obs-scripting compiles:
- SWIG-generated code (
swig/swigpyrun.h, generated into the build dir) that converts function pointers to object pointers — a deliberate, standard SWIG idiom; obs-scripting-python.h:157, which uses__FUNCTION__, a GNU extension that-Wpedanticrejects in strict C.
Neither is first-party code: one is generated, one is upstream glue. The vendored/generated-code exemption in #516 applies.
Suggested fix
A target-scoped suppression on the obs-scripting-python module (shared/obs-scripting/cmake/python.cmake, where the MSVC /wd4100;/wd4204 and /wd4152 exemptions already live), i.e. -Wno-pedantic (or -Wno-error=pedantic for the generated SWIG include path only) for the GNU/Clang C language on that target, plus the same for the frontend that includes obs-scripting-python-frontend.c.h. Do not edit the SWIG output, and do not weaken -Wpedantic globally.
RED/GREEN is the app-build lane: uv run ci/local_gate.py --lane tiers does not cover it; a gh workflow run scheduled.yaml --ref <branch> (Ubuntu app build) is the smallest reproduction, or bosn run --task ubuntu if a local native tree exists.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 27, 2026
Claiming: investigation
Plan (this tick):
shared/obs-scriptingand confirm both diagnostics belong to code we do not own:swig/swigpyrun.his SWIG-generated (-external-runtime) andobs-scripting-python.h:157is the upstream glue macro using__FUNCTION__.obs-scriptingtarget, next to the existing-Wno-cast-qualline that already cites build: Maximum C/C++ warning strictness with -Werror on every platform (cross-compiled with soldr) #516 for the same generated header (shared/obs-scripting/cmake/python.cmake). No global weakening of-Wpedantic, no edit to generated output.Scheduled/ Ubuntu 🐧 (OBS-Studio-Rust)dispatched on the branch), since PR CI does not build the app. I will post the run link with the result.zackees commentedon Oct 27, 2026
/ready
zackees commentedon Oct 27, 2026
Claiming: obs-scripting -Wpedantic exemption
Both diagnostics are in code we do not own —
swig/swigpyrun.his generated byswig -external-runtimeandobs-scripting-python.h:157is the upstreampy_error()macro around__FUNCTION__— so the fix is the target-scoped suppression the issue suggests, placed beside the existing-Wno-cast-qualexemption for the same generated header (shared/obs-scripting/cmake/python.cmake, #516). No generated file is edited and-Wpedanticstays in the global C lists (a new pin,ci/test_scripting_pedantic_exemption.py, asserts both).PR: #2696 (draft until the lane reports).
175e351a0: the pin fails on master —-Wno-pedanticis not in the obs-scripting target options.5ab5211b2: the flag; pin passes,uv run ci/msvc_flags.pyclean,ci.test_msvc_flags+ci.test_uv_run19 OK, ruff clean.Scheduledon the branch, run https://github.com/obs-rust/obs-studio/actions/runs/40583713632 (Ubuntu 🐧 (OBS-Studio-Rust) job).build(obs-scripting): Extend the -Wpedantic exemption to the SWIG wra…
plugins(obs-outputs): Use __func__ in librtmp so -Wpedantic accepts it (
zackees commentedon Oct 27, 2026
Progress on #2695 — the first dispatched Ubuntu run (
workflow_dispatchon the branch) got pastobs-scriptingand revealed two more members of the same class, both now in PR #2696:obspythonPYTHON_wrap.c/obsluaLUA_wrap.cfail on the same "function pointer to object pointer type" pedantic error — theobspythonandobsluatargets now carry-Wno-pedanticbeside their existing-Wno-cast-qual, and the pin covers all three SWIG targets;__FUNCTION__(amf.c 16, hashswf.c 7, handshake.h 22, rtmp.c 114 sites), soobs-outputsfails next. Fixed as a token-for-token__func__swap in the vendored files rather than a target-scoped-Wno-pedanticonobs-outputs, which would also drop the diagnostic for our own code in that plugin.Second dispatched run in flight on the branch: https://github.com/obs-rust/obs-studio/actions/runs/40585658256
zackees commentedon Oct 27, 2026
The Ubuntu app build passes on the branch now: dispatched
Scheduledrun 40585658256, jobBuild 🧱 / Ubuntu 🐧 (OBS-Studio-Rust)success, with PR CICI Gate ✅green (Tier 2 Linux tests ON/OFF included).Final shape of PR #2696 (queued, handed to the coordinator):
swig/swigpyrun.h,swig/swigluarun.h(generated) and thepy_error()__FUNCTION__macro-Wno-pedanticonobs-scripting, beside the-Wno-cast-qualexemption that already exists there (#516)obspythonPYTHON_wrap.c,obsluaLUA_wrap.c(generated)-Wno-pedanticonobspython/obslua, beside their-Wno-cast-qual__FUNCTION__amf.c16,hashswf.c7,handshake.h22,rtmp.c114)__func__(standard C99, same semantics) — not a target-scoped suppression, soobs-outputskeeps the diagnostic for our own code-Wpedanticstays in the global C lists, pinned by the newci/test_scripting_pedantic_exemption.py.Not covered here, and unrelated to this issue: the same first run also saw
Build 🧱 / Flatpak 📦fail inBuild Flatpak Manifest 🧾(still untriaged as the issue notes), and the run was started on a branch whose Windows/macOS app jobs died atInstall the Rust toolchain 🦀.zackees commentedon Oct 27, 2026
Landed as #2696 (merge commit
1369daf30, merged 2026-10-27T21:46:04Z). What it changes — all three members of the same-Wpedanticclass inshared/obs-scripting:swig/python.cmake: target-scoped-Wno-pedanticfor the SWIG Python runtime (the generatedswigpyrun.hfunction-pointer-to-object-pointer idiom).obs-scripting-python-frontend.c.h).plugins/obs-outputslibrtmp:__FUNCTION__->__func__in first-party code so-Wpedanticaccepts it;python.cmakereformatted by gersemi in the same PR.No global weakening of
-Wpedantic; the generated SWIG output is not edited.Verification: dispatched
Scheduledon the branch (run 40585658256) —Build 🧱 / Ubuntu 🐧 (OBS-Studio-Rust)success, the only lane that can see this failure (PR CI runs no OBS app build). PRCI Gate ✅and Fast Gate green.Left over, not part of this PR: the same dispatched run reported
Build 🧱 / Flatpak 📦failing atBuild Flatpak Manifest 🧾, which the issue text lists as untriaged. That is a separate failure class and needs its own issue rather than a rider on this one.build(obs-scripting): Exempt the SWIG Python runtime from -Wpedantic (o…