🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Helmut Grohne Tue, 24 Nov 2026 21:00
Bug#1155166: dlt-daemon FTCBFS: hard codes the build architecture pkg-config
#5999
Author: Helmut Grohne
Date: Tue, 24 Nov 2026 21:00
55 lines
3526 bytes
--1A5GLuVR0bixuVv4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Source: dlt-daemon
Version: 3.0.0-10
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs

dlt-daemon fails to cross build from source, because the upstream
CMakeLists.txt hard codes the build architecture pkg-config and
therefore fails to locate gtest. A side-quest of this is that running
tests is not feasible during cross compilation, but skipping the build
of tests actually changes the package contents, so doing so would break
reproducibility and is not an option. The reason it uses pkg-config is
to discover the version of gtest. While find_package cannot easily
report the version, one can pass a minimum required version. The
attached patch changes the logic to do that and thus avoids the breaking
pkg-config invocation. What do you think? Please propose this upstream
as it also helps other cross-building distributions such as PtxDist or
Yocto.

Helmut

--1A5GLuVR0bixuVv4
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="cross.patch"

--- dlt-daemon-3.0.0.orig/CMakeLists.txt
+++ dlt-daemon-3.0.0/CMakeLists.txt
@@ -450,17 +450,9 @@
 endif()
 
 if(WITH_DLT_UNIT_TESTS)
-    find_package(GTest)
-    if(GTEST_FOUND)
-        find_package(PkgConfig REQUIRED)
-        execute_process(COMMAND pkg-config --modversion gtest OUTPUT_VARIABLE GTEST_VERSION)
-        string(REPLACE "\n" "" GTEST_VERSION ${GTEST_VERSION})
-        if(${GTEST_VERSION} VERSION_LESS 1.7.0)
-            message(WARNING "Please use Gtest version greater or equal to 1.7.0,
-                    or use option 'WITH_GIT_SUBMODULE' for latest version")
-        endif()
-    else()
-        message(STATUS "No Gtest package found, preparing submodule ...")
+    find_package(GTest 1.7.0)
+    if(NOT GTEST_FOUND)
+        message(STATUS "No suitable Gtest package found, preparing submodule ...")
         set(WITH_GIT_SUBMODULE ON)
     endif()
 

--1A5GLuVR0bixuVv4--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads