-
Notifications
You must be signed in to change notification settings - Fork 12
fix(NODE-7227): build glibc prebuilds on platforms with libc 2.28 #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,23 +51,19 @@ | |
], | ||
'cflags!': [ '-fno-exceptions' ], | ||
'cflags_cc!': [ '-fno-exceptions' ], | ||
'cflags_cc': ['-std=c++17'], | ||
'cflags_cc': [], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer necessary - Node20 uses c++ 17+ too (question for @addaleax - is there a place where this is officially documented? best I can find is c++ standard specifications in v20.x/common.gypi) |
||
'xcode_settings': { | ||
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', | ||
'CLANG_CXX_LIBRARY': 'libc++', | ||
'MACOSX_DEPLOYMENT_TARGET': '11', | ||
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden | ||
'OTHER_CFLAGS': [ | ||
'-std=c++17', | ||
'-stdlib=libc++' | ||
], | ||
}, | ||
'msvs_settings': { | ||
'VCCLCompilerTool': { | ||
'ExceptionHandling': 1, | ||
'AdditionalOptions': [ | ||
'-std:c++17' | ||
] | ||
'ExceptionHandling': 1 | ||
} | ||
}, | ||
}] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ | |
|
||
# s390x, arm64, amd64 for ubuntu | ||
# amd64 or arm64v8 for alpine | ||
LINUX_ARCH=arm64 | ||
LINUX_ARCH=amd64 | ||
|
||
NODE_VERSION=20.19.0 | ||
NODE_VERSION=24.9.0 | ||
|
||
SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) | ||
PROJECT_DIR=$SCRIPT_DIR/.. | ||
|
@@ -33,10 +33,9 @@ build_and_test_glibc() { | |
--build-arg="NODE_ARCH=$NODE_ARCH" \ | ||
--build-arg="NODE_VERSION=$NODE_VERSION" \ | ||
--build-arg="RUN_TEST=true" \ | ||
--output type=local,dest=./prebuilds,platform-split=false \ | ||
-f ./.github/docker/Dockerfile.glibc \ | ||
-f ./.github/docker/Dockerfile.glibc -t glibc-zstd-base \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a nice-to-have. Specifying a tag means you can load this locally without rebuilding the image if you need to debug locally:
|
||
$PROJECT_DIR | ||
} | ||
|
||
|
||
build_and_test_musl | ||
build_and_test_glibc |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { expect } from 'chai'; | ||
import { execSync } from 'child_process'; | ||
|
||
describe('glibc requirements', function () { | ||
let lddOutput; | ||
beforeEach(function () { | ||
if (process.platform !== 'linux') return this.skip(); | ||
|
||
try { | ||
lddOutput = execSync('ldd --version', { encoding: 'utf8' }); | ||
} catch { | ||
this.skip(); | ||
} | ||
|
||
return; | ||
}); | ||
|
||
it('glibc is 2.28', function () { | ||
expect(lddOutput).to.contain('2.28'); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Durran added support for Node24 while working on #80. Node24 requires C++20. However, the gcc-c++ package I installed in FLE and Kerberos uses g++ 8.5, which does not support c++20 with the --g++20 flag, breaking compilation.
gcc-toolset-14 installs g++14, which supports officially c++20. We'll have to make this change in FLE and kerberos when we add support for Node24 after v7 too.