Bug 2215745 - OpenCV build detects oneVPL but fails to build
Summary: OpenCV build detects oneVPL but fails to build
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: opencv
Version: 38
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nicolas Chauvet (kwizart)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2215700
TreeView+ depends on / blocked
 
Reported: 2023-06-18 09:37 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2023-07-14 11:36 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2023-06-18 09:37:00 UTC
After changing the build dependency from libmfx-devel (a.k.a. intel-mediasdk-devel) to oneVPL-devel, the OpenCV build detects oneVPL, but then the build stops at a broken make rule.

Reproducible: Always

Steps to Reproduce:
1. sed -i -e 's/libmfx-devel/oneVPL-devel/' opencv.spec
2. try building

Actual Results:  
$ grep -i vpl build.log 
-- VPL_VERSION: 2.8
-- GAPI VPL samples with VAAPI
--     Intel Media SDK:             YES (VPL::dispatcher VPL::api VPL::cppapi /lib64/libva.so /lib64/libva-drm.so)
  IMPORTED_LOCATION not set for imported target "VPL::dispatcher"
  IMPORTED_LOCATION not set for imported target "VPL::dispatcher"

and the build failure:
...
/usr/bin/gmake  -f modules/videoio/CMakeFiles/opencv_videoio.dir/build.make modules/videoio/CMakeFiles/opencv_videoio.dir/depend
gmake[2]: Entering directory '/builddir/build/BUILD/opencv-4.7.0/redhat-linux-build'
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:379: *** target pattern contains no '%'.  Stop.

Comment 1 Dominik 'Rathann' Mierzejewski 2023-06-18 10:33:03 UTC
Affected version: 4.7.0-9.fc38.

Comment 2 Dominik 'Rathann' Mierzejewski 2023-06-18 10:52:47 UTC
Same issue in modules/videoio/CMakeFiles/opencv_perf_videoio.dir/build.make:142
bin/opencv_perf_videoio: VPL::dispatcher-NOTFOUND

opencv-4.7.0/modules/videoio/cmake/detect_msdk.cmake looks relevant to this issue.

Comment 3 Nicolas Chauvet (kwizart) 2023-06-19 10:24:53 UTC
Can you forward the issue upstream ? Likely fixeable in the next opencv version
(We could make a backport by then).

Comment 4 Sergio Basto 2023-07-03 17:50:35 UTC
we have the same problem with opencv-4.8.0 

IMPORTED_LOCATION not set for imported target "VPL::dispatcher"

testing build here : 
https://copr.fedorainfracloud.org/coprs/sergiomb/opencv/build/6137720/

Comment 5 Sergio Basto 2023-07-03 21:45:46 UTC
OneVPL dispatcher library path handling is non-standard / surprising to users #418 
https://github.com/oneapi-src/oneAPI-spec/issues/418
https://github.com/oneapi-src/oneVPL/issues/56

conclusion build with ReleaseWithDebInfo doesn't work but : 

- -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
+ -DCMAKE_BUILD_TYPE=Release \ 

fix the build

Comment 6 Sergio Basto 2023-07-14 11:22:10 UTC
what do uou thin we build opencv-4.8.0  with -DCMAKE_BUILD_TYPE=Release and VPL or 
with -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo and libmfx ?

Comment 7 Dominik 'Rathann' Mierzejewski 2023-07-14 11:36:35 UTC
(In reply to Sergio Basto from comment #6)
> what do uou thin we build opencv-4.8.0  with -DCMAKE_BUILD_TYPE=Release
> and VPL or with -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo and libmfx ?

If it doesn't affect -debuginfo sub-package generation then I'd say
build with VPL and switch to =Release until VPL bugs are fixed.


Note You need to log in before you can comment on or make changes to this bug.