Article View: linux.debian.bugs.dist
Article #5999Bug#1155166: dlt-daemon FTCBFS: hard codes the build architecture pkg-config
From: Helmut Grohne
Date: Tue, 24 Nov 2026 21:00
Date: Tue, 24 Nov 2026 21:00
55 lines
3526 bytes
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--
Technical Details
Message-ID:
<O35Ml-dWvb-7@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Helmut Grohne <helmut@subdivi.de> Newsgroups: linux.debian.bugs.dist Subject: Bug#1155166: dlt-daemon FTCBFS: hard codes the build architecture pkg-config Date: Tue, 24 Nov 2026 22:00:01 +0100 Message-ID: <O35Ml-dWvb-7@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Nov 24 20:51:13 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Helmut Grohne <helmut@subdivi.de>, 1155166@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: aigarius@debian.org X-Debian-Pr-Message: report 1155166 X-Debian-Pr-Package: src:dlt-daemon X-Debian-Pr-Keywords: patch upstream X-Debian-Pr-Source: dlt-daemon MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1A5GLuVR0bixuVv4" Content-Disposition: inline X-Reportbug-Version: 13.2.0 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004777 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 55 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 22 Nov 2026 20:56:57 +0100 X-Original-Message-ID: <20261122195657.GA4112739@subdivi.de>