Closed tianon closed 3 months ago
Oh strange, fails on arm64v8 too in the same way :thinking:
Minimally reproducible with:
docker run --rm -it node:18-alpine sh
apk add --no-cache --virtual .gyp python3 make g++ > /dev/null
npm install -g re2 > /dev/null
pm ERR! make: Leaving directory '/usr/local/lib/node_modules/re2/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@18.19.0 | linux | arm64
npm ERR! gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.19.0/node-v18.19.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.19.0/node-v18.19.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/re2/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/re2/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/re2/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.19.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.19.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/re2/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.19.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/usr/local/lib/node_modules/re2',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../vendor/abseil-cpp/absl/base/internal/low_level_alloc.cc:26:
npm ERR! ../vendor/abseil-cpp/absl/base/internal/direct_mmap.h:36:10: fatal error: linux/unistd.h: No such file or directory
npm ERR! 36 | #include <linux/unistd.h>
npm ERR! | ^~~~~~~~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [re2.target.mk:235: Release/obj.target/re2/vendor/abseil-cpp/absl/base/internal/low_level_alloc.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/re2/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 6.4.16-linuxkit
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/re2/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/re2
npm ERR! gyp ERR! node -v v18.19.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
npm ERR! node:internal/process/promises:288
npm ERR! triggerUncaughtException(err, true /* fromPromise */);
npm ERR! ^
npm ERR!
npm ERR! [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "1".] {
npm ERR! code: 'ERR_UNHANDLED_REJECTION'
npm ERR! }
This fix upstream could help: https://github.com/gperftools/gperftools/issues/693#issuecomment-173898629
@tianon I isolated it even further
docker run --rm -it node:18-alpine sh
apk add --no-cache --virtual .gyp git python3 linux-headers make g++ > /dev/null
git clone https://github.com/uhop/node-re2.git && cd node-re2/
git checkout 1.20.3
git submodule init && git submodule update
npm install
In file included from ../vendor/abseil-cpp/absl/base/internal/low_level_alloc.cc:26:
../vendor/abseil-cpp/absl/base/internal/direct_mmap.h:75:25: error: 'off64_t' has not been declared
75 | off64_t offset) noexcept {
| ^~~~~~~
I think https://github.com/abseil/abseil-cpp/issues/1473 (https://github.com/abseil/abseil-cpp/commit/4500c2fada4e952037c59bd65e8be1ba0b29f21e) is the fix for this off64_t
compilation error and node-re2
has already updated their vendor copy of abseil-cpp
(https://github.com/uhop/node-re2/commit/bea0c0041b0c7c9614d3ff4b91bf17f344fefb80) which would mean that it needs to be using 1.20.5+ of node-re2
.
This was closed as completed: https://github.com/abseil/abseil-cpp/issues/1473 This was merged: https://github.com/microlinkhq/metascraper/pull/681
Please update on what's missing for this issue.
Thank you. I'll track that one.
@tianon These failures started just after the update from Alpine 3.17 to 3.19, here: https://github.com/docker-library/ghost/commit/123735dbbb5a717a71ff941d85cc0ee0ca0717f4. Could that update be reverted until Ghost's fix is merged so that the most recent version of Ghost can be available on Alpine again?
As per the upstream PR, a fix for this should be release on Friday so hopefully we can have this fixed early next week!
Should be fixed in https://github.com/docker-library/official-images/pull/16782
(coming soon to a library/ghost
near you)
Here's a snippet of the relevant log: