fix(docker): source-built SQLite must load on arm64 (ld.so.conf.d) — follow-up to #6900 - #7044
Conversation
…ilt SQLite loads on arm64 The #6900 SQLite-from-source upgrade passed the amd64 docker-smoke but FAILED the multi-arch release build on linux/arm64 with 'AssertionError: SQLite 3.46.1 still vulnerable' — Python's sqlite3 kept loading the base image's /usr/lib multiarch libsqlite3 (3.46.1) instead of the freshly-compiled /usr/local/lib copy (3.53.0), because /usr/local/lib is NOT in the default ld.so search path on Debian arm64 (it happened to be picked up on amd64). Register /usr/local/lib via an ld.so.conf.d entry before ldconfig so the new lib wins on every architecture. The PR's own build-time version assertion is what surfaced this (correctly), and it also serves as the verification that the fix works once the arm64 build passes. Follow-up to #6900 (exp-v0.52.227, whose multi-arch image failed to build/push).
|
| Filename | Overview |
|---|---|
| Dockerfile | Adds dynamic-linker configuration so Python resolves the source-built SQLite library consistently across image architectures. |
Reviews (2): Last reviewed commit: "test-fix: keep wal.html link within 500 ..." | Re-trigger Greptile
| # /usr/lib multiarch copy (the default ld.so path does NOT include | ||
| # /usr/local/lib on Debian arm64, so the explicit conf entry is required). |
There was a problem hiding this comment.
Correct the arm64 linker explanation
Debian arm64 includes /usr/local/lib through libc.conf; the problem is that the multiarch configuration sorts earlier and takes precedence. Describing the path as absent obscures the ordering issue that the 000- filename fixes.
| # /usr/lib multiarch copy (the default ld.so path does NOT include | |
| # /usr/local/lib on Debian arm64, so the explicit conf entry is required). | |
| # /usr/lib multiarch copy (`aarch64-linux-gnu.conf` sorts before Debian's | |
| # `libc.conf`, so this earlier explicit entry is required). |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Verified in exp-v0.52.228: the multi-arch |
…follow-up to nesquena#6900 (nesquena#7044) * fix(docker): register /usr/local/lib in ld.so.conf.d so the source-built SQLite loads on arm64 The nesquena#6900 SQLite-from-source upgrade passed the amd64 docker-smoke but FAILED the multi-arch release build on linux/arm64 with 'AssertionError: SQLite 3.46.1 still vulnerable' — Python's sqlite3 kept loading the base image's /usr/lib multiarch libsqlite3 (3.46.1) instead of the freshly-compiled /usr/local/lib copy (3.53.0), because /usr/local/lib is NOT in the default ld.so search path on Debian arm64 (it happened to be picked up on amd64). Register /usr/local/lib via an ld.so.conf.d entry before ldconfig so the new lib wins on every architecture. The PR's own build-time version assertion is what surfaced this (correctly), and it also serves as the verification that the fix works once the arm64 build passes. Follow-up to nesquena#6900 (exp-v0.52.227, whose multi-arch image failed to build/push). * test-fix: keep wal.html link within 500 chars of ARG (condense arm64 comment) --------- Co-authored-by: nesquena-hermes <agent@nesquena-hermes>
…quena#6900) (nesquena#7044) (nesquena#7045) Co-authored-by: nesquena-hermes <agent@nesquena-hermes>
The problem
#6900 (exp-v0.52.227) compiles SQLite 3.53.0 from source. The amd64
docker-smokepassed, but the multi-arch Release build failed onlinux/arm64:Python's
sqlite3kept loading the base image's/usr/libmultiarchlibsqlite3(3.46.1) instead of the freshly-compiled/usr/local/libcopy (3.53.0), because/usr/local/libis not in the defaultld.sosearch path on Debian arm64 (it happened to be found on amd64). So the release image failed to build/push — no broken image shipped (the PR's own build-time version assertion correctly fails-closed), but exp-v0.52.227 has no Docker image.The fix
Register
/usr/local/libin/etc/ld.so.conf.d/beforeldconfig, so the source-built SQLite wins on every architecture. The PR's build-time>= 3.51.3+PRAGMA secure_delete == 1assertions verify correctness once the arm64 build runs.Verification
amd64 docker-smoke runs on this PR. The multi-arch (amd64+arm64) build only runs on a release tag — so the authoritative verification is watching the Release & Docker workflow on the follow-up tag (exp-v0.52.228).