obsproject/obs-studio

OBS Studio 30.1.0-beta1 FTBFS on NixOS due to a sign-compare warning in QSV_Encoder_Internal.cpp

Open

#10,200 opened on Feb 4, 2024

View on GitHub
 (12 comments) (0 reactions) (0 assignees)C (72,387 stars) (9,239 forks)batch import
Good first issueplatform/linux

Description

Operating System Info

Other

Other OS

NixOS 23.11

OBS Studio Version

30.1.0-beta1

OBS Studio Version (Other)

No response

OBS Studio Log URL

This is a build failure, so no runtime logs are available

OBS Studio Crash Log URL

No response

Expected Behavior

OBS Studio 30.1.0-beta1 should compile successfully.

Current Behavior

OBS Studio 30.1.0-beta1 FTBFS due to a sign-compare warning being raised as an error. Here is the error from the build logs.

obs-studio> /build/source/plugins/obs-qsv11/QSV_Encoder_Internal.cpp:337:50: error: comparison of integer expressions of different signedness: 'int' and 'const uint32_t' {aka 'const unsigned int'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsign-compare-Werror=sign-compare8;;]
obs-studio>   337 |             (pParams->nWidth * pParams->nHeight) >= pixelcount_4k) {

Steps to Reproduce

  1. Use NixOS 23.11
  2. Create a local package for libdatachannel 0.20.1 (example)
  3. Create a local package for OBS Studio 30.1.0-beta1 (example)
  4. nix build .#obs-studio -L

Anything else we should know?

Line 337 that raises the warning was introduced in this commit:

The build can be coerced to complete successfully by passing -Wno-error=sign-compare to cmake.

Contributor guide