Skip to content
Snippets Groups Projects
  1. Apr 06, 2021
  2. Mar 05, 2021
  3. Feb 23, 2021
  4. Sep 10, 2020
    • Robert Edmonds's avatar
      src/utils/Makefile.inc: Add $(libnghttp2_CFLAGS) where needed · c600ae0f
      Robert Edmonds authored and Daniel Salzman's avatar Daniel Salzman committed
      The header file src/utils/common/https.h includes the external header
      file <nghttp2/nghttp2.h> (when nghttp2 support is enabled by the build
      system). This header file is included by src/utils/common/netio.h, which can
      in turn be included directly or indirectly by various knot components.
      
      The nghttp2 header files are not guaranteed to be located in the compiler's
      default include paths. This dependency is detected by the build system
      via PKG_CHECK_MODULES, which populates the automake variable
      $(libnghttp2_CFLAGS). These extra CFLAGS must be added to the compiler flags
      for any targets that include a header file that results in header file
      inclusions of the external dependencies. Otherwise the build will fail when
      those external header files cannot be located.
      
      This commit adds $(libnghttp2_CLAGS) to the *_CPPFLAGS for kdig, khost, and
      knsupdate.
      
      Without the $(libnghttp2_CFLAGS) fixes in this commit, the build will
      fail with an error like:
      
          Making all in src
          make[1]: Entering directory '/tmp/knot-3.0.0/src'
            GEN      contrib/dnstap/dnstap.pb-c.c
            GEN      contrib/dnstap/dnstap.pb-c.h
          NOTE: Compilation of scanner.c can take several minutes!
          make  all-recursive
          make[2]: Entering directory '/tmp/knot-3.0.0/src'
          make[3]: Entering directory '/tmp/knot-3.0.0/src'
            CC       libdnssec/la-tsig.lo
            CC       utils/kdig/khost-kdig_exec.o
            CC       utils/kdig/khost-kdig_params.o
            CC       utils/kdig/kdig-kdig_exec.o
            CC       utils/kdig/kdig-kdig_main.o
            CC       utils/kdig/kdig-kdig_params.o
            CC       utils/common/libknotus_la-cert.lo
            CC       utils/common/libknotus_la-exec.lo
            CC       utils/common/libknotus_la-hex.lo
            CC       utils/common/libknotus_la-https.lo
            CC       utils/common/libknotus_la-lookup.lo
            CC       utils/common/libknotus_la-msg.lo
          In file included from ./utils/common/netio.h:23,
                           from ./utils/common/exec.h:21,
                           from ./utils/kdig/kdig_params.h:22,
                           from ./utils/kdig/kdig_exec.h:19,
                           from utils/kdig/kdig_exec.c:22:
          ./utils/common/https.h:45:10: fatal error: nghttp2/nghttp2.h: No such file or directory
             45 | #include <nghttp2/nghttp2.h>
                |          ^~~~~~~~~~~~~~~~~~~
          compilation terminated.
          In file included from ./utils/common/netio.h:23,
                           from ./utils/common/exec.h:21,
                           from ./utils/kdig/kdig_params.h:22,
                           from utils/kdig/kdig_params.c:23:
          ./utils/common/https.h:45:10: fatal error: nghttp2/nghttp2.h: No such file or directory
             45 | #include <nghttp2/nghttp2.h>
                |          ^~~~~~~~~~~~~~~~~~~
          compilation terminated.
          make[3]: *** [Makefile:5500: utils/kdig/khost-kdig_exec.o] Error 1
          make[3]: *** Waiting for unfinished jobs....
          make[3]: *** [Makefile:5514: utils/kdig/khost-kdig_params.o] Error 1
          In file included from ./utils/common/netio.h:23,
                           from ./utils/common/exec.h:21,
                           from ./utils/kdig/kdig_params.h:22,
                           from utils/kdig/kdig_main.c:20:
          ./utils/common/https.h:45:10: fatal error: nghttp2/nghttp2.h: No such file or directory
             45 | #include <nghttp2/nghttp2.h>
                |          ^~~~~~~~~~~~~~~~~~~
          compilation terminated.
          make[3]: *** [Makefile:5416: utils/kdig/kdig-kdig_main.o] Error 1
          In file included from ./utils/common/netio.h:23,
                           from ./utils/common/exec.h:21,
                           from ./utils/kdig/kdig_params.h:22,
                           from ./utils/kdig/kdig_exec.h:19,
                           from utils/kdig/kdig_exec.c:22:
          ./utils/common/https.h:45:10: fatal error: nghttp2/nghttp2.h: No such file or directory
             45 | #include <nghttp2/nghttp2.h>
                |          ^~~~~~~~~~~~~~~~~~~
          compilation terminated.
          In file included from ./utils/common/netio.h:23,
                           from ./utils/common/exec.h:21,
                           from ./utils/kdig/kdig_params.h:22,
                           from utils/kdig/kdig_params.c:23:
          ./utils/common/https.h:45:10: fatal error: nghttp2/nghttp2.h: No such file or directory
             45 | #include <nghttp2/nghttp2.h>
                |          ^~~~~~~~~~~~~~~~~~~
          compilation terminated.
          make[3]: *** [Makefile:5402: utils/kdig/kdig-kdig_exec.o] Error 1
          make[3]: *** [Makefile:5430: utils/kdig/kdig-kdig_params.o] Error 1
          make[3]: Leaving directory '/tmp/knot-3.0.0/src'
          make[2]: *** [Makefile:5950: all-recursive] Error 1
          make[2]: Leaving directory '/tmp/knot-3.0.0/src'
          make[1]: *** [Makefile:2046: all] Error 2
          make[1]: Leaving directory '/tmp/knot-3.0.0/src'
          make: *** [Makefile:491: all-recursive] Error 1
      c600ae0f
  5. Aug 06, 2020
  6. Aug 04, 2020
  7. Jul 13, 2020
  8. Jul 02, 2020
  9. Jul 01, 2020
  10. May 31, 2020
  11. Apr 21, 2020
  12. Aug 29, 2019
  13. Mar 07, 2019
  14. Jan 24, 2019
  15. Nov 05, 2018
  16. Sep 13, 2018
  17. Sep 07, 2018
  18. Aug 29, 2018
  19. Aug 22, 2018
  20. Aug 02, 2018
  21. Mar 18, 2018
  22. Mar 14, 2018
  23. Mar 13, 2018
Loading