Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 958194 - media-video/handbrake-1.9.2 Compatibility with CMake < 3.5 has been removed from CMake
Summary: media-video/handbrake-1.9.2 Compatibility with CMake < 3.5 has been removed f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: cmake without cmake.eclass
Keywords: PullRequest
Depends on:
Blocks: cmake-4 959316
  Show dependency tree
 
Reported: 2025-06-15 10:17 UTC by Julien Delquié
Modified: 2025-06-30 16:38 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=media-video/handbrake-1.9.2::gentoo' (emerge--info.txt,8.59 KB, text/plain)
2025-06-15 10:17 UTC, Julien Delquié
Details
/var/tmp/portage/media-video/handbrake-1.9.2/temp/build.log (build.log,17.48 KB, text/plain)
2025-06-15 10:18 UTC, Julien Delquié
Details
/var/tmp/portage/media-video/handbrake-1.9.2/temp/environment (environment,94.01 KB, text/plain)
2025-06-15 10:18 UTC, Julien Delquié
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Delquié 2025-06-15 10:17:22 UTC
Impossible to rebuild media-video/handbrake-1.9.2

-- cmake version 4.0.3                                                                                                                                                                                                                                                           
CMake Error at CMakeLists.txt:10 (cmake_policy):                                                                                                                                                                                                                                 
  Policy CMP0025 may not be set to OLD behavior because this version of CMake                                                                                                                                                                                                    
  no longer supports it.  The policy was introduced in CMake version 3.0.0,                                                                                                                                                                                                      
  and use of NEW behavior is now required.                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                 
  Please either update your CMakeLists.txt files to conform to the new                                                                                                                                                                                                           
  behavior or use an older version of CMake that still supports the old                                                                                                                                                                                                          
  behavior.  Run cmake --help-policy CMP0025 for more information.                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                 
CMake Error at CMakeLists.txt:16 (cmake_policy):                                                                                                                                                                                                                                 
  Policy CMP0054 may not be set to OLD behavior because this version of CMake                                                                                                                                                                                                    
  no longer supports it.  The policy was introduced in CMake version 3.1.0,                                                                                                                                                                                                      
  and use of NEW behavior is now required.                  
                                                                                                                                        
  Please either update your CMakeLists.txt files to conform to the new         
  behavior or use an older version of CMake that still supports the old
  behavior.  Run cmake --help-policy CMP0054 for more information.  
                                                                    
                                                                    
CMake Warning (dev) at CMakeLists.txt:19 (project):                 
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.                                                    
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 15.1.0            
-- The CXX compiler identification is GNU 15.1.0                    
-- Detecting C compiler ABI info                                    
-- Detecting C compiler ABI info - done                 
-- Check for working C compiler: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features                                     
-- Detecting C compile features - done                  
-- Detecting CXX compiler ABI info          
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features                                   
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.
                                                                    
  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

                                                                    
-- Configuring incomplete, errors occurred!                         
make: *** [../contrib/x265_8bit/module.rules:2: contrib/x265/.stamp.x265_8.configure] Error 1
make: *** Waiting for unfinished jobs....               
touch contrib/ffmpeg/.stamp.ffmpeg.extract  
make: Leaving directory '/var/tmp/portage/media-video/handbrake-1.9.2/work/HandBrake-1.9.2/build'


Reproducible: Always

Steps to Reproduce:
1. try to rebuild media-video/handbrake-1.9.2
Actual Results:  
It does not build.

Expected Results:  
It builds.

$ emerge -pqv '=media-video/handbrake-1.9.2::gentoo'
[ebuild   R   ] media-video/handbrake-1.9.2  USE="amf fdk gui x265 -libdovi -numa -nvenc -qsv"
Comment 1 Julien Delquié 2025-06-15 10:17:46 UTC
Created attachment 934408 [details]
emerge --info '=media-video/handbrake-1.9.2::gentoo'
Comment 2 Julien Delquié 2025-06-15 10:18:26 UTC
Created attachment 934409 [details]
/var/tmp/portage/media-video/handbrake-1.9.2/temp/build.log
Comment 3 Julien Delquié 2025-06-15 10:18:45 UTC
Created attachment 934410 [details]
/var/tmp/portage/media-video/handbrake-1.9.2/temp/environment
Comment 4 Alfred Wingate 2025-06-15 11:48:12 UTC
This is fixed in the next (unreleased) version by virtue of updating the vendored x265. Otherwise we will have patch it ourselves through whatever mechanism upstream uses themselves.

https://bitbucket.org/multicoreware/x265_git/commits/51ae8e922bcc4586ad4710812072289af91492a8
https://github.com/HandBrake/HandBrake/commit/2ac30707771311e131296f5854b5381801bd07d1
Comment 5 Reva Denis 2025-06-15 16:39:20 UTC
They clearly says that 1.9.x is not supported with >=cmake-4. https://github.com/HandBrake/HandBrake/issues/6855#issuecomment-2847873350
So I suggest to limit cmake version as build depend.
Comment 6 Andreas Sturmlechner gentoo-dev 2025-06-15 18:16:44 UTC
(In reply to Reva Denis from comment #5)
> So I suggest to limit cmake version as build depend.
That's not acceptable.
Comment 7 Larry the Git Cow gentoo-dev 2025-06-15 22:30:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c277d74e35cac56dd63b1e9d0fc754823f39a12f

commit c277d74e35cac56dd63b1e9d0fc754823f39a12f
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-06-15 21:28:45 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-06-15 22:28:22 +0000

    media-video/handbrake: handle cmake4 in x265
    
    Bug: https://bugs.gentoo.org/958194
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Part-of: https://github.com/gentoo/gentoo/pull/42616
    Closes: https://github.com/gentoo/gentoo/pull/42616
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/handbrake-1.9.2-x265-cmake4.patch        | 101 +++++++++++++++++++++
 media-video/handbrake/handbrake-1.9.2-r1.ebuild    |   5 +
 2 files changed, 106 insertions(+)
Comment 8 Reva Denis 2025-06-16 07:46:30 UTC
Thank you maintainers for your effort.