Summary: | media-libs/opencv-4.5.0: failed to emerge (error: inlining failed in call to ‘always_inline’ ‘__m128i _mm_cvtps_ph(__m128, int)’: target specific option mismatch) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Leonid Kopylov <leonchik1976> |
Component: | Current packages | Assignee: | Amy Liffey <amynka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | rossbridger.cc, sam, vmatare+gbug |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=747163 https://github.com/gentoo/gentoo/pull/18801 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log.xz |
Description
Leonid Kopylov
2020-10-29 17:31:18 UTC
Created attachment 669200 [details]
build.log.xz
FAILED: modules/core/CMakeFiles/opencv_core.dir/src/array.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DCVAPI_EXPORTS -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE="long long" -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include -Imodules/core -isystem . -isystem /usr/include/eigen3 -march=native -O2 -pipe -fomit-frame-pointer -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 -Winit-self -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 -mavx -mavx2 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -fPIC -std=c++11 -MD -MT modules/core/CMakeFiles/opencv_core.dir/src/array.cpp.o -MF modules/core/CMakeFiles/opencv_core.dir/src/array.cpp.o.d -o modules/core/CMakeFiles/opencv_core.dir/src/array.cpp.o -c /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/array.cpp In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/immintrin.h:113, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/cv_cpu_dispatch.h:71, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/cvdef.h:343, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core.hpp:52, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/utility.hpp:56, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/precomp.hpp:49, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/array.cpp:49: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/f16cintrin.h: In constructor ‘cv::float16_t::float16_t(float)’: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/f16cintrin.h:67:1: 67 | _mm_cvtps_ph (__m128 __A, const int __I) | ^~~~~~~~~~~~ In file included from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core.hpp:52, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/utility.hpp:56, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/precomp.hpp:49, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/array.cpp:49: /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/cvdef.h:849:38: note: called from here 849 | w = (ushort)_mm_cvtsi128_si32(_mm_cvtps_ph(v, 0)); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/immintrin.h:113, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/cv_cpu_dispatch.h:71, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/cvdef.h:343, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core.hpp:52, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/utility.hpp:56, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/precomp.hpp:49, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/array.cpp:49: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/f16cintrin.h:67:1: error: inlining failed in call to ‘always_inline’ ‘__m128i _mm_cvtps_ph(__m128, int)’: target specific option mismatch 67 | _mm_cvtps_ph (__m128 __A, const int __I) | ^~~~~~~~~~~~ In file included from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core.hpp:52, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/utility.hpp:56, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/precomp.hpp:49, from /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/src/array.cpp:49: /var/tmp/portage/media-libs/opencv-4.5.0/work/opencv-4.5.0/modules/core/include/opencv2/core/cvdef.h:849:38: note: called from here 849 | w = (ushort)_mm_cvtsi128_si32(_mm_cvtps_ph(v, 0)); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ Never thought anyone would have disabled f16c and enabled avx. Probably need to add it to REQUIRED_USE (In reply to Ross Charles C. from comment #3) > Never thought anyone would have disabled f16c and enabled avx. Probably need > to add it to REQUIRED_USE it default CPU_FLAGS, enabling f16c, and disabling avx - didn't helped - still can't build this I was using a CPU_FLAGS_X86 that was generated by a very old version of cpuid2cpuflags, and was missing f16c and some other features. Updating CPU_FLAGS_X86 with the output of a newer cpuid2cpuflags fixed this. i used exactly that tool to generate this - on virtualbox - this flag on CPU not exists That's probably a problem within virtualbox. Sandy Bridge is the only real CPU with AVX that doesn't have F16C. But since you also enabled AVX2, that's not the case. I think there might be an implicit rule in the CPU flags: avx2:f16c,avx f16c:avx Can you try compiling with '-avx2 -f16c avx' CPUFLAGS? same failure (In reply to Leonid Kopylov from comment #8) > same failure But can you paste the full build log for that? The bug doesn't seem to be reproducible on my computer. my bad, yes, after disabling avx2 it installed successfully Hello, I have the same issue as OP: see https://forums.gentoo.org/viewtopic-t-1123459.html After manually removing avx2 flag from CPU_FLAGS, it compiles, but the package is pulled in after a new emerge -avuND @world -_- Can anyone please help me? Thank you, Kind regards, Valerie I had a similar issue with compiling opencv-4.5.0. Disabling -flto (in package.env) enabled a successful compile. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e402fc2e336e59a514557c6c1bdb014cb590fad1 commit e402fc2e336e59a514557c6c1bdb014cb590fad1 Author: Ross Charles Campbell <rossbridger.cc@gmail.com> AuthorDate: 2020-12-24 06:05:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2020-12-27 04:34:08 +0000 media-libs/opencv: version bump, remove old - Added constraint on CPU flags on x86 - Also closed out bugs that wasn't reported reproducible on newer versions Closes: https://bugs.gentoo.org/751781 Closes: https://bugs.gentoo.org/703658 Closes: https://bugs.gentoo.org/706040 Closes: https://bugs.gentoo.org/721706 Closes: https://bugs.gentoo.org/689838 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/18801 Signed-off-by: Sam James <sam@gentoo.org> media-libs/opencv/Manifest | 4 ++-- ...{opencv-4.4.0-r1.ebuild => opencv-4.5.1.ebuild} | 26 +++++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) |