REST API and C++ library for parsing ODB++ Design archives
Implementation plan for replacing the
linux-releasepreset/binaries with thelinux-dynamic-releasepreset/binaries as the main Linux build. Source request:docs/linux-dynamic-release-plan-prompt.md
Replace every active reference to the linux-release CMake preset (builds,
binaries, Docker images, CI workflows, artifact packaging, docs, helper
scripts) with the linux-dynamic-release preset, and validate end-to-end.
linux-release links vcpkg dependencies (protobuf in particular) statically
into both libOdbDesign.so and the OdbDesignServer executable. At runtime two
independent copies of the protobuf descriptor pool are loaded, which leads to
dereferencing uninitialized pointers and crashes (release-only SIGABRT on
GET /filemodels/<design>/matrix/matrix).
linux-dynamic-release sets VCPKG_TARGET_TRIPLET=x64-linux-dynamic, so
protobuf/gRPC/libarchive/zlib/etc. are linked as shared libraries and a
single runtime copy is used process-wide. Both presets (configure/build/test)
already exist in CMakePresets.json.
| Item | Decision |
|---|---|
linux-release presets in CMakePresets.json |
Kept but unused. linux-mingw-w64-release inherits from the configure preset, so removal would require rework with no benefit. |
Historical docs (plan_docs/*, docs/grpc/* dev plans, docs/workflow-optimization-analysis.md, docs/crash issue.txt) |
Untouched — they are records of past work. |
Disabled workflows (.github/workflows/disabled/*) |
Updated for consistency if ever re-enabled. |
code-coverage.yml (uses linux-debug) |
Out of scope — it never used linux-release, and staying on the static debug build keeps the coverage baseline comparable. |
| k8s manifests / compose files | No change needed — they consume the published image, which is rebuilt from the updated Dockerfiles/workflows. |
Copy vcpkg_installed/x64-linux-dynamic/lib/*.so* (plus ossl-modules/) next
to the server binary in both the Docker runtime image and the CI artifact zip.
The existing LD_LIBRARY_PATH=/OdbDesign/bin env in both Dockerfiles already
makes them discoverable.
Dockerfile, Dockerfile.prebuilt, and local scripts; OpenSSL 3
providers resolve because ossl-modules/ sits next to libcrypto.so.ldd-filtered copyRun ldd on the built binaries in the build stage and copy only the resolved
dependencies.
vcpkg export a runtime packageUse vcpkg export to produce a standalone runtime bundle.
vcpkg export is poorly supported for dynamic Linux triplets,
adds a slow extra step, and duplicates what a glob copy already achieves.Recommendation: Option A. Simplicity and robustness win; the size cost is acceptable.
Dockerfile
vcpkg install --triplet x64-linux-dynamic (the old static pre-install
would build packages the dynamic build never uses).cmake --preset linux-dynamic-release /
cmake --build --preset linux-dynamic-release.out/build/linux-dynamic-release/... and add
COPY --from=build .../vcpkg_installed/x64-linux-dynamic/lib/*.so* ./bin/
plus the ossl-modules/ directory.Dockerfile.prebuilt
COPY ./artifacts/*.so ./bin/ → COPY ./artifacts/*.so* ./bin/ so
versioned libraries (libarchive.so.13, libprotobuf.so.33.x, …) ship..github/workflows/cmake-multi-platform.yml
linux-release → linux-dynamic-release.--triplet x64-linux-dynamic;
macOS keeps its default triplet (split into two conditional steps)../*.so → ./*.so*..github/workflows/vcpkg-cache-warm.yml
warm-linux warms both triplets: static (still consumed by
code-coverage.yml’s linux-debug) and dynamic (new; must be pushed to
the GitHub Packages NuGet feed so future builds hit the cache).disabled/test-runtime.yml, disabled/codeql.yml:
preset matrix entry updated to linux-dynamic-release.scripts/compress-artifacts.sh (paths + vcpkg libs + zip
glob), scripts/compress-artifacts.ps1 (stale header comments),
scripts/run-codeql-local.ps1 (Linux build command).AGENTS.md, docs/BUILD.md, docs/README.md, scripts/README.md — Linux
examples switched to linux-dynamic-release, with a note that Linux release
binaries now depend on the bundled vcpkg shared libraries.cmake --preset linux-dynamic-release +
cmake --build --preset linux-dynamic-release.ctest against out/build/linux-dynamic-release with
ODB_TEST_DATA_DIR / ODB_TEST_ENVIRONMENT_VARIABLE set.OdbDesignServer from the dynamic build dir;
curl /healthz/live, then the previously crashing
GET /filemodels/<design>/matrix/matrix endpoint../artifacts exactly like the
workflow does (project .sos + OdbDesignServer + vcpkg *.so*),
docker build -f Dockerfile.prebuilt, run the container with a test design
mounted, and curl healthz + the matrix endpoint.nam20485; the
CMake Build Multi-Platform + Code Coverage PR checks are the final
validation. (docker-publish only runs post-merge on the tracked branches.)vcpkg-cache-warm job then pushes them to the feed.compose.local.yml (USE_VCPKG_CACHE=1) builds will cache-miss (the
read-only feed only holds static packages until the warm job pushes dynamic
ones). Workaround: build once with USE_VCPKG_CACHE=0, or wait for the
warm job.linux-dynamic-release-rollout, PR base: nam20485.