Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/check: fix compile issue
@ 2023-08-07 15:32 Waldemar Brodkorb
  2023-08-07 18:42 ` Daniel Lang
  2023-08-07 20:06 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: Waldemar Brodkorb @ 2023-08-07 15:32 UTC (permalink / raw)
  To: buildroot

Switch to the tagged version of check.
See here for details:
https://github.com/libcheck/check/issues/303

Fixes following autobuild failure:
http://autobuild.buildroot.net/results/b10/b1087e9a67ff0382632b73f280fabe92cd863593/

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 package/check/check.hash | 2 +-
 package/check/check.mk   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/check/check.hash b/package/check/check.hash
index 543e78f317..3d7538b2f2 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  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 d3977154df..dab2b76911 100644
--- a/package/check/check.mk
+++ b/package/check/check.mk
@@ -5,7 +5,8 @@
 ################################################################################
 
 CHECK_VERSION = 0.15.2
-CHECK_SITE = https://github.com/libcheck/check/releases/download/$(CHECK_VERSION)
+CHECK_SOURCE = $(CHECK_VERSION).tar.gz
+CHECK_SITE = https://github.com/libcheck/check/archive/refs/tags
 CHECK_INSTALL_STAGING = YES
 CHECK_DEPENDENCIES = host-pkgconf
 CHECK_LICENSE = LGPL-2.1+
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH] package/check: fix compile issue
  2023-08-07 15:32 [Buildroot] [PATCH] package/check: fix compile issue Waldemar Brodkorb
@ 2023-08-07 18:42 ` Daniel Lang
  2023-08-07 20:06 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Lang @ 2023-08-07 18:42 UTC (permalink / raw)
  To: Waldemar Brodkorb, buildroot

Hello Waldemar,

some quick notes below

On 07.08.23 17:32, Waldemar Brodkorb wrote:
> Switch to the tagged version of check.
> See here for details:
> https://github.com/libcheck/check/issues/303
>
> Fixes following autobuild failure:
> http://autobuild.buildroot.net/results/b10/b1087e9a67ff0382632b73f280fabe92cd863593/

If you just put the following line there:
Fixes:
- http://autobuild.buildroot.net/results/b10/b1087e9a67ff0382632b73f280fabe92cd863593/
patchwork will pick up, that your patch fixes something,
which makes it easier for maintainers to spot the patch.

>
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
>  package/check/check.hash | 2 +-
>  package/check/check.mk   | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/package/check/check.hash b/package/check/check.hash
> index 543e78f317..3d7538b2f2 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  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 d3977154df..dab2b76911 100644
> --- a/package/check/check.mk
> +++ b/package/check/check.mk
> @@ -5,7 +5,8 @@
>  ################################################################################
>
>  CHECK_VERSION = 0.15.2
> -CHECK_SITE = https://github.com/libcheck/check/releases/download/$(CHECK_VERSION)
> +CHECK_SOURCE = $(CHECK_VERSION).tar.gz
> +CHECK_SITE = https://github.com/libcheck/check/archive/refs/tags

When using the autogenerated archive from github, one should use the
github helper as described in the manual [0]:

CHECK_SITE = $(call github,libcheck,check,$(CHECK_VERSION))

CHECK_SOURCE can be dropped. Buildroot will download an archive
named check-0.15.2.tar.gz which will have the same hash as the
one you calculated for 0.15.2.tar.gz

>  CHECK_INSTALL_STAGING = YES
>  CHECK_DEPENDENCIES = host-pkgconf
>  CHECK_LICENSE = LGPL-2.1+
[0]: https://buildroot.org/downloads/manual/manual.html#github-download-url

Regards
Daniel

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH] package/check: fix compile issue
  2023-08-07 15:32 [Buildroot] [PATCH] package/check: fix compile issue Waldemar Brodkorb
  2023-08-07 18:42 ` Daniel Lang
@ 2023-08-07 20:06 ` Thomas Petazzoni via buildroot
  2023-08-24 19:44   ` Yann E. MORIN
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-07 20:06 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: Daniel Lang, buildroot

Hello Waldemar,

On Mon, 7 Aug 2023 17:32:33 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> Switch to the tagged version of check.
> See here for details:
> https://github.com/libcheck/check/issues/303
> 
> Fixes following autobuild failure:
> http://autobuild.buildroot.net/results/b10/b1087e9a67ff0382632b73f280fabe92cd863593/
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>

This commit log was too terse, because it doesn't describe when the
problem started occurring, which is important for the maintenance of
our stable branches. So I had to do quite some research to figure out,
and come up with the following commit log:

    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 <wbx@openadk.org>
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

As pointed out by Daniel Lang, using "Fixes:" is important, as it has a
special meaning for patchwork.

>  CHECK_VERSION = 0.15.2
> -CHECK_SITE = https://github.com/libcheck/check/releases/download/$(CHECK_VERSION)
> +CHECK_SOURCE = $(CHECK_VERSION).tar.gz
> +CHECK_SITE = https://github.com/libcheck/check/archive/refs/tags

Switched to using the github helper, exactly like Daniel Lang suggested.

Applied to master with those changes. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH] package/check: fix compile issue
  2023-08-07 20:06 ` Thomas Petazzoni via buildroot
@ 2023-08-24 19:44   ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2023-08-24 19:44 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Daniel Lang, buildroot

Thomas, Waldemar, All,

On 2023-08-07 22:06 +0200, Thomas Petazzoni via buildroot spake thusly:
> On Mon, 7 Aug 2023 17:32:33 +0200
> Waldemar Brodkorb <wbx@openadk.org> wrote:
> > Switch to the tagged version of check.
> > See here for details:
> > https://github.com/libcheck/check/issues/303
[--SNIP--]
>     Until upstream publishes a new release with a complete tarball, switch
>     to fetching the Github-generated tarball, which does contain the
>     missing file.
[--SNIP--]
> >  CHECK_VERSION = 0.15.2
> > -CHECK_SITE = https://github.com/libcheck/check/releases/download/$(CHECK_VERSION)
> > +CHECK_SOURCE = $(CHECK_VERSION).tar.gz
> > +CHECK_SITE = https://github.com/libcheck/check/archive/refs/tags
> Switched to using the github helper, exactly like Daniel Lang suggested.

This is incorrect, because the archive content changes, but the archive
filename does not; hence the copy we host on s.b.o. is invalid, and
since we've had check-0.15.2 since 2021-04-06, we've had a few releases
already that uses that version.

So we can't replace the one on s.b.o with the new one.

Instead, the only solution is to switch to using a git hash instead of
the tag.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-24 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07 15:32 [Buildroot] [PATCH] package/check: fix compile issue Waldemar Brodkorb
2023-08-07 18:42 ` Daniel Lang
2023-08-07 20:06 ` Thomas Petazzoni via buildroot
2023-08-24 19:44   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox