diff mbox series

[1/1] package/host-mtd: fixes build

Message ID 1564402300-3993-1-git-send-email-julien.boibessot@free.fr
State Changes Requested
Headers show
Series [1/1] package/host-mtd: fixes build | expand

Commit Message

Julien Boibessot July 29, 2019, 12:11 p.m. UTC
From: Julien BOIBESSOT <julien.boibessot@armadeus.com>

Fixes following build error when Host doesn't have zstd devt files:
  configure: WARNING: cannot find ZSTD library required for mkfs program
  configure: mtd-utils can optionally be built without mkfs.ubifs
  configure: mtd-utils can optionally be built without ZSTD support
  configure: WARNING: cannot find headers for OpenSSL library
  configure: WARNING: disabling OpenSSL support
  configure: error: missing one or more dependencies
  package/pkg-generic.mk:228: recipe for target '/workspace/buildroot_git_devt/output/build/host-mtd-2.1.1/.stamp_configured' failed
  make: *** [/workspace/buildroot_git_devt/output/build/host-mtd-2.1.1/.stamp_configured] Error 1

Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com>
---
 package/mtd/mtd.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Markus Mayer July 30, 2019, 8:44 p.m. UTC | #1
On Mon, 29 Jul 2019 at 05:11, <julien.boibessot@free.fr> wrote:
>
> From: Julien BOIBESSOT <julien.boibessot@armadeus.com>
>
> Fixes following build error when Host doesn't have zstd devt files:
>   configure: WARNING: cannot find ZSTD library required for mkfs program
>   configure: mtd-utils can optionally be built without mkfs.ubifs
>   configure: mtd-utils can optionally be built without ZSTD support
>   configure: WARNING: cannot find headers for OpenSSL library
>   configure: WARNING: disabling OpenSSL support
>   configure: error: missing one or more dependencies
>   package/pkg-generic.mk:228: recipe for target '/workspace/buildroot_git_devt/output/build/host-mtd-2.1.1/.stamp_configured' failed
>   make: *** [/workspace/buildroot_git_devt/output/build/host-mtd-2.1.1/.stamp_configured] Error 1

I ran into the same issue following the bump of mtd-utils to 2.1.1,
and this patch took care of it for me. Therefore

Tested-by: Markus Mayer <mmayer@broadcom.com>

Regards,
-Markus

> Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com>
> ---
>  package/mtd/mtd.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
> index 0de14db..65e7622 100644
> --- a/package/mtd/mtd.mk
> +++ b/package/mtd/mtd.mk
> @@ -46,7 +46,7 @@ else
>  MTD_CONF_OPTS += --without-xattr
>  endif
>
> -HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-util-linux
> +HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-util-linux host-zstd
>  HOST_MTD_CONF_OPTS = \
>         --with-jffs \
>         --with-ubifs \
> --
> 2.1.4
Thomas Petazzoni July 31, 2019, 7:25 a.m. UTC | #2
Hello Julien,

The commit title should rather be:

	package/mtd: add host-zstd dependency to host variant to fix build

On Mon, 29 Jul 2019 14:11:40 +0200
julien.boibessot@free.fr wrote:

> From: Julien BOIBESSOT <julien.boibessot@armadeus.com>
> 
> Fixes following build error when Host doesn't have zstd devt files:

This should also mention that the issue was introduced in the commit
bumping to 2.1.1, and add references to the autobuilder failures.

However, why does this problem only occurs for the host variant, and
not the target variant.

Why is this warning causing a build failure ? Normally warnings are
just warnings, not errors.

Is this zstd dependency optional somehow ?

Thanks,

Thomas
Julien Boibessot July 31, 2019, 10:48 a.m. UTC | #3
Hello Thomas,

On 31/07/2019 09:25, Thomas Petazzoni wrote:
> Hello Julien,
>
> The commit title should rather be:
>
> 	package/mtd: add host-zstd dependency to host variant to fix build

OK

>
> On Mon, 29 Jul 2019 14:11:40 +0200
> julien.boibessot@free.fr wrote:
>
>> From: Julien BOIBESSOT <julien.boibessot@armadeus.com>
>>
>> Fixes following build error when Host doesn't have zstd devt files:
> This should also mention that the issue was introduced in the commit
> bumping to 2.1.1, and add references to the autobuilder failures.

OK. autobuilder failures came *after* my patch ;-)

>
> However, why does this problem only occurs for the host variant, and
> not the target variant.
>
> Why is this warning causing a build failure ? Normally warnings are
> just warnings, not errors.
>
> Is this zstd dependency optional somehow ?

It seems like zstd is now needed if ubifs is selected, like stated in
mtd configure.ac:

    AM_COND_IF([BUILD_UBIFS], [
            need_uuid="yes"
            need_xattr="yes"
            need_zlib="yes"
            need_lzo="yes"
            need_zstd="yes"                   <<<<<<<<
            need_openssl="yes"
    ])


So you were right, target mtd build is also impacted....

I will resend a patch to correct both target and host build.

Regards,
Julien
diff mbox series

Patch

diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
index 0de14db..65e7622 100644
--- a/package/mtd/mtd.mk
+++ b/package/mtd/mtd.mk
@@ -46,7 +46,7 @@  else
 MTD_CONF_OPTS += --without-xattr
 endif
 
-HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-util-linux
+HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-util-linux host-zstd
 HOST_MTD_CONF_OPTS = \
 	--with-jffs \
 	--with-ubifs \