diff mbox series

[1/1] package/libarchive: add bsdunzip option

Message ID 20230916151015.723729-1-fontaine.fabrice@gmail.com
State New
Headers show
Series [1/1] package/libarchive: add bsdunzip option | expand

Commit Message

Fabrice Fontaine Sept. 16, 2023, 3:10 p.m. UTC
Add bsdunzip option to avoid the following build failure raised since
bump to version 3.7.1 in commit 7991d2c48a859f9c0333ade8192868c21b1a8a31 and
https://github.com/libarchive/libarchive/commit/c157e4ce8eb170a92945cc2d292fd7106bdfcce1:

  CCLD     bsdunzip
/home/autobuild/autobuild/instance-4/output-1/host/lib/gcc/powerpc-buildroot-linux-musl/12.3.0/../../../../powerpc-buildroot-linux-musl/bin/ld: cannot find -lz: No such file or directory

Fixes:
 - http://autobuild.buildroot.org/results/aaf7fdefa0b7bd7e5ac743487c197544c1a2ce6f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libarchive/Config.in     |  6 ++++++
 package/libarchive/libarchive.mk | 10 ++++++++++
 2 files changed, 16 insertions(+)

Comments

Arnout Vandecappelle Sept. 22, 2023, 6:38 p.m. UTC | #1
On 16/09/2023 17:10, Fabrice Fontaine wrote:
> Add bsdunzip option to avoid the following build failure raised since
> bump to version 3.7.1 in commit 7991d2c48a859f9c0333ade8192868c21b1a8a31 and
> https://github.com/libarchive/libarchive/commit/c157e4ce8eb170a92945cc2d292fd7106bdfcce1:
> 
>    CCLD     bsdunzip
> /home/autobuild/autobuild/instance-4/output-1/host/lib/gcc/powerpc-buildroot-linux-musl/12.3.0/../../../../powerpc-buildroot-linux-musl/bin/ld: cannot find -lz: No such file or directory
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/aaf7fdefa0b7bd7e5ac743487c197544c1a2ce6f
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>   package/libarchive/Config.in     |  6 ++++++
>   package/libarchive/libarchive.mk | 10 ++++++++++
>   2 files changed, 16 insertions(+)
> 
> diff --git a/package/libarchive/Config.in b/package/libarchive/Config.in
> index ffa4cff7b3..2c8d813ccb 100644
> --- a/package/libarchive/Config.in
> +++ b/package/libarchive/Config.in
> @@ -30,4 +30,10 @@ config BR2_PACKAGE_LIBARCHIVE_BSDCAT
>   	  The 'bsdcat' program is a simple replacement tool
>   	  for zcat, bzcat, xzcat, and such.
>   
> +config BR2_PACKAGE_LIBARCHIVE_BSDUNZIP
> +	bool "bsdunzip"
> +	help
> +	  The 'bsdunzip' program is a simple replacement tool
> +	  for Info-ZIP.
> +
>   endif
> diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk
> index 2db36156b8..7e364e3902 100644
> --- a/package/libarchive/libarchive.mk
> +++ b/package/libarchive/libarchive.mk
> @@ -42,6 +42,16 @@ else
>   LIBARCHIVE_CONF_OPTS += --disable-bsdcat
>   endif
>   
> +ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDUNZIP),y)
> +ifeq ($(BR2_STATIC_LIBS),y)
> +LIBARCHIVE_CONF_OPTS += --enable-bsdunzip=static
> +else
> +LIBARCHIVE_CONF_OPTS += --enable-bsdunzip=shared

  It's not clear to me how this would solve the reported build failure - AFAICS 
it should make no difference at all if bsdunzip is selected.

  So I tried to reproduce the issue, but for me, the build just succeeds...

  Regards,
  Arnout

> +endif
> +else
> +LIBARCHIVE_CONF_OPTS += --disable-bsdunzip
> +endif
> +
>   ifeq ($(BR2_PACKAGE_ACL),y)
>   LIBARCHIVE_DEPENDENCIES += acl
>   else
Bernd Kuhls Oct. 21, 2023, 9:11 a.m. UTC | #2
Am Fri, 22 Sep 2023 20:38:53 +0200 schrieb Arnout Vandecappelle via
buildroot:

>   It's not clear to me how this would solve the reported build failure - 
AFAICS 
> it should make no difference at all if bsdunzip is selected.
> 
>   So I tried to reproduce the issue, but for me, the build just 
succeeds...

Hi Arnout,

using this defconfig http://autobuild.buildroot.net/results/c66/
c66731b330745ef6f6b36d85f808916547317b11/ I could reproduce the build 
error.

It seems that Fabrice is right with his patch because it extends the logic 
we have in place for the last 9 years to the new tool bsdunzip:
https://git.buildroot.net/buildroot/commit/?
id=9581d0d1177d41cc61501e0f93f6089da3c1d4c1

The build error first occured when libarchive was bumped from 3.6.2 to 
3.71 with buildroot commit 7991d2c48a859f9c0333ade8192868c21b1a8a31 due to 
bsdunzip being added in version 3.7.0:
https://github.com/libarchive/libarchive/releases/tag/v3.7.0

Tested-by: Bernd Kuhls <bernd@kuhls.net>

Regards, Bernd
diff mbox series

Patch

diff --git a/package/libarchive/Config.in b/package/libarchive/Config.in
index ffa4cff7b3..2c8d813ccb 100644
--- a/package/libarchive/Config.in
+++ b/package/libarchive/Config.in
@@ -30,4 +30,10 @@  config BR2_PACKAGE_LIBARCHIVE_BSDCAT
 	  The 'bsdcat' program is a simple replacement tool
 	  for zcat, bzcat, xzcat, and such.
 
+config BR2_PACKAGE_LIBARCHIVE_BSDUNZIP
+	bool "bsdunzip"
+	help
+	  The 'bsdunzip' program is a simple replacement tool
+	  for Info-ZIP.
+
 endif
diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk
index 2db36156b8..7e364e3902 100644
--- a/package/libarchive/libarchive.mk
+++ b/package/libarchive/libarchive.mk
@@ -42,6 +42,16 @@  else
 LIBARCHIVE_CONF_OPTS += --disable-bsdcat
 endif
 
+ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDUNZIP),y)
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBARCHIVE_CONF_OPTS += --enable-bsdunzip=static
+else
+LIBARCHIVE_CONF_OPTS += --enable-bsdunzip=shared
+endif
+else
+LIBARCHIVE_CONF_OPTS += --disable-bsdunzip
+endif
+
 ifeq ($(BR2_PACKAGE_ACL),y)
 LIBARCHIVE_DEPENDENCIES += acl
 else