Skip to content

Commit 4670211

Browse files
huydhnfacebook-github-bot
authored andcommitted
Fix doc build GLIBCXX_3.4.30 not found (#2376)
Summary: The hack is from pytorch/pytorch#121547. This is to fix the failing doc build on 22.04, i.e. https://github.com/pytorch/executorch/actions/runs/8167685547/job/22328481328 ``` ImportError: /opt/conda/envs/py_3.10/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/lib/libtorch_python.so) ``` Pull Request resolved: #2376 Reviewed By: guangy10 Differential Revision: D54818139 Pulled By: huydhn fbshipit-source-id: aad8408908ef52f15a32395c31cc1698cd337c6b
1 parent 8b8094d commit 4670211

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.ci/docker/common/install_conda.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ install_pip_dependencies() {
4444
}
4545

4646
fix_conda_ubuntu_libstdcxx() {
47+
cat /etc/issue
4748
# WARNING: This is a HACK from PyTorch core to be able to build PyTorch on 22.04.
48-
# The issue still exists with the latest conda 23.10.0-1 at the time of writing
49-
# (2023/11/16).
49+
# Specifically, ubuntu-20+ all comes lib libstdc++ newer than 3.30+, but anaconda
50+
# is stuck with 3.29. So, remove libstdc++6.so.3.29 as installed by
51+
# https://anaconda.org/anaconda/libstdcxx-ng/files?version=11.2.0
5052
#
5153
# PyTorch sev: https://github.com/pytorch/pytorch/issues/105248
5254
# Ref: https://github.com/pytorch/pytorch/blob/main/.ci/docker/common/install_conda.sh
53-
if grep -e "[12][82].04.[623]" /etc/issue >/dev/null; then
55+
if grep -e "2[02].04." /etc/issue >/dev/null; then
5456
rm "/opt/conda/envs/py_${PYTHON_VERSION}/lib/libstdc++.so.6"
5557
fi
5658
}

0 commit comments

Comments
 (0)