intel / intel/media-driver

[Bug]: With ninja generator, multiple rules generate ...media_common/agnostic/common/vp/kernel/vpkrnheader.h with DBUILD_KERNELS and DENABLE_KERNELS

Open
#1,747 4 comments 0 reactions 1 assignee Claimed by @MicroYY View on GitHub
Build Common P3
Dominant language
C
Stars
1.2k
Forks
383
Avg merge
8d 18h
Merged PRs (30d)
4

Description

### Which component impacted?

Build

### Is it regression? Good in old configuration?

Yes, it's good in old version

### What happened?

I gave a shot to try free kernels building after some time (if by any chance https://github.com/intel/media-driver/issues/1356 got resolved).

The command line used was:

`/usr/bin/cmake -S . -B redhat-linux-build -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_NONFREE_KERNELS:BOOL=OFF -DENABLE_KERNELS:BOOL=ON -DBUILD_KERNELS:BOOL=ON -DMEDIA_BUILD_FATAL_WARNINGS=OFF -DVC1_Decode_Supported=no -DAVC_Encode_VME_Supported=no -DAVC_Encode_VDEnc_Supported=no -DHEVC_Encode_VME_Supported=no -DHEVC_Encode_VDEnc_Supported=no -DAVC_Decode_Supported=no -DHEVC_Decode_Supported=no -DAVC_Decode_Supported=no -G Ninja`

And the build ended with:

Run Build Command(s): /usr/bin/ninja-build -v -j 12
`ninja: error: build.ninja:45204: multiple rules generate /builddir/build/BUILD/media-driver-intel-media-23.4.2/media_common/agnostic/common/vp/kernel/vpkrnheader.h`

I am testing the 23.4.2 tag, with kernels removed as per https://github.com/intel/media-driver/wiki/Media-Driver-Shaders-%28EU-Kernels%29#disable-shaders-at-compile-time . Build with DBUILD_KERNELS and DENABLE_KERNELS both set to OFF works fine.

Full buildlog:

[build.log](https://github.com/intel/media-driver/files/13552290/build.log)

### What's the usage scenario when you are seeing the problem?

Others

### What impacted?

_No response_

### Debug Information

_No response_

### Do you want to contribute a patch to fix the issue?

None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.