varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

head build fail against new varnish 7.2.1: vmod_header.c:252:24: error: implicit declaration of function 'VXID_TAG' #203

Closed pgnd closed 1 year ago

pgnd commented 1 year ago

working on a 1st updated build of varnish-modules/head against 2022-11-08's varnish-cache - Security release: v7.2.1 update

currently fails,

...
make[2]: Entering directory '/builddir/build/BUILD/varnish-modules-master/src'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/varnish   -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o vmod_header.lo vmod_header.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c vmod_header.c  -fPIC -DPIC -o .libs/vmod_header.o
In file included from /usr/include/varnish/cache/cache.h:52,
                 from vmod_config.h:38,
                 from vmod_header.c:39:
vmod_header.c: In function 'http_VSLH':
vmod_header.c:252:24: error: implicit declaration of function 'VXID_TAG' [-Werror=implicit-function-declaration]
  252 |                 assert(VXID_TAG(hp->vsl->wid));
      |                        ^~~~~~~~
/usr/include/varnish/vas.h:67:15: note: in definition of macro 'assert'
   67 |         if (!(e)) {                                                     \
      |               ^
vmod_header.c:252:24: error: nested extern declaration of 'VXID_TAG' [-Werror=nested-externs]
  252 |                 assert(VXID_TAG(hp->vsl->wid));
      |                        ^~~~~~~~
/usr/include/varnish/vas.h:67:15: note: in definition of macro 'assert'
   67 |         if (!(e)) {                                                     \
      |               ^
cc1: all warnings being treated as errors
make[2]: *** [Makefile:943: vmod_header.lo] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/varnish-modules-master/src'
make[2]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/builddir/build/BUILD/varnish-modules-master/src'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/varnish   -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o vmod_saintmode.lo vmod_saintmode.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c vmod_saintmode.c  -fPIC -DPIC -o .libs/vmod_saintmode.o
make[2]: Leaving directory '/builddir/build/BUILD/varnish-modules-master/src'
make[1]: *** [Makefile:543: all-recursive] Error 1
make: *** [Makefile:454: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.pUKmfr (%build)
...

current relevant builds are here,

https://copr.fedorainfracloud.org/coprs/pgfed/varnish/builds/

and full failed build log here,

https://download.copr.fedorainfracloud.org/results/pgfed/varnish/fedora-36-x86_64/05027946-varnish-modules/builder-live.log.gz

drop back to build against varnish 7.2.0 is ok.

nigoroll commented 1 year ago

Sounds like you meant to use the 7.2 branch?

pgnd commented 1 year ago

'meant' would assume that I'd paid attention to the existence of a 7.2 branch, and the diff 'tween it & master.

which i did not :-/

pebkac. my bad.

7.2 branch's all good: https://copr.fedorainfracloud.org/coprs/pgfed/varnish/build/5028305/

o/

gquintard commented 1 year ago

Ahah, that happens, no worries!