cli-debug build errors
I'm trying to get a GnuTLS 3.7.4 build working in a CI job for curl and I'm stuck with a build error I cannot understand and I'm looking for some clues on why this might happen. It builds fine locally on my debian system.
This is how it ends on a ubuntu bionic system:
CC cli-debug.o
cli-debug.c: In function 'main':
cli-debug.c:283:6: warning: implicit declaration of function 'HAVE_OPT'; did you mean 'HAVE_PIPE'? [-Wimplicit-function-declaration]
if (HAVE_OPT(STARTTLS_PROTO)) {
^~~~~~~~
HAVE_PIPE
cli-debug.c:283:6: warning: nested extern declaration of 'HAVE_OPT' [-Wnested-externs]
cli-debug.c:283:15: error: 'STARTTLS_PROTO' undeclared (first use in this function)
if (HAVE_OPT(STARTTLS_PROTO)) {
^~~~~~~~~~~~~~
cli-debug.c:283:15: note: each undeclared identifier is reported only once for each function it appears in
cli-debug.c:284:48: warning: implicit declaration of function 'OPT_ARG'; did you mean 'PF_ALG'? [-Wimplicit-function-declaration]
snprintf(app_proto, sizeof(app_proto), "%s", OPT_ARG(STARTTLS_PROTO));
^~~~~~~
PF_ALG
cli-debug.c:284:48: warning: nested extern declaration of 'OPT_ARG' [-Wnested-externs]
In file included from cli-debug.c:38:
cli-debug.c: In function 'cmd_parser':
gnutls-cli-debug-options.h:1:30: warning: implicit declaration of function 'process_options'; did you mean 'process_vm_writev'? [-Wimplicit-function-declaration]
#define optionProcess(a,b,c) process_options(b,c)
^~~~~~~~~~~~~~~
cli-debug.c:357:14: note: in expansion of macro 'optionProcess'
int optct = optionProcess(&gnutls_cli_debugOptions, argc, argv);
^~~~~~~~~~~~~
gnutls-cli-debug-options.h:1:30: warning: nested extern declaration of 'process_options' [-Wnested-externs]
#define optionProcess(a,b,c) process_options(b,c)
^~~~~~~~~~~~~~~
cli-debug.c:357:14: note: in expansion of macro 'optionProcess'
int optct = optionProcess(&gnutls_cli_debugOptions, argc, argv);
^~~~~~~~~~~~~
cli-debug.c:364:15: error: 'PORT' undeclared (first use in this function)
if (HAVE_OPT(PORT))
^~~~
cli-debug.c:365:10: error: 'OPT_VALUE_PORT' undeclared (first use in this function); did you mean 'SEM_VALUE_MAX'?
port = OPT_VALUE_PORT;
^~~~~~~~~~~~~~
SEM_VALUE_MAX
cli-debug.c:367:16: error: 'STARTTLS_PROTO' undeclared (first use in this function)
if (HAVE_OPT(STARTTLS_PROTO))
^~~~~~~~~~~~~~
cli-debug.c:378:15: error: 'DEBUG' undeclared (first use in this function)
if (HAVE_OPT(DEBUG))
^~~~~
cli-debug.c:379:11: error: 'OPT_VALUE_DEBUG' undeclared (first use in this function)
debug = OPT_VALUE_DEBUG;
^~~~~~~~~~~~~~~
cli-debug.c:381:15: error: 'VERBOSE' undeclared (first use in this function)
if (HAVE_OPT(VERBOSE))
^~~~~~~
Makefile:2648: recipe for target 'cli-debug.o' failed
make[3]: *** [cli-debug.o] Error 1
make[3]: Leaving directory '/home/zuul/pgtls/src'
Makefile:2414: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/zuul/pgtls/src'
Makefile:2240: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/zuul/pgtls'
Makefile:2165: recipe for target 'all' failed
make: *** [all] Error 2