Skip to content

infra: Ubuntu and Flatpak app builds fail on -Wmissing-prototypes in SWIG-generated obs-scripting sources (#2678 regression) #2703

Closed

Description

@zackees

The release/dispatch-only app builds are red on master after #2678 enabled -Wmissing-prototypes/-Wstrict-prototypes tree-wide: the SWIG-generated sources in shared/obs-scripting declare their entry points without prototypes, so obs-scripting does not compile and both Linux app lanes stop before packaging.

This is the same class #2696 fixed for -Wpedantic (#2623 → #2643); that exemption is per-diagnostic, so it does not cover the flags #2678 added three hours later.

Evidence

Scheduled Repository Actions dispatched on fix/2699-app-build-soldr at c7769380 (run 40591042433, master d9be04468 + that one workflow commit):

  • Build 🧱 / Ubuntu 🐧 (OBS-Studio-Rust) — failure, job 122495240031
  • Build 🧱 / Flatpak 📦 — failure, job 122495240167

Both die in the obs-scripting target:

shared/obs-scripting/obs-scripting-lua-frontend.c.h:320:6: error: no previous prototype for 'add_lua_frontend_funcs' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua-source.c.h:766:6: error: no previous prototype for 'undef_lua_script_sources' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1075:6: error: no previous prototype for 'obs_lua_script_load' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1089:15: error: no previous prototype for 'obs_lua_script_create' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1124:6: error: no previous prototype for 'obs_lua_script_unload' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1205:6: error: no previous prototype for 'obs_lua_script_destroy' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1244:19: error: no previous prototype for 'obs_lua_script_get_properties' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1267:6: error: no previous prototype for 'obs_lua_script_save' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1294:6: error: no previous prototype for 'obs_lua_load' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-lua.c.h:1320:6: error: no previous prototype for 'obs_lua_script_unload' [-Werror=missing-prototypes]
shared/obs-scripting/obs-scripting-python-frontend.c.h:418:6: error: no previous prototype for 'add_python_frontend_funcs' [-Werror=missing-prototypes]
ninja: build stopped: subcommand failed.

The list above is what the two lanes reached before ninja stopped (cc1: all warnings being treated as errors, -Werror): Flatpak 📦 logged the ten Lua ones, Ubuntu 🐧 added obs-scripting-python-frontend.c.h:418. The obspython/obslua SWIG wrappers (obspythonPYTHON_wrap.c, obsluaLUA_wrap.c) are the same generated code and were not reached, so expect the same diagnostics once the first target compiles — unverified, since neither lane got that far.

Why no PR lane caught it

The same SHA's pull-request run (40591038733) is green: no PR-triggered lane builds the OBS app or shared/obs-scripting, and schedule/dispatch/the release gate are the only paths that do. #2678 therefore merged with this compile failure already in it (its own RED/GREEN evidence was a -fsyntax-only replay over compdb TUs).

Fix shape

Generated code — swig -external-runtime output and the *_wrap.c files — cannot be edited, so the target opts out of that one diagnostic, exactly as #2696 did beside the existing -Wno-cast-qual (#516) exemptions:

  • shared/obs-scripting/cmake/lua.cmake:33 (obs-scripting): -Wno-cast-qual → add -Wno-missing-prototypes
  • shared/obs-scripting/cmake/python.cmake:56 (obs-scripting): -Wno-cast-qual;-Wno-pedantic → add -Wno-missing-prototypes
  • shared/obs-scripting/obspython/CMakeLists.txt:53, shared/obs-scripting/obslua/CMakeLists.txt:34: same addition for the wrapper targets

Every addition stays inside the C-only COMPILE_LANG_AND_ID:C,... generator expression and the global lists (cmake/common/compiler_common.cmake, cmake/linux/compilerconfig.cmake) keep -Wmissing-prototypes, so the #2624 ratchet still applies to first-party code. A pin test beside ci/test_scripting_pedantic_exemption.py is the offline RED/GREEN; the real proof is a workflow_dispatch of Scheduled on the fix branch showing Ubuntu 🐧 (OBS-Studio-Rust) and Flatpak 📦 green.

Activity

  1. added
    infra
    ready
    on Oct 27, 2026
  2. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Claiming: obs-scripting -Wmissing-prototypes exemption (SWIG-generated sources)

    Plan:

    1. RED: ci/test_scripting_missing_prototypes.py pins -Wno-missing-prototypes on all three SWIG targets inside the C-only COMPILE_LANG_AND_ID generator expression, and pins that the global C lists keep -Wmissing-prototypes (same shape as ci/test_scripting_pedantic_exemption.py). It fails on master.
    2. GREEN: extend the existing -Wno-cast-qual/-Wno-pedantic exemptions in shared/obs-scripting/cmake/{lua,python}.cmake and obspython/obslua's CMakeLists.txt with the one diagnostic. No generated file edited, no global flag relaxed.
    3. workflow_dispatch of Scheduled on the branch: Ubuntu 🐧 (OBS-Studio-Rust) and Flatpak 📦 must go green (that is the only path that builds these). One PR, Refs #2624 / Fixes #2703.
  3. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Evidence from run 40595018476 (job 122510595427, PR #2704's head ec608e3 applied): the Ubuntu OBS-Studio-Rust app build now gets past shared/obs-scripting and stops on first-party C instead:

    FAILED: libobs-opengl/CMakeFiles/libobs-opengl.dir/build/opengl.nix-wayland+.h.c.o
    .../libobs-opengl/gl-wayland-egl.c.h:90:23: error: no previous prototype for 'gl_wayland_egl_windowinfo_create' [-Werror=missing-prototypes]
    

    On master, gl-wayland-egl.c.h:90 defines struct gl_windowinfo *gl_wayland_egl_windowinfo_create(const struct gs_init_data *info) with no declaration in scope at that point, so -Werror=missing-prototypes rejects it. This is not generated code, so the exemption does not cover it: the fix is a prototype (or a static definition), and the global flag should stay. Ninja stops at the first failure, so expect more of these behind it in libobs-opengl (and possibly elsewhere) once this one is fixed.

    The Flatpak lane's failure in the same run was a separate regression from #2702 (the action passed uv a runner-side path inside the container); #2707 fixes that.

  4. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Reopening: #2704 closed this on merge, but its own Scheduled dispatch (run 40595018476) shows the acceptance criterion is not met — the Ubuntu OBS-Studio-Rust lane still fails, just one file further on:

    FAILED: libobs-opengl/CMakeFiles/libobs-opengl.dir/build/opengl.nix-wayland+.h.c.o
    .../libobs-opengl/gl-wayland-egl.c.h:90:23: error: no previous prototype for 'gl_wayland_egl_windowinfo_create' [-Werror=missing-prototypes]
    

    #2704 did fix what it claimed (the SWIG shared/obs-scripting sites — I verified the lanes get past them), so the remaining red is the first-party libobs-opengl case, plus the Flatpak lane's separate action regression that #2707 fixes. Keeping this open until both lanes are green on Scheduled, since a closed issue here is how the next tick loses the thread.

  5. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Progress: next diagnostic in the class, and the PR is up.

    PR #2710 (draft) makes gl_wayland_egl_windowinfo_create static in libobs-opengl/gl-wayland-egl.c.h:90 — the exact file/line this issue's reopening comment quoted. It is reached only through its gl_winsys_vtable slot in the same file, and the X11 sibling gl_x11_egl_windowinfo_create is already static, so this is the same fix the X11 source already has. A new ci/test_platform_missing_prototypes.py pins the class offline (RED on master: libobs-opengl/gl-wayland-egl.c.h:90: gl_wayland_egl_windowinfo_create; GREEN after the one-word fix), so the next platform definition that hides from -Wmissing-prototypes fails a PR lane instead of waiting for a dispatch.

    Local evidence: the new test FAILs on master and passes after the fix; ci.test_ci_pre + ci.test_ci_toml (52 tests) and ci/test_scripting_missing_prototypes.py (2) stay green; clang-format --dry-run --Werror clean on the changed header.

    Acceptance for this issue is the Ubuntu and Flatpak app lanes passing, so the PR stays a draft until a dispatch on this branch confirms the lane gets past libobs-opengl. If -Werror stops on another diagnostic in a later TU, this PR lands anyway and the next class goes here rather than being folded in (-Werror reports one diagnostic per target, so a dispatch list is a prefix, not the whole class).

  6. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Dispatch result on PR #2710's head (run 40602178977, Scheduled Repository Actions on fix/2703-wayland-egl-static):

    • Ubuntu 🐧 (OBS-Studio-Rust) app build: SUCCESS. The lane compiles past libobs-opengl and completes — the reopened criterion for this issue is met on the Ubuntu side.
    • Flatpak 📦: failure in step 14 Build Flatpak Manifest 🧾, annotation Build failed: Error: The process '/app/bin/xvfb-run' failed with exit code 1. That is the documented independently-flaky sandbox step; the log has no missing-prototypes/gl-wayland-egl hit. Needs a single-job rerun, not a code change.

    PR #2710 is ready for the queue; once the Flatpak job is rerun and clears, this issue's acceptance criterion is satisfied on both app lanes.

  7. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Progress: the remaining two Flatpak-only first-party sites are up as PR #2717, and a Scheduled dispatch on its head now has both app lanes green:

    • plugins/aja/audio-repack.c.h — check_buffer and the repack helpers defined without a prototype (7 findings offline; the 5 the lane reaches under USE_SIMD).
    • plugins/linux-jack/jack-wrapper.c.h — jack_process_callback (the next diagnostic after aja).

    Both are unity-group helpers reached only inside their own translation unit, so they are now static — the #2710 shape — and each has an offline pin (ci/test_aja_missing_prototypes.py, ci/test_linux_jack_missing_prototypes.py) that fails on master and passes here.

    Dispatch 40614011152 on 8227cd98f: Build 🧱 / Flatpak 📦 success, Build 🧱 / Ubuntu 🐧 (OBS-Studio-Rust) success. With #2704/#2710/#2712 already merged, that closes this issue's acceptance criterion on a branch; it closes on merge.

  8. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Acceptance criterion met on master: PR #2717 merged as 25eb37bdb (2026-10-28T02:01:42Z), on top of #2704/#2710/#2712.

    Evidence on the branch head 8227cd98f (run 40614011152, Scheduled Repository Actions, dispatched from fix/2703-aja-audio-repack-prototypes; the merged head 8780febcd carries the same functional commits plus one ./lint --fix re-wrap):

    • Build 🧱 / Flatpak 📦 — success (job 122572800771): compiles past shared/obs-scripting SWIG sources, plugins/aja/audio-repack.c.h and plugins/linux-jack/jack-wrapper.c.h, and finishes the manifest build.
    • Build 🧱 / Ubuntu 🐧 (OBS-Studio-Rust) — success (job 122572800754).

    The run's overall failure is the CEF Chromium Support job (#1864), by design, not an app lane.

    What landed: the SWIG-generated obs-scripting sources are exempted from -Wmissing-prototypes/-Wstrict-prototypes per-target in shared/obs-scripting/cmake/{lua,python}.cmake and the two wrapper CMakeLists.txt (#2704/#2712), the Wayland windowinfo factory went static (#2710), and the last two Flatpak-only unity helpers — check_buffer/repack_* in aja and jack_process_callback in linux-jack — went static with offline pins ci/test_aja_missing_prototypes.py and ci/test_linux_jack_missing_prototypes.py (#2717). The global -Wmissing-prototypes ratchet from #2624 still applies to first-party code.

    Nothing left under this issue's criterion; closing. Any new first-party definition that hides from the diagnostic fails the offline pins in PR lanes now, so the next regression surfaces as a PR red instead of a dispatch-only app-build failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions