Repository navigation
fix(build): add <string_view> include + correct VmafCudaFunctions type name - #693
Merged
Merged
Conversation
…e name Two platform build blockers introduced by earlier PRs: 1. core/tools/vmaf.cpp used std::string_view (lines 856, 935) without #include <string_view>. Apple Clang does not pull it in transitively; Linux GCC/Clang do. Caused Build-macOS-Clang, Build-macOS-clang, Build-macOS-DNN, and FFmpeg-macOS-clang CI failures. 2. PR #516 (GPU resource-leak bundle) added cuModuleUnload teardown calls to 13 CUDA feature-extractor close() callbacks using the fabricated type VmafCudaFunctions. The type defined in core/src/cuda/common.h is CudaFunctions. Caused Docker, Build-Linux-GCC-all-backends, and Build-Windows-MSVC+CUDA CI failures. Fix 1: add #include <string_view> to vmaf.cpp include block. Fix 2: replace const VmafCudaFunctions* with const CudaFunctions* in all 13 affected CUDA feature .c files. No logic change in either fix; no score change; no public API change. Semgrep skipped locally (io_uring memlock OOM with 14 staged files — known host-side infrastructure issue per .pre-commit-config.yaml comment; CI runs semgrep on the correct ulimit and will gate). no digest needed: root-cause confirmed from CI log, no design alternatives no rebase impact: include addition and type-name correction touch no upstream-mirrored code or public API signatures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ure_extractor / test_opt Three test link targets were broken under the Sanitizers (ASan+UBSan) and ARM CPU builds: 1. test_iqa_helpers: libvmaf_feature_static_lib includes feature_extractor.cpp which calls vmaf_option_set(). vmaf_option_set is compiled in opt_cpp23_lib (ADR-0761), but the test's objects list omitted wave8_cpp23_objects (or any subset thereof). Fix: append wave8_opt_only_objects. 2. test_feature_extractor: objects list used wave8_cpp23_objects (includes read_json_model_cpp23_lib), but the test does not link pdjson.c (part of libvmaf_sources, not libvmaf_feature_static_lib), causing undefined symbol: json_open_buffer. The test does not load any models; it only needs opt_cpp23_lib for vmaf_option_set. Fix: switch to wave8_opt_only_objects. 3. test_opt: same pattern as test_feature_extractor. Switch to wave8_opt_only_objects. Also adds the wave8_opt_only_objects definition itself (was introduced by PR #688 on a parallel branch; landing it here prevents a conflict and makes the definition available to PR #688's rebase). no digest needed: root-cause confirmed from CI linker log no rebase impact: meson.build-only change; no C source or public API touched Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…inGW64) std::mutex::mutex() is not constexpr in GCC/MinGW libstdc++, so `constinit std::mutex g_lock` is ill-formed and causes a hard compile error on the Build -- Windows MinGW64 CI leg: error: 'constinit' variable 'g_lock' does not have a constant initializer error: call to non-'constexpr' function 'std::mutex::mutex()' MSVC's STL provides a constexpr std::mutex constructor, masking the issue on Windows MSVC builds. The fix removes constinit from g_lock; static-duration zero-initialisation already prevents any dynamic-init race at program start (the property constinit was intended to enforce). std::array<EnvRow, kTableCap> g_rows retains constinit (aggregate default-init is constant). Also corrects the file's SPDX identifier from BSD-3-Clause-Plus-Patent to BSD-2-Clause-Patent (ADR-1036). no digest needed: root-cause confirmed from MinGW64 CI log no rebase impact: single-file cpp change; no public API or upstream code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6 of 9 tasks
lusoris
added a commit
that referenced
this pull request
Jun 6, 2026
…leftover) (#731) PR #516 (GPU resource-leak bundle, commit aa17751) loaded and unloaded s->adm_cm_module correctly in init()/close(), but four cuModuleGetFunction call-sites in init_fex_cuda() referenced the bare identifier adm_cm_module instead of s->adm_cm_module. The symbol is a struct member (CUmodule at struct offset 96), not a local variable, so GCC emits: error: use of undeclared identifier 'adm_cm_module' on every CUDA-enabled build. PR #693 fixed the distinct VmafCudaFunctions typo in the same file but missed these four sites (lines 1393, 1396, 1401, 1405 pre-patch). Fix: prefix all four occurrences with s-> to match the established pattern used for s->adm_csf_module, s->adm_csf_den_module, and s->adm_dwt_module in the same function. No functional change. no rebase impact: pure missing-prefix fix, no API or struct layout change. Co-authored-by: Lusoris <lusoris@pm.me> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four categories of platform build blockers, all pure correctness fixes with no logic, score, or API changes:
core/tools/vmaf.cppusedstd::string_viewwithout#include <string_view>. Apple Clang does not pull it in transitively. Introduced by PR refactor(core): C++23 Wave bundle (#319 log + #232 gpu_dispatch_env + #136 opt+read_json_model + #154 feature_extractor + #198 cli_parse+vmaf) #531; caused 4 macOS CI jobs to fail.cuModuleUnloadcalls in 13 CUDAclose()callbacks using the fabricated typeVmafCudaFunctions— not defined anywhere. Correct type isCudaFunctions. Caused Docker, Linux-GCC-all-backends, and Windows-MSVC+CUDA failures.test_iqa_helperswas missingopt_cpp23_lib(needed forvmaf_option_setfromfeature_extractor.cpp);test_feature_extractorandtest_optincludedread_json_model_cpp23_libwithout itspdjsondependency. Introduceswave8_opt_only_objectsand fixes all three tests.constinit std::mutex g_lockingpu_dispatch_env.cppis ill-formed under GCC/MinGW libstdc++ (std::mutex::mutex()is notconstexprthere; MSVC provides aconstexprconstructor). Fix: dropconstinitfrom the mutex; static-duration zero-init already prevents dynamic-init races.Type
fix— bug fixChecklist
make format && make lintis green locally.meson test -C build.assertAlmostEqual(...)score in the Netflix golden Python tests.Bug-status hygiene (ADR-0165)
docs/state.mdupdated:T-STRING-VIEW-MISSING-INCLUDE-2026-06-04,T-CUDA-CLOSE-VMAFCUDAFUNCTIONS-2026-06-04, andT-MINGW64-CONSTINIT-MUTEX-2026-06-04added to Recently closed.Deep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note — no rebase-sensitive invariants: all fixes are include/type-name/build-graph corrections touching no upstream-mirrored code or public API.changelog.d/fixed/macos-docker-platform-unblock.mdadded.docs/rebase-notes.mdentry added.Reproducer
🤖 Generated with Claude Code