zlib icon indicating copy to clipboard operation
zlib copied to clipboard

Harsh configure error when compiler is missing

Open eyalitki opened this issue 1 year ago • 0 comments

Background

When preparing to build the project on a clean machine (often a build container), the out-of-the-box error many developers (and devops engineers) get, is the following:

$ ./configure
Checking for gcc...
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.

The source of the error is that the compiler itself is missing, hence the compilation test returns an error. This error was reported in multiple places, such as here and here and was also encountered by my colleagues several times (hence my awareness to this issue).

Suggested Fix

Add an initial configure test that will check that the identified compiler (GCC/CC) is indeed installed on the machine, and report an indicate error otherwise. Example:

$ ./configure
Checking for gcc...
Failed to find an installed compiler.
** ./configure aborting.

eyalitki avatar Nov 22 '24 14:11 eyalitki