|
21 | 21 | name: Build Binaries |
22 | 22 | runs-on: ${{ matrix.runs-on }} |
23 | 23 | 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. |
24 | 41 | matrix: |
25 | 42 | include: |
26 | 43 | - runs-on: ubuntu-22.04 |
|
48 | 65 | - name: Checkout Code |
49 | 66 | uses: actions/checkout@v6 |
50 | 67 |
|
51 | | - - name: Setup Node 20.x |
| 68 | + - name: Setup Node 24.x |
52 | 69 | uses: actions/setup-node@v6 |
53 | 70 | with: |
54 | 71 | node-version: '24' |
|
87 | 104 | node --version |
88 | 105 | npm install |
89 | 106 |
|
| 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. |
90 | 110 | - name: Rebuild sqlite3 from source for GLIBC compatibility |
91 | 111 | if: contains(matrix.runs-on, 'ubuntu') |
92 | 112 | run: npm rebuild sqlite3 --build-from-source |
|
0 commit comments