Without svtav1 and x265 the error looks different to me, but it is
still there....
The upgrade to cmake 4 occurred on March 29.
I use bash.
there was movement in Debian at least to use lightweight shell as /bin/sh, independent from user's shells ....
but I guess this was not The error point ...
Log still says it tries to build x265 ...
you can try to manually fix CmakeLists.txt inside thirdparty/x265_4.0 folder and see if make in thirdparty will go further?
soooooorry.