From 007d5d894e9f32224e99782cad38885974d7b159 Mon Sep 17 00:00:00 2001 From: Yong Hoon Shin Date: Mon, 23 Dec 2024 12:05:24 -0800 Subject: [PATCH] Update gcc version for FBGEMM install in CI Summary: TorchRec CI currently is failing with issues on incompatible GLIBCXX version. The cause is that FBGEMM now requires g++ 11.1+ for building binaries that reference GLIBCXX_3.4.29 (as of https://github.com/pytorch/pytorch/pull/141035) As recommended in https://github.com/pytorch/FBGEMM/blob/main/.github/scripts/utils_build.bash and https://github.com/pytorch/FBGEMM/issues/3423, install GCC using conda to control glibcxx version being used. Differential Revision: D67607624 --- .github/workflows/docs.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 51217790e..b27596d89 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,7 +33,8 @@ jobs: - name: Setup conda run: | wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh - bash ~/miniconda.sh -b -p $HOME/miniconda + bash ~/miniconda.sh -b -p $HOME/miniconda -u + conda update -n base -c defaults -y conda - name: setup Path run: | echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH @@ -51,7 +52,14 @@ jobs: - name: Install gcc shell: bash run: | - sudo apt-get install build-essential + conda install -n build_binary -c conda-forge -y gxx_linux-64=11.4.0 + echo "[INSTALL] Setting the C/C++ compiler symlinks ..." + local cc_path=$(conda run ${env_prefix} printenv CC) + local cxx_path=$(conda run ${env_prefix} printenv CXX) + ln -sf "${cc_path}" "$(dirname "$cc_path")/cc" + ln -sf "${cc_path}" "$(dirname "$cc_path")/gcc" + ln -sf "${cxx_path}" "$(dirname "$cxx_path")/c++" + ln -sf "${cxx_path}" "$(dirname "$cxx_path")/g++" - name: setup Path run: | echo /usr/local/bin >> $GITHUB_PATH