I hadsolved this problem and it was solved by installing libz-devzlib development files:
sudo apt-get install libz-dev
# Debian-based
sudo apt install libz-dev
# Fedora-based
sudo dnf install zlib-devel
This is related to the last error you've got (configure: error: *** zlib.h missing - please install first or check config.log ***). I don't know why:
configure: error: *** zlib.h missing - please install first or check config.log ***
The warnings you've got warnings, but they may be fixedwould get solved by this also. However, if you have it installed, maybe try reinstalling (or installing) libz-devor updating it.
Bonus: One way to find required development shared libraries on your system is to ask your package manager what package provides a specific file. For example,
dnf provideson Fedora could help you in these situations:$ sudo dnf provides /usr/include/zlib.h ... zlib-devel-1.2.11-30.fc35.x86_64 : Header files and libraries for Zlib development Repo : @System Matched from: Filename : /usr/include/zlib.h ...
I foundFound the solution here:thanks to https://stackoverflow.com/a/38277221/4215651this answer.