Skip to content

Commit 58f1179

Browse files
committed
Auto merge of #95050 - ehuss:fix-cmake-build, r=Mark-Simulacrum
Fix cmake build. This is an attempt to fix the cmake build. For some reason, it has recently started failing with a permission denied trying to overwrite `/tmp/build.log`. This file exists from the `build-toolchains.sh` step, which is owned by the rustbuild user. I think there is some behavior where a sticky `/tmp` directory doesn't allow overwriting files owned by other users even when running as root. I do not know why this has suddenly started, and I can't reproduce locally with my own docker setup. However, this fix seems to work on CI.
2 parents 461e807 + 8322cdb commit 58f1179

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ci/docker/scripts/cmake.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ hide_output() {
55
set +x
66
on_err="
77
echo ERROR: An error was encountered with the build.
8-
cat /tmp/build.log
8+
cat /tmp/cmake_build.log
99
exit 1
1010
"
1111
trap "$on_err" ERR
1212
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
1313
PING_LOOP_PID=$!
14-
"$@" &> /tmp/build.log
14+
"$@" &> /tmp/cmake_build.log
1515
trap - ERR
1616
kill $PING_LOOP_PID
17-
rm /tmp/build.log
17+
rm /tmp/cmake_build.log
1818
set -x
1919
}
2020

0 commit comments

Comments
 (0)