Building with mbedtls but without zlib will result in the following
build failure:
-- Found MbedTLS: /home/peko/autobuild/instance-0/output-1/per-package/rtty/host/powerpc64-buildroot-linux-gnu/sysroot/usr/lib/libmbedtls.so (found version "2.16.7")
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Select MbedTLS(PolarSSL) as the SSL backend
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_LIBRARY
linked by target "rtty" in directory /home/peko/autobuild/instance-0/output-1/build/rtty-7.1.4/src
-- Configuring incomplete, errors occurred!
Fixes:
- http://autobuild.buildroot.org/results/a0ebffe58bbf14cab74b7d2111d4d88a9c725273
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Static build with a zlib-enabled mbedtls fails on:
[100%] Linking C executable rtty
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/8.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld:
/home/buildroot/autobuild/instance-2/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libmbedtls.a(ssl_tls.c.o):
in function `mbedtls_ssl_transform_free.part.24':
(.text+0x1724): undefined reference to `deflateEnd'
As mbedtls does not provide a pkg-config file, search for zlib and link
with it if necessary
Fixes:
- http://autobuild.buildroot.org/results/61de143cdde1f0a9e734f46e9c68ce3504989890
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
As usual, cmake is unable to correctly handle static dependencies by its
own and as a result a static build with openssl will fail on:
/home/naourr/work/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libcrypto.a(c_zlib.o): in function `zlib_stateful_expand_block':
/home/naourr/work/instance-0/output-1/build/libopenssl-1.1.1d/crypto/comp/c_zlib.c:201: undefined reference to `inflate'
To fix this, use pkg-config to retrieve openssl dependencies such as -lz
or -latomic and fallback on existing mechanism
Fixes:
- http://autobuild.buildroot.org/results/6105b69d8598f0033044a26f53a768e2d4b2915e
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>