Skip to content

Commit 2552139

Browse files
use gcc 14+
1 parent 12dc36a commit 2552139

File tree

4 files changed

+29
-12
lines changed

4 files changed

+29
-12
lines changed

.github/docker/Dockerfile.glibc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ ENV PATH=$PATH:/nodejs/bin
99
WORKDIR /zstd
1010
COPY . .
1111

12-
RUN yum install -y python39 git make gcc-c++ curl cmake
12+
RUN yum install -y python39 git make curl cmake gcc-toolset-14
13+
ENV PATH=/opt/rh/gcc-toolset-14/root/bin/:$PATH
1314

1415
RUN python3 --version
1516

binding.gyp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,19 @@
5151
],
5252
'cflags!': [ '-fno-exceptions' ],
5353
'cflags_cc!': [ '-fno-exceptions' ],
54-
'cflags_cc': ['-std=c++17'],
54+
'cflags_cc': [],
5555
'xcode_settings': {
5656
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
5757
'CLANG_CXX_LIBRARY': 'libc++',
5858
'MACOSX_DEPLOYMENT_TARGET': '11',
5959
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
6060
'OTHER_CFLAGS': [
61-
'-std=c++17',
6261
'-stdlib=libc++'
6362
],
6463
},
6564
'msvs_settings': {
6665
'VCCLCompilerTool': {
67-
'ExceptionHandling': 1,
68-
'AdditionalOptions': [
69-
'-std:c++17'
70-
]
66+
'ExceptionHandling': 1
7167
}
7268
},
7369
}]

etc/docker.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
# s390x, arm64, amd64 for ubuntu
77
# amd64 or arm64v8 for alpine
8-
LINUX_ARCH=arm64
8+
LINUX_ARCH=amd64
99

10-
NODE_VERSION=20.19.0
10+
NODE_VERSION=24.9.0
1111

1212
SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0})
1313
PROJECT_DIR=$SCRIPT_DIR/..
@@ -33,10 +33,9 @@ build_and_test_glibc() {
3333
--build-arg="NODE_ARCH=$NODE_ARCH" \
3434
--build-arg="NODE_VERSION=$NODE_VERSION" \
3535
--build-arg="RUN_TEST=true" \
36-
--output type=local,dest=./prebuilds,platform-split=false \
37-
-f ./.github/docker/Dockerfile.glibc \
36+
-f ./.github/docker/Dockerfile.glibc -t glibc-zstd-base \
3837
$PROJECT_DIR
3938
}
4039

4140

42-
build_and_test_musl
41+
build_and_test_glibc

test/glibc.test.js

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;
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)