maybe only build specific things first, like:
cmake -DBUILD_LIST="imgcodecs,core,python3" -DBUILD_TESTS=OFF .DBUILD_PERF_TESTS=OFF ..
also, multithreaded builds are hard to debug, maybe use make -j1
instead
(&don’t forget to make install
later)