From c0b7eb626e9c6bbf76ada56002dbb0a3d3aebe04 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 7 Aug 2023 17:32:33 +0200 Subject: [PATCH] package/check: fix compile issue due to missing source file The release tarball of check 0.15.2 lacks a source file, causing a build failure, as reported at https://github.com/libcheck/check/issues/303. This failures happens when thread support is not available, as the file missing is getting compiled in when thread support is not there: if(NOT HAVE_PTHREAD) target_sources(check PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../lib/pthread_mutex.c) target_sources(checkShared PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../lib/pthread_mutex.c) endif() This issue started appearing when we moved from the autotools build system to the CMake build system in commit 6dfc789f4f21367bc5f4b5454db0922821a765bc. One might wonder why changing the build system can cause this kind of issue: the file was in fact already missing. Turns out that the missing file is never used with the autotools build system: this file provides some Win32 compatibility layer for pthread functions, so the autotools build system never compiled this file as the autotools build system was only used on Unix platforms. With CMake it now gets compiled to support Windows platform. But on Linux, the entire contents of the file is ignored as it is within a HAVE_WIN32_INIT_ONCE ifdef...endif. Still, with the file missing, the build fails. Until upstream publishes a new release with a complete tarball, switch to fetching the Github-generated tarball, which does contain the missing file. Fixes: http://autobuild.buildroot.net/results/b1087e9a67ff0382632b73f280fabe92cd863593/ Signed-off-by: Waldemar Brodkorb Signed-off-by: Thomas Petazzoni --- package/check/check.hash | 2 +- package/check/check.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/check/check.hash b/package/check/check.hash index 543e78f317ed..9b380ddc2886 100644 --- a/package/check/check.hash +++ b/package/check/check.hash @@ -1,4 +1,4 @@ # Locally computed -sha256 a8de4e0bacfb4d76dd1c618ded263523b53b85d92a146d8835eb1a52932fa20a check-0.15.2.tar.gz +sha256 998d355294bb94072f40584272cf4424571c396c631620ce463f6ea97aa67d2e check-0.15.2.tar.gz # License files, locally calculated sha256 a9bdde5616ecdd1e980b44f360600ee8783b1f99b8cc83a2beb163a0a390e861 COPYING.LESSER diff --git a/package/check/check.mk b/package/check/check.mk index d3977154df2f..0bdc9b93ef38 100644 --- a/package/check/check.mk +++ b/package/check/check.mk @@ -5,7 +5,7 @@ ################################################################################ CHECK_VERSION = 0.15.2 -CHECK_SITE = https://github.com/libcheck/check/releases/download/$(CHECK_VERSION) +CHECK_SITE = $(call github,libcheck,check,$(CHECK_VERSION)) CHECK_INSTALL_STAGING = YES CHECK_DEPENDENCIES = host-pkgconf CHECK_LICENSE = LGPL-2.1+