diff --git a/build/bin/sage-site b/build/bin/sage-site index 44d8e3acff9..ef5762d3cdc 100755 --- a/build/bin/sage-site +++ b/build/bin/sage-site @@ -157,6 +157,13 @@ if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then # cause the build to hang. If stdin is /dev/null, TeX just aborts. shift export LANG=C # to ensure it is possible to scrape out non-EN locale warnings + + # See #30351: bugs in macOS implementations of openblas/libgopm can cause + # docbuild to hang if multiple OpenMP threads are allowed. + if [ `uname` = 'Darwin' ]; then + export OMP_NUM_THREADS=1 + fi + exec sage-python -m sage_setup.docbuild "$@"