Bug#1113125: libccd: FTBFS with CMake 4

Simon McVittie smcv at debian.org
Fri Sep 26 16:57:59 BST 2025


Control: tags -1 + patch

On Mon, 01 Sep 2025 at 00:57:40 +0200, roehling at debian.org wrote:
>During a test rebuild for CMake 4, libccd failed to rebuild.
...
>The most likely cause of build failures is the removed backwards compatibility for
>CMake versions earlier than 3.5.
>
>You can find additional information in my
>debian-devel announcement:
>
>https://lists.debian.org/debian-devel/2025/04/msg00310.html

The attached patch addresses this for libccd.

Building with CMake 4 does result in some minor changes to the .cmake 
files installed by this library: it appears that the new CMake is 
treating glibc's libm as part of the API, where previously it was 
treated as an internal implementation detail. Before uploading, please 
check whether this is acceptable. (It seems reasonable to me, but I am 
not a CMake expert.)

diffoscope output, comparing a reference build in today's unstable with 
a version that has the proposed patch and was built with experimental's 
cmake as an additional build-dependency:

│ │ │ ├── ./usr/lib/x86_64-linux-gnu/ccd/ccd-targets-none.cmake
│ │ │ │ @@ -4,15 +4,14 @@
│ │ │ │
│ │ │ │  # Commands may need to know the format version.
│ │ │ │  set(CMAKE_IMPORT_FILE_VERSION 1)
│ │ │ │
│ │ │ │  # Import target "ccd" for configuration "None"
│ │ │ │  set_property(TARGET ccd APPEND PROPERTY IMPORTED_CONFIGURATIONS NONE)
│ │ │ │  set_target_properties(ccd PROPERTIES
│ │ │ │ -  IMPORTED_LINK_INTERFACE_LIBRARIES_NONE "/usr/lib/x86_64-linux-gnu/libm.so"
│ │ │ │    IMPORTED_LOCATION_NONE "${_IMPORT_PREFIX}/lib/x86_64-linux-gnu/libccd.so.2.0"
│ │ │ │    IMPORTED_SONAME_NONE "libccd.so.2"
│ │ │ │    )
│ │ │ │
│ │ │ │  list(APPEND _cmake_import_check_targets ccd )
│ │ │ │  list(APPEND _cmake_import_check_files_for_ccd "${_IMPORT_PREFIX}/lib/x86_64-linux-gnu/libccd.so.2.0" )
│ │ │ ├── ./usr/lib/x86_64-linux-gnu/ccd/ccd-targets.cmake
│ │ │ │ @@ -1,17 +1,17 @@
│ │ │ │  # Generated by CMake
│ │ │ │
│ │ │ │  if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
│ │ │ │ -   message(FATAL_ERROR "CMake >= 2.8.3 required")
│ │ │ │ +   message(FATAL_ERROR "CMake >= 2.8.12 required")
│ │ │ │  endif()
│ │ │ │ -if(CMAKE_VERSION VERSION_LESS "2.8.3")
│ │ │ │ -   message(FATAL_ERROR "CMake >= 2.8.3 required")
│ │ │ │ +if(CMAKE_VERSION VERSION_LESS "2.8.12")
│ │ │ │ +   message(FATAL_ERROR "CMake >= 2.8.12 required")
│ │ │ │  endif()
│ │ │ │  cmake_policy(PUSH)
│ │ │ │ -cmake_policy(VERSION 2.8.3...3.29)
│ │ │ │ +cmake_policy(VERSION 2.8.12...3.31)
│ │ │ │  #----------------------------------------------------------------
│ │ │ │  # Generated CMake target import file.
│ │ │ │  #----------------------------------------------------------------
│ │ │ │
│ │ │ │  # Commands may need to know the format version.
│ │ │ │  set(CMAKE_IMPORT_FILE_VERSION 1)
│ │ │ │
│ │ │ │ @@ -65,14 +65,15 @@
│ │ │ │  endif()
│ │ │ │
│ │ │ │  # Create imported target ccd
│ │ │ │  add_library(ccd SHARED IMPORTED)
│ │ │ │
│ │ │ │  set_target_properties(ccd PROPERTIES
│ │ │ │    INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
│ │ │ │ +  INTERFACE_LINK_LIBRARIES "/usr/lib/x86_64-linux-gnu/libm.so"
│ │ │ │  )
│ │ │ │
│ │ │ │  # Load information for each installed configuration.
│ │ │ │  file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/ccd-targets-*.cmake")
│ │ │ │  foreach(_cmake_config_file IN LISTS _cmake_config_files)
│ │ │ │    include("${_cmake_config_file}")
│ │ │ │  endforeach()

I hope this is helpful,
     smcv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-d-rules-Declare-compatibility-with-modern-CMake-vers.patch
Type: text/x-diff
Size: 677 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20250926/8005b84b/attachment.patch>


More information about the debian-science-maintainers mailing list