Commit e09968c
authored
Bundle libxml2 + libicu74 to support Ubuntu 25.10 / 26.04 (#14)
* fix: bundle libxml2 + libicu74 to support Ubuntu 25.10 / 26.04
Ubuntu 25.10 (Plucky) shipped libxml2 2.14, which bumped the SONAME from
.so.2 to .so.16, and renamed the apt package from libxml2 to libxml2-16.
ICU also moved from 74 to 76. The theseus-rs PostgreSQL binaries that
pg0 bundles are linked against libxml2.so.2 and libicu*.so.74, both of
which are unavailable on 25.10 (and inherited on the upcoming 26.04 LTS),
so `pg0 start` failed with "missing required system libraries".
Reproduction added in docker-tests/test_ubuntu_amd64.sh: ubuntu:24.04
passes against the released v0.13.0 binary; ubuntu:25.10 fails.
Fix: download libxml2 (2.9.14) and libicu74 (74.2-1ubuntu3.1) from the
Ubuntu 24.04 archive at build time, embed the .so files into the pg0
binary, extract them into <installation>/<ver>/lib/ at runtime alongside
the postgres binary, create the SONAME symlinks (libxml2.so.2 ->
libxml2.so.2.9.14 etc.), and prepend that lib dir to LD_LIBRARY_PATH so
postgres / initdb / pg_ctl / psql resolve through the bundled copies.
Bundle is built only for Linux GNU targets (x86_64 + aarch64). macOS,
Windows, and the musl Linux builds get an empty bundle - on those
platforms the libs are either system-provided in a forward-compatible
way (Alpine 3.20/3.21 with ICU 74) or shipped by other means (macOS
frameworks, Windows .dlls beside postgres.exe).
Upgrade safety: the runtime extraction runs even when postgres is
already extracted from a previous pg0 release, so users on existing
~/.pg0/installation/ trees pick up the new libs automatically without
having to wipe the directory.
Other:
- versions.env now pins exact .deb URLs + SHA256s for reproducibility.
- ar / zstd / tar / flate2 / sha2 / hex added as build-dependencies for
cracking open the .deb (ar archive of zstd-compressed tar).
- Linux GNU binary grows ~10 MB (matches the gz-compressed bundle).
- test_missing_libs.sh now uses libgssapi-krb5-2 as the canary missing
lib, since libxml2 is no longer required from the host.
- New docker-tests/test_ubuntu_amd64.sh covers ubuntu:24.04 + ubuntu:25.10
and is wired into CI (with PG0_BINARY_PATH built fresh, like the
existing missing-libs job).
- README updated: removes libxml2 / libicu from the apt install snippets,
adds a "Tested and Supported Platforms" table that explicitly calls
out which Alpine versions work (3.20 / 3.21) vs not (3.22+), and adds
Ubuntu 24.04 / 25.10 / 26.04 as supported.
* fix: source bundled libs from Ubuntu 22.04 to keep manylinux_2_35 baseline
The previous commit pulled libxml2 and libicu74 from Ubuntu 24.04, but
those .so files require GLIBC 2.38, which is newer than the manylinux_2_35
baseline (Ubuntu 22.04 / Debian 12) the wheel ships under. CI's
Linux x86_64-gnu wheel test failed on the ubuntu-22.04 runner with:
postgres: libm.so.6: version `GLIBC_2.38' not found
(required by libxml2.so.2)
Root-cause realization: the bundled postgres binary itself does NOT have
libicu in DT_NEEDED. It only links against libxml2.so.2; libxml2 is what
pulls libicu in transitively. So the ICU major version we ship just
needs to match whatever ICU the bundled libxml2 was built against - it
does not have to match the original SONAME `.so.74` from Ubuntu 24.04.
Switch to Ubuntu 22.04 sources:
- libxml2 2.9.13+dfsg-1ubuntu0.11 (.so.2 SONAME, transitively wants .so.70)
- libicu70 70.1-2ubuntu1 (icudata + icui18n + icuuc)
These libs require at most GLIBC 2.34, comfortably below our 2.35 wheel
baseline, and are still ABI-compatible everywhere we care about (22.04,
24.04, 25.10, 26.04). They sit alongside whatever libicu the host has
installed - on 24.04 the system libicu74 is unused; on 25.10 the system
libicu76 is unused; in both cases the bundled postgres resolves through
our libxml2 -> our libicu70.
Verified locally:
- Vanilla ubuntu:22.04 (glibc 2.35, no libxml2/libicu installed):
pg0 start + psql + stop works.
- ubuntu:24.04 + ubuntu:25.10: docker-tests/test_ubuntu_amd64.sh passes.
- python:3.11-slim debian: docker-tests/test_debian_amd64.sh passes.
- missing-libs detection still works.
Comments in build.rs and main.rs updated to reflect the new sourcing
rationale; README's Ubuntu 25.10 row updated from "ICU 74" to "libicu70".1 parent d088f4d commit e09968c
11 files changed
Lines changed: 704 additions & 89 deletions
File tree
- .github/workflows
- docker-tests
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| 145 | + | |
136 | 146 | | |
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
140 | 150 | | |
141 | | - | |
| 151 | + | |
142 | 152 | | |
143 | 153 | | |
144 | 154 | | |
145 | | - | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
122 | | - | |
| 125 | + | |
123 | 126 | | |
124 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
125 | 132 | | |
126 | 133 | | |
127 | | - | |
128 | 134 | | |
129 | 135 | | |
130 | | - | |
| 136 | + | |
| 137 | + | |
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| |||
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
185 | | - | |
| 192 | + | |
186 | 193 | | |
187 | 194 | | |
188 | | - | |
| 195 | + | |
189 | 196 | | |
190 | 197 | | |
191 | 198 | | |
| |||
448 | 455 | | |
449 | 456 | | |
450 | 457 | | |
451 | | - | |
| 458 | + | |
452 | 459 | | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
456 | 463 | | |
457 | | - | |
| 464 | + | |
458 | 465 | | |
459 | 466 | | |
460 | 467 | | |
461 | 468 | | |
462 | 469 | | |
463 | 470 | | |
| 471 | + | |
464 | 472 | | |
465 | 473 | | |
466 | 474 | | |
467 | 475 | | |
468 | 476 | | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
476 | 486 | | |
477 | 487 | | |
478 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
479 | 511 | | |
480 | 512 | | |
481 | 513 | | |
| |||
0 commit comments