[Buildroot] [PATCH 1/1] package/rtty: fix build with mbedtls but without zlib

Fabrice Fontaine fontaine.fabrice at gmail.com
Sun Aug 30 20:39:43 UTC 2020


Le dim. 30 août 2020 à 22:31, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> a écrit :
>
> On Sun, 30 Aug 2020 22:11:43 +0200
> Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:
>
> > > Is there a reason why zlib is necessary for mbedtls support ?
> > zlib is not mandatory with mbedtls, only optional, however as mbedtls
> > does not provide a pkg-config file, we assume that if zlib is
> > available, we must link with it to avoid a build failure when linking
> > statically with a zlib-enabled mbedtls.
> > This change was pushed upstream with
> > https://github.com/zhaojh329/rtty/commit/7b8efe11dbafce97971dc130bf6cc1756f34ce07.
> > However, we missed that this change will raise a build failure if
> > ZLIB_LIBRARIES is used when zlib is not found.
>
> It should be noted that the compression support in mbedtls is only
> enabled if BR2_PACKAGE_MBEDTLS_COMPRESSION=y.
>
> So you can have a situation where mbedtls is enabled, zlib is enabled,
> but mbedtls is not using zlib. Your change will needlessly link rtty
> with zlib in such a situation.
The suggested patch is only fixing a build failure when zlib is not found.
We're already linking needlessly with zlib since the bump to version
7.1.4 with commit 0c80245ddbe78c8e443f98b9bbccac56331cdb26.
So would you advise that I revert
https://github.com/zhaojh329/rtty/commit/7b8efe11dbafce97971dc130bf6cc1756f34ce07
and manually link with -lz in rtty.mk if
BR2_PACKAGE_MBEDTLS_COMPRESSION is set?
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,

Fabrice


More information about the buildroot mailing list