#5444 declared SharedData's scalar members as SharedValue<T>. The ABI
check lifts the struct body out of zm_monitor.h into a standalone probe,
but not the SharedValue template, so those members failed to compile and
dropped out. The probe came to 768 bytes and the size and control_state
offset asserts failed at -m64, which made the CI Build Warnings job fail
on every master PR. The "does not name a type" errors were not printed,
because only the static assert lines were.
Copy the SharedValue template and its static_asserts into the probe,
recognise SharedValue<type> members, and print every compiler error when
the probe fails to build.
Checked against the current header (888 bytes, 52 members, the same
count as before #5444), the header before #5444 (also passes), and a
header with capture_fps back to a plain double and epadding1 removed
(fails at -m32 with capture_fps at 20).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every CI runner is 64bit, so nothing in CI exercised the 32bit SharedData
layout that zmc/zma/zms, ZoneMinder::Memory and web/includes/Monitor.php
all have to agree on. The i386 alignment divergence that broke the 32bit
build was only caught downstream.
utils/check-shareddata-abi.py lifts the struct body and its static_asserts
out of zm_monitor.h, compiles them standalone at -m32 and -m64, and
requires the size and every member offset to match. Compiling only the
struct avoids needing a 32bit copy of the ffmpeg, mysql and curl headers;
gcc-multilib alone is enough and the check takes about a second, so it
runs before the build rather than after it.
The expected size is never duplicated in the script. It comes from the
assertions in the header, so there is one source of truth and the script
cannot drift from it. Removing the assertions is itself reported as a
failure, since deleting the guard is the tempting way to silence a 32bit
build error.
Verified by reverting the epadding members, which reproduces the original
downstream failure (880 == 888) and additionally names capture_fps,
startup_time and control_state, and by deleting the assertions, which is
reported as a missing guard.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>