From e5694bf6cd5953a61c5be89f50c562b8acdb770a Mon Sep 17 00:00:00 2001 From: Giacomo Marciani Date: Mon, 14 Apr 2025 12:34:54 -0400 Subject: [PATCH] [ARMPL] Fix a bug in the installation of ARM Performance Library that was causing the download of GCC dependencies from GCC website rather than the ParallelCluster public bucket. --- CHANGELOG.md | 4 ++++ .../resources/arm_pl/partial/_arm_pl_common.rb | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4f6c2a60..32dd74a70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ This file is used to list changes made in each version of the AWS ParallelCluste **CHANGES** - Ubuntu 20.04 is no longer supported. +**BUG FIXES** +- Fix a bug in the installation of ARM Performance Library that was causing the download of GCC dependencies from + gcc website rather than the ParallelCluster public bucket. + 3.13.0 ------ **ENHANCEMENTS** diff --git a/cookbooks/aws-parallelcluster-platform/resources/arm_pl/partial/_arm_pl_common.rb b/cookbooks/aws-parallelcluster-platform/resources/arm_pl/partial/_arm_pl_common.rb index 4cb13f86b..413b52a5f 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/arm_pl/partial/_arm_pl_common.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/arm_pl/partial/_arm_pl_common.rb @@ -119,14 +119,16 @@ group 'root' cwd new_resource.sources_dir code <<-GCC - set -e + set -ex # Remove dir if it exists. This happens in case of retries. rm -rf gcc-#{gcc_version} tar -xf #{gcc_tarball} cd gcc-#{gcc_version} - # Patch the download_prerequisites script to download over https and not ftp. This works better in China regions. - sed -i "s#ftp://gcc\.gnu\.org/pub/gcc/infrastructure##{node['cluster']['artifacts_s3_url']}/dependencies/gcc/prerequisites#g" ./contrib/download_prerequisites + # Patch the download_prerequisites script to download GCC dependencies from our public bucket. + # This is required to support build image in isolated environments, also HTTPS works better than FTP in China regions. + sed -i "s#\\(ftp\\|http\\|https\\)://gcc\.gnu\.org/pub/gcc/infrastructure##{node['cluster']['artifacts_s3_url']}/dependencies/gcc/prerequisites#g" ./contrib/download_prerequisites + cat ./contrib/download_prerequisites | grep 'base_url' ./contrib/download_prerequisites mkdir build && cd build ../configure --prefix=/opt/arm/armpl/gcc/#{gcc_version} --disable-bootstrap --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib