Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors for 4.10.0rc1 #330

Open
jas4711 opened this issue May 4, 2024 · 2 comments
Open

Build errors for 4.10.0rc1 #330

jas4711 opened this issue May 4, 2024 · 2 comments

Comments

@jas4711
Copy link

jas4711 commented May 4, 2024

Hi.

I wanted to build nsd 4.10.0rc1 for Debian experimental, to get better testing before the release. I got the build errors below that didn't happen for 4.9.1. Are these something you want to fix?

/Simon

make -C simdzone
make[3]: Entering directory '/build/nsd-4.10.0~rc1/simdzone'
gcc -MT src/zone.o -MMD -MP -MF src/zone.d -Wdate-time -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE=600 -DNDEBUG -I./include -I./src -I. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/nsd-4.10.0~rc1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -o src/zone.o -c ./src/zone.c
./src/zone.c: In function 'select_kernel':
./src/zone.c:77:11: error: implicit declaration of function 'strcasecmp' [-Werror=implicit-function-declaration]
   77 |       if (strcasecmp(preferred, kernels[count].name) == 0)
      |           ^~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [Makefile:65: src/zone.o] Error 1
gcc -MT src/fallback/parser.o -MMD -MP -MF src/fallback/parser.d -Wdate-time -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE=600 -DNDEBUG -I./include -I./src -I. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/nsd-4.10.0~rc1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -o src/fallback/parser.o -c ./src/fallback/parser.c
In file included from ./src/fallback/parser.c:16:
./src/generic/number.h: In function 'parse_int16':
./src/generic/number.h:98:12: error: implicit declaration of function 'htobe16' [-Werror=implicit-function-declaration]
   98 |   number = htobe16(number);
      |            ^~~~~~~
./src/generic/number.h: In function 'parse_int32':
./src/generic/number.h:115:12: error: implicit declaration of function 'htobe32' [-Werror=implicit-function-declaration]
  115 |   number = htobe32(number);
      |            ^~~~~~~
In file included from ./src/fallback/parser.c:32:
./src/generic/wks.h: In function 'service_hash':
./src/generic/wks.h:190:11: error: implicit declaration of function 'le64toh' [-Werror=implicit-function-declaration]
  190 |   input = le64toh(input);
      |           ^~~~~~~
In file included from ./src/fallback/parser.c:36:
./src/generic/svcb.h: In function 'parse_mandatory':
./src/generic/svcb.h:571:23: error: implicit declaration of function 'be16toh' [-Werror=implicit-function-declaration]
  571 |         smaller_key = be16toh(smaller_key);
      |                       ^~~~~~~
In file included from ./src/fallback/parser.c:39:
./src/generic/types.h: In function 'check_ttl':
./src/generic/types.h:117:12: error: implicit declaration of function 'be32toh' [-Werror=implicit-function-declaration]
  117 |   number = be32toh(number);
      |            ^~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [Makefile:65: src/fallback/parser.o] Error 1
gcc -MT src/westmere/parser.o -MMD -MP -MF src/westmere/parser.d -Wdate-time -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE=600 -DNDEBUG -I./include -I./src -I. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/nsd-4.10.0~rc1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -march=westmere -o src/westmere/parser.o -c ./src/westmere/parser.c
In file included from ./src/westmere/parser.c:17:
./src/generic/number.h: In function 'parse_int16':
./src/generic/number.h:98:12: error: implicit declaration of function 'htobe16' [-Werror=implicit-function-declaration]
   98 |   number = htobe16(number);
      |            ^~~~~~~
./src/generic/number.h: In function 'parse_int32':
./src/generic/number.h:115:12: error: implicit declaration of function 'htobe32' [-Werror=implicit-function-declaration]
  115 |   number = htobe32(number);
      |            ^~~~~~~
In file included from ./src/westmere/parser.c:33:
./src/generic/wks.h: In function 'service_hash':
./src/generic/wks.h:190:11: error: implicit declaration of function 'le64toh' [-Werror=implicit-function-declaration]
  190 |   input = le64toh(input);
      |           ^~~~~~~
In file included from ./src/westmere/parser.c:37:
./src/generic/svcb.h: In function 'parse_mandatory':
./src/generic/svcb.h:571:23: error: implicit declaration of function 'be16toh' [-Werror=implicit-function-declaration]
  571 |         smaller_key = be16toh(smaller_key);
      |                       ^~~~~~~
In file included from ./src/westmere/parser.c:40:
./src/generic/types.h: In function 'check_ttl':
./src/generic/types.h:117:12: error: implicit declaration of function 'be32toh' [-Werror=implicit-function-declaration]
  117 |   number = be32toh(number);
      |            ^~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [Makefile:57: src/westmere/parser.o] Error 1
gcc -MT src/haswell/parser.o -MMD -MP -MF src/haswell/parser.d -Wdate-time -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE=600 -DNDEBUG -I./include -I./src -I. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/nsd-4.10.0~rc1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -march=haswell -o src/haswell/parser.o -c ./src/haswell/parser.c
In file included from ./src/haswell/parser.c:17:
./src/generic/number.h: In function 'parse_int16':
./src/generic/number.h:98:12: error: implicit declaration of function 'htobe16' [-Werror=implicit-function-declaration]
   98 |   number = htobe16(number);
      |            ^~~~~~~
./src/generic/number.h: In function 'parse_int32':
./src/generic/number.h:115:12: error: implicit declaration of function 'htobe32' [-Werror=implicit-function-declaration]
  115 |   number = htobe32(number);
      |            ^~~~~~~
In file included from ./src/haswell/parser.c:33:
./src/generic/wks.h: In function 'service_hash':
./src/generic/wks.h:190:11: error: implicit declaration of function 'le64toh' [-Werror=implicit-function-declaration]
  190 |   input = le64toh(input);
      |           ^~~~~~~
In file included from ./src/haswell/parser.c:37:
./src/generic/svcb.h: In function 'parse_mandatory':
./src/generic/svcb.h:571:23: error: implicit declaration of function 'be16toh' [-Werror=implicit-function-declaration]
  571 |         smaller_key = be16toh(smaller_key);
      |                       ^~~~~~~
In file included from ./src/haswell/parser.c:40:
./src/generic/types.h: In function 'check_ttl':
./src/generic/types.h:117:12: error: implicit declaration of function 'be32toh' [-Werror=implicit-function-declaration]
  117 |   number = be32toh(number);
      |            ^~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [Makefile:61: src/haswell/parser.o] Error 1
make[3]: Target 'all' not remade because of errors.
make[3]: Leaving directory '/build/nsd-4.10.0~rc1/simdzone'
make[2]: *** [Makefile:159: simdzone/libzone.a] Error 2
@k0ekk0ek
Copy link
Contributor

k0ekk0ek commented May 6, 2024

Hi @jas4711. Thanks for the report! We're actually doing a longer rc period because we were hoping people would report issues. I'll get a Debian Experimental VM and sort this out.

@jas4711
Copy link
Author

jas4711 commented May 6, 2024

To clarify, no need to build this on experimental specifically, it should happen if you build nsd 4.10.0rc1 via the nsd Debian package infrastructure for unstable or testing (and likely stable) too. The reference to experimental was only that if I manage to get nsd 4.10.0rc1 to build, as a Debian Developer I can upload it to Debian experimental so that others can test it.

The crucial gcc parameter is -Werror=implicit-function-declaration, if you add that you should be able to trigger this on any gcc system. It is now the default when building Debian packages. You may want to add this flag to your own CI/CD checking to avoid regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants