Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933563 - media-libs/opencv-4.8.1-r2: Compilation hangs with high CPU utilization │
Summary: media-libs/opencv-4.8.1-r2: Compilation hangs with high CPU utilization ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-05 05:36 UTC by Stefan Huber
Modified: 2024-06-05 16:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pstree (pstree.txt,3.49 KB, text/plain)
2024-06-05 05:38 UTC, Stefan Huber
Details
emerge --info (emerge-info.txt,7.43 KB, text/plain)
2024-06-05 05:38 UTC, Stefan Huber
Details
build.log (build.log,410.77 KB, text/x-log)
2024-06-05 05:39 UTC, Stefan Huber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2024-06-05 05:36:50 UTC
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
Comment 1 Stefan Huber 2024-06-05 05:38:20 UTC
Created attachment 895095 [details]
pstree
Comment 2 Stefan Huber 2024-06-05 05:38:34 UTC
Created attachment 895096 [details]
emerge --info
Comment 3 Stefan Huber 2024-06-05 05:39:46 UTC
Created attachment 895097 [details]
build.log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-05 06:03:06 UTC
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!
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-05 06:04:01 UTC
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).
Comment 6 Stefan Huber 2024-06-05 14:42:04 UTC
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.
Comment 7 Mike Gilbert gentoo-dev 2024-06-05 16:48:22 UTC
Please re-open if you run into it again.