Closed jcheng5 closed 10 months ago
I ran into problems building this branch on Ubuntu 18 and CentOS 7. We may run into similar problems when merging.
Compiling with Ubuntu 18.04 failed with:
...
Extracting node-v18.17.1-linux-x64.tar.xz
+ ./bin/npm install
./bin/../ext/node/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by ./bin/../ext/node/ bin/node)
make: *** [Makefile:53: packages-ubuntu] Error 1
Ubuntu 18's libc supports up to GLIBC 2.27:
$ docker run --rm -it rstudio/shiny-server:ubuntu-18.04-x86_64 bash
root@c02e728f27d1:/# strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_2.22
GLIBC_2.23
GLIBC_2.24
GLIBC_2.25
GLIBC_2.26
GLIBC_2.27
GLIBC_PRIVATE
GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1.6) stable release version 2.27.
root@c02e728f27d1:/#
Building the rpm package on CentOS 7 gave a similar result:
Extracting node-v18.17.1-linux-x64.tar.xz
+ ./bin/npm install
./bin/../ext/node/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by ./bin/../ext/node/bin/node)
./bin/../ext/node/bin/node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by ./bin/../ext/node/bin/node)
./bin/../ext/node/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./bin/../ext/node/bin/node)
./bin/../ext/node/bin/node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./bin/../ext/node/bin/node)
./bin/../ext/node/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./bin/../ext/node/bin/node)
./bin/../ext/node/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./bin/../ext/node/bin/node)
make: *** [Makefile:43: packages-centos] Error 1
I was able to build the binaries using Ubuntu 20 and Rocky Linux 8 environments. I created a fork of this branch at https://github.com/dskard/shiny-server/tree/node-18 with a Makefile to help reproduce the errors I was seeing above and reproduce the Ubuntu 20 and Rocky Linux 8 build environments.
To reproduce the GLIBC errors:
git clone git@github.com:dskard/shiny-server.git
cd shiny-server
git checkout node-18
# build all of the docker images for build environments
# might need to force docker's default platform with:
# export DOCKER_DEFAULT_PLATFORM=linux/amd64
make build
# build a deb package using Ubuntu 18 build environment
make dist-clean packages-ubuntu
# build an rpm package using CentOS 7 build environment
make dist-clean packages-centos
To build packages with the Ubuntu 20 and Rocky Linux 8 build environments:
# build a deb package using Ubuntu 20 build environment
make dist-clean packages-ubuntu-20
# build an rpm package using Rocky Linux 8 build environment
make dist-clean packages-rocky-8
The packages built with the Ubuntu 20 and Rocky Linux 8 environments did install and launch applications without any new errors in Ubuntu 20 and Rocky Linux 8 test environments. I still need to try:
@dskard This should fix CentOS 7. It replaces the Node.js official binary (for all build flavors) with one from https://github.com/jcheng5/node-centos7.
Building .rpm
package on CentOS 7 and .deb
package on Ubuntu 18 worked using the new version of Node.
Tested installation of packages, loading R applications, and loading Python applications on the following platforms:
Notes
.nvmrc
specifies the Node.js version number that should be downloaded byexternal/install-node.sh
. We also have to update the SHASUM inexternal/install-node.sh
. (I don't know if this provides any extra security, but I've always done it this way)