build_gcc_10.sh : trying to build 10.5.0 on Ubuntu 18: zlib.h not found
rmc135 opened this issue · comments
Hi! Firstly, thank you very much for your work in automating this daunting process!
I had no problems building 8.4.0 on Ubuntu 22, however, I have run into a minor problem when building 10.5.0 on Ubuntu 18 - fairly early in the build process it complains it cannot find zlib.h.
Fixed with 'sudo apt install zlib1g-dev'
The "--with-system-zlib" flag in the script suggests it should be present already, rather than being a dependency which the script builds itself, but for whatever reason, my relatively clean install of Ubuntu 18 does not have it present.
Perhaps a basic check could be added to ensure that zlib is installed? Otherwise, this issue will serve as a solution for anyone who does run into this specific problem. After this minor change, a new build run was successful.
Thanks for feedback. Already it's the job of gcc's configure script to check for dependencies, and gcc should fail at that stage if not found. And it isn't easy to check for zlib package is installed, because it can have different names on different versions of ubuntu, or different flavours of linux. Maybe there is some warnign can be added; will look as I upgrade the script to build a later version of gcc.