Skip to content

build-engines: engines start on a clean machine — static libgomp on Linux, no OpenMP on Windows (#1913) - #1914

Merged
swapnilpaliwal-sd merged 2 commits into
devfrom
fix/engine-runtime-deps
Oct 11, 2026
Merged

swapnilpaliwal-sd merged 2 commits into
devfrom
fix/engine-runtime-deps

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

Fixes #1913 — release blocker found by the 0.1.9 cross-platform check on clean VMs.

Linux (x64, arm64): every engine needed libgomp.so.1; on a stock Ubuntu every index failed. -fopenmp on the link line made gcc add a dynamic -lgomp despite -Wl,-Bstatic. Now -fopenmp compiles only and the link names libgomp.a by path (plus -ldl, which it needs).
Validated on the workflow's manylinux_2_28 image (gcc 14): NEEDED = libc / libm / libpthread / libdl / ld-linux only, max GLIBC 2.25; a real index runs on a stock Ubuntu 24.04 without libgomp1; -j 4 and -j 1 give identical edges on a fixture and a 65-file project.

Windows: /openmp links vcomp140.dll (+ vcruntime140.dll), which Windows lacks without the Visual C++ Redistributable; every engine exited 0xC0000135 on a stock Windows Server 2022. Engines are built serial on Windows, as in 0.1.8 (no .parallel marker, so no -j). Parallel on Windows can return with the DLLs shipped app-local, in 0.1.10.

Guards: two new steps fail the build if an engine loads a library a stock system lacks (readelf -d NEEDED on Linux; dumpbin /dependents on Windows). The engine cache key hashes this workflow, so nothing built with the old flags is reused.

macOS is unchanged (its engines are built without OpenMP).

Branched from 0.1.9; until the release PR (#1905) merges, the diff also shows the 0.1.9 commits. This PR's own change is one commit to .github/workflows/build-engines.yml.

Linux: libgomp links statically for real. -fopenmp on the link line made gcc append
its own dynamic -lgomp, so every engine needed libgomp.so.1, which a stock Ubuntu does
not have. -fopenmp now compiles only; the link names libgomp.a by path (+ -ldl it needs).
Validated on manylinux_2_28 gcc 14: NEEDED is libc/libm/libpthread/libdl/ld-linux only,
max GLIBC 2.25, a real index runs on a stock Ubuntu 24.04 with no libgomp1, -j 4 and
-j 1 give the same edges.

Windows: no /openmp. It links vcomp140.dll (and vcruntime140.dll), absent without the
Visual C++ Redistributable; every engine exited 0xC0000135 on a stock Windows Server
2022. Engines are serial on Windows, as through 0.1.8; no .parallel marker.

Two new steps fail the build when an engine loads a library a stock system lacks
(readelf NEEDED on Linux, dumpbin /dependents on Windows). The engine cache key hashes
this file, so no binary built with the old flags is reused.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit df13bef into dev Oct 11, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the fix/engine-runtime-deps branch October 11, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

engines: the 0.1.9 prebuilt engines need libgomp.so.1 (Linux) and vcomp140.dll (Windows), so indexing fails on a clean machine

1 participant