Commit fabd9826 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed NodeJS 24.10.0 compilation with GCC11

parent 04bda6ea
......@@ -5,6 +5,7 @@ all:
swapon swap
tar xf node-v24.10.0.tar.xz
patch -Np1 -d node-v24.10.0 < node-v24.10.0-fix_gcc11.patch
cd node-v24.10.0 && ./configure --prefix=/usr --shared-zlib
$(MAKE) -C node-v24.10.0
# FIXME: node tests failure!
......
diff -uNr node-v24.10.0/src/node_v8_platform-inl.h node-v24.10.0-fix_gcc11/src/node_v8_platform-inl.h
--- node-v24.10.0/src/node_v8_platform-inl.h 2025-10-09 06:26:42.000000000 +1030
+++ node-v24.10.0-fix_gcc11/src/node_v8_platform-inl.h 2025-10-20 10:49:41.115626556 +1030
@@ -111,7 +111,10 @@
[](auto& categories) -> std::set<std::string> {
std::set<std::string> out;
for (const auto& s : categories) {
- out.emplace(std::string(s.data(), s.size()));
+ // `std::views::split` produces subranges that are not guaranteed contiguous,
+ // so `s.data()` is invalid on GCC 11+ and C++20.
+ // Use iterator-based construction instead.
+ out.emplace(std::string(std::ranges::begin(s), std::ranges::end(s)));
}
return out;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment