feat(pkg): compat.opencv 合一(源码直编 5.0.0 + FFmpeg videoio)+ compat.ffmpeg 瘦身#79
Merged
Conversation
Sunrisepeak
added a commit
that referenced
this pull request
Jul 18, 2026
fetch 'compat.opencv@4.13.0' fails deterministically (2/2) on the windows leg under mcpp 0.0.97. Not investigating: the install() CMake form is replaced wholesale by the source-build compat.opencv in the unification PR (#79); until then the member covers linux+macos.
Sunrisepeak
force-pushed
the
feat/compat-opencv-unification
branch
from
July 18, 2026 16:58
f46a2be to
06f1897
Compare
Sunrisepeak
added a commit
that referenced
this pull request
Jul 18, 2026
…78) * ci: mcpp 0.0.97 — drop the mcpp#232 index-refresh pre-step, retire per-package module smoke jobs 0.0.97 carries the default-namespace index redirect (R6), the synchronous nasm bootstrap (#232), obj-path disambiguation (#233), spacey-defines quoting (#234) and purview-include tracking (#235). The three module smoke jobs (imgui-module/ffmpeg-module/opencv-module) and the tinyhttps smoke step are deleted — the module packages are ordinary workspace members now (next commit), so 'workspace' is the single build/run channel. * feat(tests): public module packages as workspace members (zero shell) tinyhttps/imgui/ffmpeg/opencv consume their bare names from THIS checkout via a member-level '[indices] default = { path = "../../.." }' (mcpp >= 0.0.97). Test sources are line-for-line ports of the smoke consumers (assertions unchanged); ffmpeg/opencv/imgui members are cfg(linux)-gated to the CI-validated surface with no-op mains elsewhere. The four reseeding smoke shells are deleted. Notes: - exactly ONE [indices] entry per member: xlings fails silently with >1 project-scoped index repo (mcpp#238); root-level centralization (#224) is deferred until that lands. - the old smoke's llvm@20.1.7 pin for imgui is dropped: it predates gcc16 module support; imgui-m upstream CI builds with gcc@16.1.0 (verified locally: member passes with the workspace default toolchain). * docs: workspace-only testing — README, schema/CI reference, add-package skill, design doc Also retires two-generations-stale CI descriptions (detect/smoke-examples/ run_example.sh) from docs/repository-and-schema.md. * ci: gate the install()-form opencv member off windows fetch 'compat.opencv@4.13.0' fails deterministically (2/2) on the windows leg under mcpp 0.0.97. Not investigating: the install() CMake form is replaced wholesale by the source-build compat.opencv in the unification PR (#79); until then the member covers linux+macos.
…deoio backend; compat.ffmpeg slimmed B0: the old install()-CMake compat.opencv (4.13) is replaced by the source-build form (per the one-compat.opencv decision); compat.opencv5 stays as a transition alias until the opencv module package switches. B1 (v2 regen, mcpp 0.0.97): de-stub — sources are real tarball paths (385 files compressed to 19 dir/brace globs, #228), flags on real-path globs; only fonts/CL-kernels/jpeg12+16 re-compiles stay in build.mcpp (group-prefixed stub basenames dodge mcpp#239). WITH_FFMPEG=ON reference build; descriptor deps on compat.ffmpeg 8.1.2 (first compat->compat dependency). 111KB -> 100KB. B4: compat.ffmpeg sources 2281 explicit files -> 28 globs (expansion verified file-for-file identical; every other section byte-identical). 337KB -> 267KB. tests/examples/opencv rewritten for compat.opencv 5.0.0 with a real mp4 encode->decode roundtrip via CAP_FFMPEG (R3 acceptance at the compat layer); passes locally. DO NOT MERGE before mcpp#240 (post-#233 link inputs miss the disambiguated object names when dep and consumer share a source basename — consumers named src/main.cpp would break) ships in a release and the CI pin is bumped.
Sunrisepeak
force-pushed
the
feat/compat-opencv-unification
branch
from
July 18, 2026 17:28
06f1897 to
c610e07
Compare
…et package (R4)
- pkgs/c/compat.opencv-unifont.lua: data-only asset package for the
upstream WenQuanYiMicroHei.ttf.gz (GLOBAL = the pinned opencv_3rdparty
raw url, CN = mcpp-res/opencv@unifont-1.0.0, sha256-pinned; raw .gz
payloads are parked byte-preserved in the store's shared runtimedir,
so the descriptor carries an asio-style anchor-TU mcpp shell).
- compat.opencv feature `unifont` (mcpp 0.0.97 features now gate deps +
defines): pulls the asset package and defines HAVE_UNIFONT; the
embedded build.mcpp sees MCPP_FEATURE_UNIFONT=1 and hex-embeds the
compressed font as builtin_font_uni.h (OcvBuiltinFontUni), byte-
faithful to cmake's ocv_blob2hdr. Payload located via the store
runtimedir convention (no MCPP_DEP_<NAME>_DIR contract var yet).
- tests/examples/opencv-unifont member: long-form feature dependency;
asserts FontFace("uni") usability (that builtin only exists under
HAVE_UNIFONT — the probe itself) + real CJK putText ink. Passes
locally; default member regression clean.
…tive sources (R5, compat layer) Reference build switches to BUILD_LIST+dnn (vendored protobuf compiled, flatbuffers/dlpack header-only, mlas incl. 8 .S kernels); the generator cross-asserts the feature-off TU set is file-for-file identical to the non-dnn reference build (BASE_BLD env). features.dnn = 309 sources -> 23 globs + HAVE_OPENCV_DNN. Profile-drifting snapshot trio proved benign (build-dir path now neutralized by rewrite; HAVE_OPENCV_DNN consumed by no TU -> featureDefines; version string cosmetic) so no variant machinery. ISA overlays now keyed per (group, ISA); -isystem dirs join include_dirs (protobuf headers were dropped before). Three curated exceptions, each commented in the generator: mlas group _GNU_SOURCE; platform.cpp -include unistd.h (upstream leans on transitive includes); MlasHGemmSupported stub (declared+called but not vendored — upstream's archive-selective linking hides it, mcpp's whole-object linking doesn't; false = correct fallback). Second same-source re-compile case (mlas_threading.cpp) rides the tu-stub manifest with a new `?dnn` feature-guard prefix. New member tests/examples/opencv-dnn (blobFromImage NCHW value check + Net; test file deliberately not named dnn.cpp — collides with the dep's modules/dnn/src/dnn.cpp, #233-family test-scan gap, noted on #240). Local: dnn member + feature-off roundtrip + unifont + default members all green. Descriptor 130KB.
…ce-build OpenCV mcpp 0.0.98 closes the obj-path disambiguation follow-ups that gated the source-build compat.opencv unification: #240 (link inputs now follow the disambiguated object names — a dependency + consumer sharing a source basename like src/main.cpp no longer 'obj/main.o missing and no known rule', which is near-universal since OpenCV ships modules/*/src/main.cpp) and #239 (absolute/`..` dep-generated source paths sanitized so objects stay under obj/). Bump the pin in all four places (env + 3 matrix legs). Raise the workspace job timeout 60 -> 150. The previous run was cancelled at the 60-min cap mid-build (not a #240 error): a full run — forced because this workflow file is in the diff — serially source-builds several OpenCV variants on one runner (compat.opencv base + unifont + dnn, plus the transition-window compat.opencv5 pulled by opencv-module). 150 covers the one-time cold full build; the registry cache amortizes subsequent runs, and the transition double-build retires when opencv-m moves to compat.opencv. Floor comments elsewhere stay "mcpp >= 0.0.97" — they mark where a grammar feature first landed, not the CI pin.
Sunrisepeak
marked this pull request as ready for review
July 18, 2026 23:16
Sunrisepeak
added a commit
that referenced
this pull request
Jul 19, 2026
…v5 transition alias opencv-m v0.0.3 switched its dependency from the transitional compat.opencv5 alias to the unified compat.opencv (source build + FFmpeg videoio). With the module package now on compat.opencv, the alias has no remaining consumers, so this bump completes the transition decided in #79: - pkgs/o/opencv.lua: 0.0.2 -> 0.0.3 (v0.0.3 tarball GLOBAL + CN mirror, sha256 92ffae8b…; byte-identical, mirror-cn-reachable verified). Form A — the compat.opencv dep lives in the tarball's mcpp.toml. - delete pkgs/c/compat.opencv5.lua and the tests/examples/opencv5 member (redundant with the opencv base member; opencv-module now exercises compat.opencv transitively via opencv 0.0.3). - tests/examples/opencv-module: pin opencv 0.0.3, fix compat.opencv comments. - README + opencv.lua comments: compat.opencv5 -> compat.opencv, note the alias is retired. xpkg parse + lua load green locally on mcpp 0.0.98.
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.
内容(用户决策 1/2 + R3 视频主线 + R4 unifont)
compat.opencv(4.13)删除,compat.opencv= 源码直编 5.0.0;compat.opencv5过渡期保留(已发布 opencv 0.0.2 模块包依赖它),v0.0.3 切换后删。deps = { ["compat.ffmpeg"] = "8.1.2" }(compat 依赖 compat 首例)。111KB → 102KB。compat.opencv-unifont(上游 raw url + CN 镜像 mcpp-res/opencv@unifont-1.0.0)+compat.opencvfeatureunifont(0.0.97 features 的 deps/defines 门控)+ build.mcpp 按 MCPP_FEATURE_UNIFONT 嵌字体;成员tests/examples/opencv-unifont断言FontFace("uni")+ CJK putText 出墨(该内建字体面只在 HAVE_UNIFONT 下存在,本身即探针)。本地验证
OpenCV 5.0.0 FFmpeg mp4 roundtrip ok: 10 frames encoded+decoded (9 backends)。mcpp test -p opencv✅ ·-p opencv-unifont✅(feature 依赖解析 + 字体嵌入 + CJK ink)· 默认成员回归 ✅ · 3 个新/改描述符xpkg parse+ mirror lint ✅。过程发现(已提 issue)
mcpp#240(合并门槛)、#239(对象树逃逸)、#241(build.mcpp 缺 MCPP_DEP__DIR,unifont 暂用 store runtimedir 约定自寻)。