Skip to content

Commit d3044c6

Browse files
committed
docs(CI): add GLIBC compatibility comments to build workflow
Explain why Linux runners are pinned to ubuntu-22.04, why sqlite3 is rebuilt from source, and when the runner version can be updated. Also fix stale "Setup Node 20.x" step name.
1 parent 0490e46 commit d3044c6

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/build.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@ jobs:
2121
name: Build Binaries
2222
runs-on: ${{ matrix.runs-on }}
2323
strategy:
24+
# GLIBC compatibility note for Linux runners:
25+
#
26+
# The sqlite3 npm package includes a native addon (node_sqlite3.node) that
27+
# links against the system GLIBC at compile time. The compiled binary requires
28+
# at least the GLIBC version present on the build system at runtime.
29+
#
30+
# Our .deb packages target Ubuntu 22.04+ (GLIBC 2.35). Using ubuntu-latest
31+
# (currently 24.04, GLIBC 2.39) produces binaries that crash on 22.04 with:
32+
# Error: GLIBC_2.38 not found (required by node_sqlite3.node)
33+
#
34+
# We pin Linux runners to ubuntu-22.04 so the native addon is compiled against
35+
# GLIBC 2.35, ensuring compatibility with all non-EOL Ubuntu LTS releases.
36+
# The "Rebuild sqlite3 from source" step below is also required because
37+
# npm install downloads prebuilt binaries compiled against a newer GLIBC.
38+
#
39+
# When updating Linux runners, verify the target GLIBC against the oldest
40+
# Ubuntu LTS you intend to support. Ubuntu 22.04 support ends May 2027.
2441
matrix:
2542
include:
2643
- runs-on: ubuntu-22.04
@@ -48,7 +65,7 @@ jobs:
4865
- name: Checkout Code
4966
uses: actions/checkout@v6
5067

51-
- name: Setup Node 20.x
68+
- name: Setup Node 24.x
5269
uses: actions/setup-node@v6
5370
with:
5471
node-version: '24'
@@ -87,6 +104,9 @@ jobs:
87104
node --version
88105
npm install
89106
107+
# npm install downloads prebuilt node_sqlite3.node binaries via node-pre-gyp.
108+
# These prebuilts are compiled against a newer GLIBC than our target (2.35).
109+
# Force a source rebuild so the addon links against the runner's GLIBC instead.
90110
- name: Rebuild sqlite3 from source for GLIBC compatibility
91111
if: contains(matrix.runs-on, 'ubuntu')
92112
run: npm rebuild sqlite3 --build-from-source

0 commit comments

Comments
 (0)