obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.14k stars 7.96k forks source link

Fail to build with ffnvcodec-headers 12.2.72.0 #10493

Closed Integral-Tech closed 6 months ago

Integral-Tech commented 6 months ago

Operating System Info

Other

Other OS

Arch Linux

OBS Studio Version

Git

OBS Studio Version (Other)

No response

OBS Studio Log URL

Not related

OBS Studio Crash Log URL

No response

Expected Behavior

The build process should finish without any error.

Current Behavior

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find FFnvcodec: Found unsuitable version "12.2.72.0", required
  range is "12.0.0.0...<12.2.0.0" (found /usr/include)

      Reason given by package: Ensure FFnvcodec headers are available in local include paths.

Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindFFnvcodec.cmake:78 (find_package_handle_standard_args)
  plugins/obs-ffmpeg/cmake/legacy.cmake:118 (find_package)
  cmake/Modules/ObsHelpers.cmake:473 (include)
  plugins/obs-ffmpeg/CMakeLists.txt:3 (legacy_check)

-- Configuring incomplete, errors occurred!

Steps to Reproduce

  1. Install the latest version of ffnvcodec-headers on Arch Linux
  2. Clone the source code of obs-studio on the master branch
  3. Build it

Anything else we should know?

No response

Penwy commented 6 months ago

As the message states, 12.2.72.0 is outside the required range, revert to a 12.0 or 12.1 version.

derrod commented 6 months ago

12.2 is not supported yet, this will likely change after the next release as we get to remove some things that make supporting this new version difficult (Kepler backwards compatibility).

fat-tire commented 6 months ago

Can't build on ubuntu 22.04 either .

Could NOT find FFnvcodec: Found unsuitable version "11.1.5.1", required range is "12.0.0.0...<12.2.0.0" (found /usr/include)

Will play around a bit more.

derrod commented 6 months ago

You will either need to install a supported version of the headers (12.0 or 12.1), or disable native NVENC like we do on CI (-DENABLE_NATIVE_NVENC=OFF).

fat-tire commented 6 months ago

For now I'm going to try manually pulling in https://github.com/FFmpeg/nv-codec-headers/tree/n12.1.14.0 and then adding -I/thepath to the cmake and we'll see if that works... I'll report back.

Update: doesnt' seem to find the /include path, and I'm building in a container and dont' want to complicate the Dockerfile too much, so for the moment I'll just disable NVEC. Thx.