intel / media-driver

Intel Graphics Media Driver to support hardware decode, encode and video processing.
https://github.com/intel/media-driver/wiki
Other
1k stars 347 forks source link

`master` build + gcc14.1 FAILs @ undecl syms `VPHAL_VEBOX_{RGB32,AYUV,RGB64`; tag `intel-media-24.2.4` OK #1813

Closed pgnd closed 4 months ago

pgnd commented 5 months ago

rpm-building from src

(1) intel-media-24.2.4
(2) master

on

distro
    Name: Fedora Linux 40 (Forty)
    Version: 40

with

gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/14/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-redhat-linux
    Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-14.1.1-20240522/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 14.1.1 20240522 (Red Hat 14.1.1-4) (GCC)

build/install is OK for tag == intel-media-24.2.4

build/install FAILS for master branch, @

...
[933/1161] /usr/bin/g++ -DCLASS_TRACE=0 -DENABLE_XE_KMD -DIGFX_ARL_SUPPORTED -DIGFX_DG2_SUPPORTED -DIGFX_GEN11_ICLLP_SUPPORTED -DIGFX_GEN11_JSL_SUPPORTED -DIGFX_GEN11_SUPPORTED -DIGFX_GEN12_ADLN_SUPPORTED -DIGFX_GEN12_ADLP_SUPPORTED -DIGFX_GEN12_ADLS_SUPPORTED -DIGFX_GEN12_DG1_SUPPORTED -DIGFX_GEN12_RKL_SUPPORTED -DIGFX_GEN12_SUPPORTED -DIGFX_GEN12_TGLLP_CMFCPATCH_SUPPORTED -DIGFX_GEN12_TGLLP_CMFC_SUPPORTED -DIGFX_GEN12_TGLLP_SUPPORTED -DIGFX_GEN12_TGLLP_SWSB_SUPPORTED -DIGFX_GEN8_BDW_SUPPORTED -DIGFX_GEN8_SUPPORTED -DIGFX_GEN9_BXT_SUPPORTED -DIGFX_GEN9_CFL_SUPPORTED -DIGFX_GEN9_CML_SUPPORTED -DIGFX_GEN9_CMPV_SUPPORTED -DIGFX_GEN9_GLK_SUPPORTED -DIGFX_GEN9_KBL_SUPPORTED -DIGFX_GEN9_SKL_SUPPORTED -DIGFX_GEN9_SUPPORTED -DIGFX_MTL_SUPPORTED -DIGFX_XEHP_SDV_CMFCPATCH_SUPPORTED -DIGFX_XEHP_SDV_SUPPORTED -DIGFX_XE_HPG_CMFCPATCH_SUPPORTED -DIGFX_XE_HPG_SUPPORTED -DMEDIA_VERSION=\"24.2.5\" -DMEDIA_VERSION_DETAILS=\"\" -DVEBOX_AUTO_DENOISE_SUPPORTED=0 -DX11_FOUND -D_AV1_DECODE_SUPPORTED -D_AV1_ENCODE_VDENC_SUPPORTED -D_COMMON_ENCODE_SUPPORTED -D_FULL_OPEN_SOURCE -D_JPEG_DECODE_SUPPORTED -D_JPEG_ENCODE_SUPPORTED -D_MANUAL_SOFTLET_ -D_MMC_SUPPORTED -D_MPEG2_DECODE_SUPPORTED -D_RELEASE -D_VP8_DECODE_SUPPORTED -D_VP9_DECODE_SUPPORTED -D_VP9_ENCODE_VDENC_SUPPORTED -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__VPHAL_SFC_SUPPORTED=1 ...
...
vp_vebox_cmd_packet.cpp.o.d -o media_driver/CMakeFiles/iHD_drv_video_SOFTLET_VP.dir/__/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp.o -c /builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp
FAILED: media_driver/CMakeFiles/iHD_drv_video_SOFTLET_VP.dir/__/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp.o
/usr/bin/g++ -DCLASS_TRACE=0 -DENABLE_XE_KMD -DIGFX_ARL_SUPPORTED -DIGFX_DG2_SUPPORTED -DIGFX_GEN11_ICLLP_SUPPORTED -DIGFX_GEN11_JSL_SUPPORTED -DIGFX_GEN11_SUPPORTED -DIGFX_GEN12_ADLN_SUPPORTED -DIGFX_GEN12_ADLP_SUPPORTED -DIGFX_GEN12_ADLS_SUPPORTED -DIGFX_GEN12_DG1_SUPPORTED -DIGFX_GEN12_RKL_SUPPORTED -DIGFX_GEN12_SUPPORTED -DIGFX_GEN12_TGLLP_CMFCPATCH_SUPPORTED -DIGFX_GEN12_TGLLP_CMFC_SUPPORTED -DIGFX_GEN12_TGLLP_SUPPORTED -DIGFX_GEN12_TGLLP_SWSB_SUPPORTED -DIGFX_GEN8_BDW_SUPPORTED -DIGFX_GEN8_SUPPORTED -DIGFX_GEN9_BXT_SUPPORTED -DIGFX_GEN9_CFL_SUPPORTED -DIGFX_GEN9_CML_SUPPORTED -DIGFX_GEN9_CMPV_SUPPORTED -DIGFX_GEN9_GLK_SUPPORTED -DIGFX_GEN9_KBL_SUPPORTED -DIGFX_GEN9_SKL_SUPPORTED -DIGFX_GEN9_SUPPORTED -DIGFX_MTL_SUPPORTED -DIGFX_XEHP_SDV_CMFCPATCH_SUPPORTED -DIGFX_XEHP_SDV_SUPPORTED -DIGFX_XE_HPG_CMFCPATCH_SUPPORTED -DIGFX_XE_HPG_SUPPORTED -DMEDIA_VERSION=\"24.2.5\" -DMEDIA_VERSION_DETAILS=\"\" -DVEBOX_AUTO_DENOISE_SUPPORTED=0 -DX11_FOUND -D_AV1_DECODE_SUPPORTED -D_AV1_ENCODE_VDENC_SUPPORTED -D_COMMON_ENCODE_SUPPORTED -D_FULL_OPEN_SOURCE -D_JPEG_DECODE_SUPPORTED -D_JPEG_ENCODE_SUPPORTED -D_MANUAL_SOFTLET_ -D_MMC_SUPPORTED -D_MPEG2_DECODE_SUPPORTED -D_RELEASE -D_VP8_DECODE_SUPPORTED -D_VP9_DECODE_SUPPORTED -D_VP9_ENCODE_VDENC_SUPPORTED -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__VPHAL_SFC_SUPPORTED=1 -I/builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/linux/common/os/xe/include -I/builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/linux/common/os/i915/include -I...hal/packet/vp_vebox_cmd_packet.cpp.o -MF media_driver/CMakeFiles/iHD_drv_video_SOFTLET_VP.dir/__/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp.o.d -o media_driver/CMakeFiles/iHD_drv_video_SOFTLET_VP.dir/__/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp.o -c /builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp
/builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp: In member function ‘virtual MOS_STATUS vp::VpVeboxCmdPacket::VeboxSetPerfTag()’:
/builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp:3066:25: error: ‘VPHAL_VEBOX_RGB32’ was not declared in this scope; did you mean ‘VPHAL_VEBOX_Y416’?
 3066 |             *pPerfTag = VPHAL_VEBOX_RGB32;
      |                         ^~~~~~~~~~~~~~~~~
      |                         VPHAL_VEBOX_Y416
/builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp:3070:25: error: ‘VPHAL_VEBOX_AYUV’ was not declared in this scope; did you mean ‘VPHAL_VEBOX_ACE’?
 3070 |             *pPerfTag = VPHAL_VEBOX_AYUV;
      |                         ^~~~~~~~~~~~~~~~
      |                         VPHAL_VEBOX_ACE
/builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp:3077:25: error: ‘VPHAL_VEBOX_RGB64’ was not declared in this scope; did you mean ‘VPHAL_VEBOX_Y416’?
 3077 |             *pPerfTag = VPHAL_VEBOX_RGB64;
      |                         ^~~~~~~~~~~~~~~~~
      |                         VPHAL_VEBOX_Y416
...
vp_render_kernel_obj.cpp.o.d -o media_driver/CMakeFiles/iHD_drv_video_SOFTLET_VP.dir/__/media_softlet/agnostic/common/vp/hal/packet/vp_render_kernel_obj.cpp.o -c /builddir/build/BUILD/intel-media-driver-e77144d/media_softlet/agnostic/common/vp/hal/packet/vp_render_kernel_obj.cpp
ninja: build stopped: subcommand failed.

RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.Da1Uao (%build)
    Bad exit status from /var/tmp/rpm-tmp.Da1Uao (%build)
Finish: rpmbuild intel-media-driver-free-git_master-0.20240608_092816.pgnd.fc40.src.rpm
Finish: build phase for intel-media-driver-free-git_master-0.20240608_092816.pgnd.fc40.src.rpm
INFO: chroot_scan: 1 files copied to /var/lib/copr-rpmbuild/results/chroot_scan
INFO: /var/lib/mock/fedora-40-x86_64-1717838874.848623/root/var/log/dnf5.log
ERROR: Exception(/var/lib/copr-rpmbuild/results/intel-media-driver-free-git_master-0.20240608_092816.pgnd.fc40.src.rpm) Config(fedora-40-x86_64) 10 minutes 17 seconds
INFO: Results and/or logs in: /var/lib/copr-rpmbuild/results
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
INFO: unmounting tmpfs.
Finish: clean chroot
ERROR: Command failed:
 # /usr/bin/systemd-nspawn -q -M a136157134414278b53aa15557bd9c2f -D /var/lib/mock/fedora-40-x86_64-1717838874.848623/root -a -u mockbuild --capability=cap_ipc_lock --rlimit=RLIMIT_NOFILE=10240 --capability=cap_ipc_lock --bind=/tmp/mock-resolv.t2iah31z:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007"' '--setenv=PS1=<mock-chroot> \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -bb  --target x86_64 --nodeps /builddir/build/originals/intel-media-driver-free-pgnd.spec'

Copr build error: Build failed
paulmenzel commented 5 months ago

Same here on Debian sid/unstable with gcc (Debian 13.2.0-25) 13.2.0 and commit e77144df9 (Fix GCC14 compilation issue).

paulmenzel commented 5 months ago

This might a regression caused by commit https://github.com/intel/media-driver/commit/02d10ce23bc5f9948e7b35a7090b7ec6b7c39602 using these macros. @Alex1Zhang, any idea?

Jexu commented 5 months ago

Please update your gmmlib to latest master, looks commit https://github.com/intel/media-driver/commit/02d10ce23bc5f9948e7b35a7090b7ec6b7c39602 using the new macros from gmmlib definition

paulmenzel commented 5 months ago

Please mention such things in the commit message next time. Shouldn’t the configure scripts (CMake?) also check these things?

Jexu commented 5 months ago

@XinfengZhang @Sherry-Lin We'd better to have a solution to avoid compatibiliy issue from gmm updating. Refering to libva by adding version check?

intel-mediadev commented 5 months ago

Auto Created VSMGWL-74274 for further analysis.

Jexu commented 4 months ago

I will close this issue since it is related to gmm compatibility issue, and please feel free to re-open it again if having any concern.

paulmenzel commented 4 months ago

@Jexu, please do not close the issue. The configure script from media-driver has to check, that all required versions of the dependencies are installed. Passing configure and failing during build is bad practice.

dememax commented 4 months ago

Thanks for signaling the issue! It helped me on my Gentoo with media-libs/libva-intel-media-driver-24.2.5: I've unmasked media-libs/gmmlib-22.4.1