#1065556 grok: FTBFS on armhf and armel: implicit declaration of function ‘asprintf’

Package:
src:grok
Source:
src:grok
Submitter:
Emanuele Rocca
Date:
2024-03-06 16:24:07 UTC
Severity:
normal
Tags:
#1065556#5
Date:
2024-03-06 16:21:23 UTC
From:
To:
Hi,

grok fails to build from source if -Werror=implicit-function-declaration
is on. The flag was added to the default ones on armhf and armel to help
with the ongoing time64 work. For context, see:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=ef90821fe45b99fa8c8c4279b9a74c30f59f491d

An excerpt of the build logs follows.

cc -c -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -I/usr/include/tirpc -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -fPIC -I. -O2 -I/usr/local/include -DPLATFORM_GNULinux  grok_capture.c -o grok_capture.o
grok_discover.c: In function ‘grok_discover_init’:
grok_discover.c:54:9: error: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Werror=implicit-function-declaration]
   54 |     if (asprintf(&gpattern, "%%{%.*s}", namelen, name) == -1) {
      |         ^~~~~~~~
      |         vsprintf