Skip to content

node-test-commit-arm should use select-compiler.sh #2746

Closed
@richardlau

Description

@richardlau

While testing nodejs/node#38807 I noticed that we're using the default gcc/g++ binaries for the new arm64 containers.
e.g. https://ci.nodejs.org/job/node-test-commit-arm/38847/nodes=ubuntu1804-arm64/consoleFull

17:10:53 python3 ./configure --verbose 
17:10:56 Node.js configure: Found Python 3.6.9...
17:10:56 Detected C++ compiler (CXX=ccache g++) version: 7.5.0
17:10:56 WARNING: C++ compiler (CXX=ccache g++, 7.5.0) too old, need g++ 8.3.0 or clang++ 8.0.0
17:10:56 Detected C compiler (CC=ccache gcc) version: 7.5.0

We are installing the compilers into the containers, e.g.

g++-6 \
gcc-6 \
g++-8 \
gcc-8 \

but we're not using them. The job config currently hardcodes compiler selection: https://ci.nodejs.org/job/node-test-commit-arm/configure

  if [[ "$nodes" =~ centos[67]-(arm)?64-gcc8 ]]; then
    exec_cmd=". /opt/rh/devtoolset-8/enable; $exec_cmd"
  fi
  
  if [[ "$nodes" =~ centos[67]-(arm)?64-gcc6 ]]; then
    exec_cmd=". /opt/rh/devtoolset-6/enable; $exec_cmd"
  fi

i.e. currently only selects compilers for CentOS. I suggest we should use the select-compiler.sh script like we do elsewhere and extend for the Ubuntu containers. There are already arm64 entries for CentOS:

elif [ "$SELECT_ARCH" = "ARM64" ]; then
echo "Setting compiler for Node version $NODEJS_MAJOR_VERSION on arm64"
case $nodes in
centos7-arm64-gcc8 )
. /opt/rh/devtoolset-8/enable
echo "Compiler set to devtoolset-8"
;;
centos[67]-arm64-gcc6 )
. /opt/rh/devtoolset-6/enable
echo "Compiler set to devtoolset-6"
;;
esac
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions