lighttpd: Error relocating /usr/lib/lighttpd/mod_auth.so: buffer_string_set_length: symbol not found
If server.modules includes "mod_authn_file":
# lighttpd-angel -f /etc/lighttpd/lighttpd.conf
2022-07-06 19:52:32: (plugin.c.202) dlopen() failed for: /usr/lib/lighttpd/mod_auth.so Error relocating /usr/lib/lighttpd/mod_auth.so: buffer_string_set_length: symbol not found
2022-07-06 19:52:32: (server.c.1285) loading plugins finally failed
lighttpd-angel.c.148: child (pid=21733) exited normally with exitcode: 255
This happens to be a deprecated "inline" function:
__attribute_nonnull__()
static inline void buffer_string_set_length(buffer *b, uint32_t len);
static inline void buffer_string_set_length(buffer *b, uint32_t len) {
if (len < b->size)
buffer_truncate(b, len);
else
buffer_extend(b, len - buffer_clen(b));
}
That is not used in the lighttpd source code of 1.4.65, i therefore presume AlpineLinux used some non-optimizing or space-preserving -O flag, and gcc again messed up -Os.
Thank you!