Skip to content

Commit 503df19

Browse files
fix(NODE-7225): build glibc prebuilds on platforms with libc 2.28 (#105)
1 parent 9c48051 commit 503df19

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.github/docker/Dockerfile.glibc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:noble AS build
1+
FROM redhat/ubi8 AS build
22

33
ARG NODE_VERSION=20.19.0
44
# Possible values: s390x, arm64, x64
@@ -10,7 +10,7 @@ ENV PATH=$PATH:/nodejs/bin
1010
WORKDIR /mongodb-client-encryption
1111
COPY . .
1212

13-
RUN apt-get -qq update && apt-get -qq install -y python3 build-essential git && ldd --version
13+
RUN yum install -y python39 git make gcc-c++
1414

1515
RUN npm run install:libmongocrypt
1616

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Only suitable for local development:
9090
Below are the platforms that are available as prebuilds on each github release.
9191
`prebuild-install` downloads these automatically depending on the platform you are running npm install on.
9292

93-
- Linux GLIBC 2.23 or later
93+
- Linux GLIBC 2.28 or later
9494
- s390x
9595
- arm64
9696
- x64

test/unit/glibc.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { expect } from 'chai';
2+
import { execSync } from 'child_process';
3+
4+
describe('glibc requirements', function () {
5+
let lddOutput: string;
6+
beforeEach(function () {
7+
if (process.platform !== 'linux') return this.skip();
8+
9+
try {
10+
lddOutput = execSync('ldd --version', { encoding: 'utf8' });
11+
} catch {
12+
this.skip();
13+
}
14+
15+
return;
16+
});
17+
18+
it('glibc is 2.28', function () {
19+
expect(lddOutput).to.contain('2.28');
20+
});
21+
});

0 commit comments

Comments
 (0)