docker-node
docker-node copied to clipboard
nodejs v20: buster images for arm32v7 missing
e.g.
INFO[0000] Retrieving image arm32v7/node:20-buster-slim from registry index.docker.io
error building image: GET https://index.docker.io/v2/arm32v7/node/manifests/20-buster-slim: MANIFEST_UNKNOWN: manifest unknown; unknown tag=20-buster-slim
INFO[0000] Retrieving image arm32v7/node:20-buster from registry index.docker.io
error building image: GET https://index.docker.io/v2/arm32v7/node/manifests/20-buster: MANIFEST_UNKNOWN: manifest unknown; unknown tag=20-buster
Same for https://hub.docker.com/_/node/tags?page=1&name=20-buster, there are only images for linux/arm64 and linux/arm64/v8, not for linux/arm32/v7.
Theses images are listed in versions.json but missing on docker hub.
It looks like that architecture is failing to build. It seems that libstdc++ in Debian Buster on arm32v7 is not new enough for this new binary. amd64 has the same glibcxx limit so perhaps the arm32v7 NodeJS binary was inadvertently upgraded?
Build log:
+ sha256sum -c -
node-v20.0.0-linux-armv7l.tar.xz: OK
+ tar -xJf node-v20.0.0-linux-armv7l.tar.xz -C /usr/local --strip-components=1 --no-same-owner
+ rm node-v20.0.0-linux-armv7l.tar.xz SHASUMS256.txt.asc SHASUMS256.txt
+ ln -s /usr/local/bin/node /usr/local/bin/nodejs
+ node --version
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
Removing intermediate container 68045f2a013d
$ docker pull --platform linux/arm/v7 buildpack-deps:buster
...
Digest: sha256:5c2114d327b0e2a38de4e3dcf5fa304e4da23264a1e77643632d0a25325d7e2d
Status: Downloaded newer image for buildpack-deps:buster
$ docker run -it --rm buildpack-deps:buster
WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/amd64) and no specific platform was requested
root@58f73b6a9b9e:/# strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 | grep GLIBCXX_
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_DEBUG_MESSAGE_LENGTH
Downloading and comparing amd64 vs arm32v7:
root@5136a785168b:/# strings node-v20.0.0-linux-x64/bin/node | grep -e '^GLIBCXX_3.4.'
GLIBCXX_3.4.14
GLIBCXX_3.4.18
GLIBCXX_3.4.9
GLIBCXX_3.4.15
GLIBCXX_3.4.20
GLIBCXX_3.4.11
GLIBCXX_3.4.21
root@5136a785168b:/# strings node-v20.0.0-linux-armv7l/bin/node | grep -e '^GLIBCXX_3.4.'
GLIBCXX_3.4.14
GLIBCXX_3.4.18
GLIBCXX_3.4.9
GLIBCXX_3.4.15
GLIBCXX_3.4.26
GLIBCXX_3.4.20
GLIBCXX_3.4.11
GLIBCXX_3.4.21
I think the gcc was bumped to 10 for Node 20, not sure if that's related
I think so, GCC 8 is what is in Debian Buster and it only goes to GLIBCXX_3.4.25. It is still weird that the other architectures are not affected.
If GCC 10 is the new minimum, then I bet later versions of 20.x will also start to manifest this problem and so buster should likely be dropped from 20.x.
@nodejs/build before I drop those images, can someone confirm I didn't missread the need for GCC 10 for v20?
TL;DR Node.js 20 binaries should be okay on Debian Buster on everything except armv7l.
See the footnotes (6 and 7) in https://github.com/nodejs/node/blob/v20.0.0/BUILDING.md#official-binary-platforms-and-toolchains for armv7l.
You're partially correct that this is related to using GCC 10 to build the gcc-based binaries for Node.js 20. On other platforms we compile on RHEL 8 -- Red Hat make changes to their compilers so that the compiled binaries are compatible with the glibc and libstc++ libraries associated with gcc 8. Unfortunately Red Hat do not support armv7l so we need to use a cross compiler (generated with Crosstool-NG) which doesn't have the same accommodations.
FWIW I did find that the gcc10 armv7l Buster docker image can run the Node.js 20 binaries -- that image effectively has gcc-10 libraries separate from the base ones from Buster.
Looks like we've had a reintroduction of this with Node v23 and Debian Bullseye: :eyes:
+ tar -xJf node-v23.0.0-linux-armv7l.tar.xz -C /usr/local --strip-components=1 --no-same-owner
+ rm node-v23.0.0-linux-armv7l.tar.xz SHASUMS256.txt.asc SHASUMS256.txt
+ ln -s /usr/local/bin/node /usr/local/bin/nodejs
+ node --version
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by node)
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by node)