Compilation failure on Alpine
Keama compilation fails on Alpine with the following error:
This is likely caused by the -Werror
option that is set by default. Here's part of the ./configure
output as run without any extra parameters:
CFLAGS: -g -O2 -Wall -Werror -fno-strict-aliasing -I$(top_srcdir)/includes -I/home/nonroot/keama/bind/include
The exact error is:
gcc -DHAVE_CONFIG_H -I. -I../includes -g -O2 -Wall -Werror -fno-strict-aliasing -I../includes -I/home/nonroot/keama/bind/include -MT keama.o -MD -MP -MF $depbase.Tpo -c -o keama.o keama.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from keama.c:24:
/usr/include/sys/errno.h:1:2: error: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Werror=cpp]
1 | #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
| ^~~~~~~
cc1: all warnings being treated as errors
While fixing this particular warning is useful, we also need to update the configure script to disable -Werror
, so users on systems with different environments (such as Alpine or FreeBSD) can compile it without much hassle.