Public bug reported:

libevhtp 1.2.18-2.1build6 (no-change rebuild against libssl4) fails to build 
from source on all architectures in stonking-proposed:
https://launchpad.net/ubuntu/+source/libevhtp/1.2.18-2.1build6
Build log (amd64): 
https://launchpad.net/ubuntu/+source/libevhtp/1.2.18-2.1build6/+build/33435501/+files/buildlog_ubuntu-stonking-amd64.libevhtp_1.2.18-2.1build6_BUILDING.txt.gz

The build fails at CMake configure time with CMake 4.3.4:

  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from CMake.

This is Debian bug #1113148 (libevhtp: FTBFS with CMake 4, severity
serious), open and unfixed since 2025-08-31; libevhtp has been removed
from Debian testing because of it. Upstream (criticalstack/libevhtp,
develop branch) still declares VERSION 3.1.

There are two problems, the second only visible once the first is fixed:
1. CMakeLists.txt:1 has cmake_minimum_required(VERSION 3.1).
2. The bundled cmake/TestBigEndian.cmake configures 
${CMAKE_ROOT}/Modules/TestEndianess.c.in, which CMake 4 installs as 
TestEndianness.c.in, so configure still fails. CMake's own TestBigEndian module 
provides the same test_big_endian() macro. This check matters: HOST_BIG_ENDIAN 
selects the byte-order-specific comparisons in parser.c (relevant for s390x).

Proposed patch (raise the minimum to 3.5 and drop the bundled
TestBigEndian.cmake so the CMake-provided module is used). It applies
cleanly after the existing 144.patch using dpkg-source's patch options:

Description: Fix FTBFS with CMake 4
 - Raise cmake_minimum_required to 3.5; CMake 4 removed compatibility
   with versions < 3.5.
 - Drop the bundled copy of TestBigEndian.cmake. It configures
   ${CMAKE_ROOT}/Modules/TestEndianess.c.in, which no longer exists
   (now TestEndianness.c.in). CMake's own TestBigEndian module provides
   the same test_big_endian() macro and is used instead.
Author: OpenCode
Bug-Debian: https://bugs.debian.org/1113148
Forwarded: no
Last-Update: 2026-09-30

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
 
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 
--- a/cmake/TestBigEndian.cmake
+++ b/cmake/TestBigEndian.cmake
@@ -1,119 +0,0 @@
-#.rst:
-# TestBigEndian
-# -------------
-#
-# Define macro to determine endian type
-#
-# Check if the system is big endian or little endian
-#
-# ::
-#
-#   TEST_BIG_ENDIAN(VARIABLE)
-#   VARIABLE - variable to store the result to
-
-#=============================================================================
-# Copyright 2002-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-macro(TEST_BIG_ENDIAN VARIABLE)
-  if(NOT DEFINED HAVE_${VARIABLE})
-    message(STATUS "Check if the system is big endian")
-    message(STATUS "Searching 16 bit integer")
-
-    include(CheckTypeSize)
-
-    CHECK_TYPE_SIZE("unsigned short" CMAKE_SIZEOF_UNSIGNED_SHORT)
-    if(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2)
-      message(STATUS "Using unsigned short")
-      set(CMAKE_16BIT_TYPE "unsigned short")
-    else()
-      CHECK_TYPE_SIZE("unsigned int"   CMAKE_SIZEOF_UNSIGNED_INT)
-      if(CMAKE_SIZEOF_UNSIGNED_INT)
-        message(STATUS "Using unsigned int")
-        set(CMAKE_16BIT_TYPE "unsigned int")
-
-      else()
-
-        CHECK_TYPE_SIZE("unsigned long"  CMAKE_SIZEOF_UNSIGNED_LONG)
-        if(CMAKE_SIZEOF_UNSIGNED_LONG)
-          message(STATUS "Using unsigned long")
-          set(CMAKE_16BIT_TYPE "unsigned long")
-        else()
-          message(FATAL_ERROR "no suitable type found")
-        endif()
-
-      endif()
-
-    endif()
-
-
-    configure_file("${CMAKE_ROOT}/Modules/TestEndianess.c.in"
-                   
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
-                   @ONLY)
-
-     file(READ 
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
-          TEST_ENDIANESS_FILE_CONTENT)
-
-     try_compile(HAVE_${VARIABLE}
-      "${CMAKE_BINARY_DIR}"
-      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
-      OUTPUT_VARIABLE OUTPUT
-      COPY_FILE 
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin" )
-
-      if(HAVE_${VARIABLE})
-
-        file(STRINGS 
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin"
-            CMAKE_TEST_ENDIANESS_STRINGS_LE LIMIT_COUNT 1 REGEX "THIS IS 
LITTLE ENDIAN")
-
-        file(STRINGS 
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin"
-            CMAKE_TEST_ENDIANESS_STRINGS_BE LIMIT_COUNT 1 REGEX "THIS IS BIG 
ENDIAN")
-
-        # on mac, if there are universal binaries built both will be true
-        # return the result depending on the machine on which cmake runs
-        if(CMAKE_TEST_ENDIANESS_STRINGS_BE  AND  
CMAKE_TEST_ENDIANESS_STRINGS_LE)
-          if(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
-            set(CMAKE_TEST_ENDIANESS_STRINGS_BE TRUE)
-            set(CMAKE_TEST_ENDIANESS_STRINGS_LE FALSE)
-          else()
-            set(CMAKE_TEST_ENDIANESS_STRINGS_BE FALSE)
-            set(CMAKE_TEST_ENDIANESS_STRINGS_LE TRUE)
-          endif()
-          message(STATUS "TEST_BIG_ENDIAN found different results, consider 
setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one 
or no architecture !")
-        endif()
-
-        if(CMAKE_TEST_ENDIANESS_STRINGS_LE)
-          set(${VARIABLE} 0 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
-          message(STATUS "Check if the system is big endian - little endian")
-        endif()
-
-        if(CMAKE_TEST_ENDIANESS_STRINGS_BE)
-          set(${VARIABLE} 1 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
-          message(STATUS "Check if the system is big endian - big endian")
-        endif()
-
-        if(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE  AND  NOT 
CMAKE_TEST_ENDIANESS_STRINGS_LE)
-          message(SEND_ERROR "TEST_BIG_ENDIAN found no result!")
-        endif()
-
-        file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
-          "Determining if the system is big endian passed with the following 
output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n")
-
-      else()
-        message(STATUS "Check if the system is big endian - failed")
-        file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
-          "Determining if the system is big endian failed with the following 
output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n")
-        set(${VARIABLE})
-      endif()
-  endif()
-endmacro()
-
-

Tested locally with CMake 4.4.3: unmodified source reproduces the error;
with only the minimum raised it fails on the missing TestEndianess.c.in;
with the patch, configure and build succeed (libevhtp.so.1.2.18 built,
HOST_BIG_ENDIAN correctly unset on amd64). Limitations: C-only test copy
(no g++ available locally; the code is pure C), CMake 4.4.3 rather than
stonking's 4.3.4, no full package build (doxygen/install steps not run),
not tested on a big-endian machine.

Suggested next steps: upload 1.2.18-2.1ubuntu1 with the patch, and
forward it to Debian bug #1113148.

** Affects: libevhtp (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: stonking update-excuse

** Tags added: update-excuse

** Tags added: ston

** Tags removed: ston
** Tags added: stonking

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2168953

Title:
  libevhtp FTBFS with CMake 4: cmake_minimum_required < 3.5 and bundled
  TestBigEndian.cmake

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libevhtp/+bug/2168953/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to