The compilation of opencv-4.8.1-r2 hangs on my system at this line: [263/1163] : && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -O2 -pipe -march=native -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mf16c -mfma -mavx -mavx2 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -shared -Wl,-soname,libopencv_xphoto.so.408 -o lib/libopencv_xphoto.so.4.8.1 modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/bm3d_image_denoising.cpp.o modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/dct_image_denoising.cpp.o modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/grayworld_white_balance.cpp.o modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/inpainting.cpp.o modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/learning_based_color_balance.cpp.o modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/oilpainting.cpp.o modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/simple_color_balance.cpp.o modules/xphoto/CMakeFiles/opencv_xphoto.dir/src/tonemap.cpp.o lib/libopencv_photo.so.4.8.1 -ldl -lm -lpthread -lrt lib/libopencv_imgproc.so.4.8.1 lib/libopencv_core.so.4.8.1 -Wl,-rpath-link,"\$ORIGIN" && : [264/1163] /usr/bin/cmake -E cmake_symlink_library lib/libopencv_xphoto.so.4.8.1 lib/libopencv_xphoto.so.408 lib/libopencv_xphoto.so && : The CPU stays busy over night at this stage and apparently does not finish. Reproducible: Always
Created attachment 895095 [details] pstree
Created attachment 895096 [details] emerge --info
Created attachment 895097 [details] build.log
Could you do the following: * provide `ps faux` output * run `perf record` for the hanging GCC processes (cc1plus unless `as` is using CPU, the as process is likely doing nothing & just from -pipe) * attach gdb and get a backtrace for the hanging GCC processes thanks!
It would also be helpful if you could take one of the hanging g++ command lines, run it manually in the build directory. If it still hangs, run it again with -save-temps, and then ^C after a bit and upload the .ii file it makes here (along with the command line you ran).
I am very sorry, but I cannot reproduce it. I attempted to emerge version ~4.9.0-r1, which also failed. Then I had to reboot my machine for another reason and now it works. First I thought it would be because I defaulted my useflag settings, but in fact, I cannot reproduce the hang anymore. It is a bit mysterious to me.
Please re-open if you run into it again.