Bug 2051193
Summary: | opencv fails to build with java-17-openjdk | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | jiri vanek <jvanek> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 36 | CC: | andrew, aoliva, chip.kerchner, didiksupriadi41, dmalcolm, fweimer, hhorak, jakub, java-maint-sig, jhuttana, jkucera, jmlich83, jridky, jvanek, jwakely, karlthered, kwizart, law, mpolacek, msebor, mtasaka, nickc, pmikova, rakesh.pandit, sergio, sgehwolf, sipoyare, viktor.vix.jancik |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-02-13 19:30:50 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2024265 |
Description
jiri vanek
2022-02-06 15:26:23 UTC
builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:909:30: note: overloaded builtin '__builtin_vec_vadu' is implemented by builtin '__builtin_altivec_vaduh' /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp: In function 'unsigned int cv::hal_baseline::v_reduce_sad(const v_uint32x4&, const v_uint32x4&)': /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:922:34: error: '__builtin_altivec_vaduw' requires the '-mcpu=power9' and '-mvsx' options 922 | const vec_uint4 ad = vec_absd(a.val, b.val); | ^ /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:922:34: note: overloaded builtin '__builtin_vec_vadu' is implemented by builtin '__builtin_altivec_vaduw' gmake[2]: *** [modules/core/CMakeFiles/opencv_core.dir/build.make:134: modules/core/CMakeFiles/opencv_core.dir/src/arithm.cpp.o] Error 1 gmake[2]: Leaving directory '/builddir/build/BUILD/opencv-4.5.5/redhat-linux-build' gmake[1]: *** [CMakeFiles/Makefile2:4845: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 looks like gcc12 issue yes , this is gcc12 with altivec on ppc64le , reference : https://github.com/opencv/opencv/issues/19020#issuecomment-1030940303 The recent updates of GCC12 (pre-release) bring this problem again https://kojipkgs.fedoraproject.org/work/tasks/9006/82469006/build.log build are done with LTO disabled ``` [ 1%] Building CXX object CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/passes/communications.cpp.o /usr/bin/g++ -DVK_NO_PROTOTYPES -I/builddir/build/BUILD/opencv-4.5.5/redhat-linux-build -I/usr/include/vulkan -I/builddir/build/BUILD/opencv-4.5.5/redhat-linux-build/3rdparty/ade/ade-0.1.1f/sources/ade/include -isystem /usr/include/gdal -isystem /usr/include/coin -isystem /usr/include/openblas -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -mcpu=power8 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -fPIC -std=c++11 -MD -MT CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/passes/communications.cpp.o -MF CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/passes/communications.cpp.o.d -o CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/passes/communications.cpp.o -c /builddir/build/BUILD/opencv-4.5.5/redhat-linux-build/3rdparty/ade/ade-0.1.1f/sources/ade/source/passes/communications.cpp In file included from /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin.hpp:223, from /builddir/build/BUILD/opencv-4.5.5/modules/core/src/precomp.hpp:88, from /builddir/build/BUILD/opencv-4.5.5/modules/core/src/algorithm.cpp:43: /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp: In function 'unsigned int cv::hal_baseline::v_reduce_sad(const v_uint8x16&, const v_uint8x16&)': /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:897:40: error: '__builtin_altivec_vadub' requires the '-mcpu=power9' and '-mvsx' options 897 | vec_uint4 sum4 = vec_sum4s(vec_absd(a.val, b.val), zero4); | ^ /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:897:40: note: overloaded builtin '__builtin_vec_vadu' is implemented by builtin '__builtin_altivec_vadub' /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp: In function 'unsigned int cv::hal_baseline::v_reduce_sad(const v_uint16x8&, const v_uint16x8&)': /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:909:30: error: '__builtin_altivec_vaduh' requires the '-mcpu=power9' and '-mvsx' options 909 | vec_ushort8 ad = vec_absd(a.val, b.val); | ^ /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:909:30: note: overloaded builtin '__builtin_vec_vadu' is implemented by builtin '__builtin_altivec_vaduh' /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp: In function 'unsigned int cv::hal_baseline::v_reduce_sad(const v_uint32x4&, const v_uint32x4&)': /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:922:34: error: '__builtin_altivec_vaduw' requires the '-mcpu=power9' and '-mvsx' options 922 | const vec_uint4 ad = vec_absd(a.val, b.val); | ^ /builddir/build/BUILD/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:922:34: note: overloaded builtin '__builtin_vec_vadu' is implemented by builtin '__builtin_altivec_vaduw' ``` I also found this notes : On Wed, 2020-07-29 at 12:19 -0500, Steven Munroe wrote: > Jeff Law wrote: > > > For ppc64le is that the build was done with p8, but there is one > > function (__builtin_altivec_vadub) that requires p9. This seems > > like a package bug at first glance, not an LTO issue. > > Yup __builtin_altivec_vadub is POWER9_VECTOR only. > > For P8/6 use something like this: > > vmin = vec_min (a, b); > vmax = vec_max (a, b); > result = vec_sub (vmax, vmin); > > executes in 4 cycles. So, is that const vec_uint4 ad = vec_absd(a.val, b.val); in a function compiled for -mcpu=power9? If not, that would be an OpenCV bug, not GCC. The vabsdub instruction really is in the Power9 ISA. This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36. For now, workaround submitted as PR: https://src.fedoraproject.org/rpms/opencv/pull-request/15 scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82767561 Workaround is to force defining CV_FORCE_SIMD128_CPP on ppc64le so as NOT to use intrin_vsx.hpp . (In reply to Mamoru TASAKA from comment #5) > For now, workaround submitted as PR: > https://src.fedoraproject.org/rpms/opencv/pull-request/15 > scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82767561 > > Workaround is to force defining CV_FORCE_SIMD128_CPP on ppc64le so as NOT to > use intrin_vsx.hpp . Many thanks for this fix , I will send to upstream Instead of disabling the vectorization for PPC with your workaround, you should instead use this patch https://github.com/opencv/opencv/pull/21614 I already did *** This bug has been marked as a duplicate of bug 2041573 *** |