NICMx / FORT-validator

RPKI cache validator
MIT License
47 stars 22 forks source link

extension.c:478:11: error: unknown type name ‘IPAddressOrRange’; did you mean ‘IPAddressOrRange_t’? #136

Closed alarig closed 1 month ago

alarig commented 1 month ago

Hello,

I’m trying to compile version 1.6.2 and I got the following errors:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/FORT-validator-1.6.2 --htmldir=/usr/share/doc/FORT-validator-1.6.2/html --libdir=/usr/lib64
checking for a BSD-compatible install... /usr/lib/portage/python3.11/ebuild-helpers/xattr/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to enable C11 features... none needed
checking whether x86_64-pc-linux-gnu-gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of x86_64-pc-linux-gnu-gcc... none
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for ssize_t... yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for GNU libc compatible malloc... yes
checking for memset... yes
checking for socket... yes
checking for library containing pthread_create... none required
checking for library containing X509_get_version... -lcrypto
checking for library containing backtrace... none required
checking for x86_64-pc-linux-gnu-pkg-config... /usr/bin/x86_64-pc-linux-gnu-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for jansson... yes
checking for libcurl... yes
checking for libxml-2.0... yes
checking for check... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating test/Makefile
config.status: creating src/configure_ac.h
config.status: executing depfiles commands
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-misc/FORT-validator-1.6.2/work/fort-1.6.2 ...
make -j1
Making all in src
make[1]: Entering directory '/var/tmp/portage/net-misc/FORT-validator-1.6.2/work/fort-1.6.2/src'
make  all-am
make[2]: Entering directory '/var/tmp/portage/net-misc/FORT-validator-1.6.2/work/fort-1.6.2/src'
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-main.o `test -f 'main.c' || echo './'`main.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-algorithm.o `test -f 'algorithm.c' || echo './'`algorithm.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-alloc.o `test -f 'alloc.c' || echo './'`alloc.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-certificate_refs.o `test -f 'certificate_refs.c' || echo './'`certificate_refs.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-cert_stack.o `test -f 'cert_stack.c' || echo './'`cert_stack.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-common.o `test -f 'common.c' || echo './'`common.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-config.o `test -f 'config.c' || echo './'`config.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-daemon.o `test -f 'daemon.c' || echo './'`daemon.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -O2 -pipe -march=native -mtune=native -Wall -Wpedantic -std=c99 -D_DEFAULT_SOURCE=1 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE=1 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -O2 -pipe -march=native -mtune=native -c -o fort-extension.o `test -f 'extension.c' || echo './'`extension.c
extension.c:478:11: error: unknown type name ‘IPAddressOrRange’; did you mean ‘IPAddressOrRange_t’?
  478 | iaor2json(IPAddressOrRange const *iaor, int af)
      |           ^~~~~~~~~~~~~~~~
      |           IPAddressOrRange_t
extension.c:494:12: error: unknown type name ‘IPAddressOrRanges’; did you mean ‘IPAddressOrRange_t’?
  494 | iaors2json(IPAddressOrRanges *iaor, int af)
      |            ^~~~~~~~~~~~~~~~~
      |            IPAddressOrRange_t
extension.c:520:10: error: unknown type name ‘IPAddressChoice’; did you mean ‘IPAddressChoice_t’?
  520 | iac2json(IPAddressChoice const *iac, int af)
      |          ^~~~~~~~~~~~~~~
      |          IPAddressChoice_t
extension.c:536:10: error: unknown type name ‘IPAddressFamily’; did you mean ‘IPAddressFamily_t’?
  536 | iaf2json(IPAddressFamily const *iaf)
      |          ^~~~~~~~~~~~~~~
      |          IPAddressFamily_t
extension.c: In function ‘ir2json’:
extension.c:590:25: warning: implicit declaration of function ‘sk_IPAddressFamily_num’ [-Wimplicit-function-declaration]
  590 |         for (i = 0; i < sk_IPAddressFamily_num(iafs); i++) {
      |                         ^~~~~~~~~~~~~~~~~~~~~~
extension.c:591:25: warning: implicit declaration of function ‘iaf2json’; did you mean ‘ir2json’? [-Wimplicit-function-declaration]
  591 |                 child = iaf2json(sk_IPAddressFamily_value(iafs, i));
      |                         ^~~~~~~~
      |                         ir2json
extension.c:591:34: warning: implicit declaration of function ‘sk_IPAddressFamily_value’ [-Wimplicit-function-declaration]
  591 |                 child = iaf2json(sk_IPAddressFamily_value(iafs, i));
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
extension.c:591:23: warning: assignment to ‘json_t *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  591 |                 child = iaf2json(sk_IPAddressFamily_value(iafs, i));
      |                       ^
extension.c: In function ‘ir_destroy’:
extension.c:605:9: warning: implicit declaration of function ‘sk_IPAddressFamily_pop_free’ [-Wimplicit-function-declaration]
  605 |         sk_IPAddressFamily_pop_free(ir, IPAddressFamily_free);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
extension.c:605:41: error: ‘IPAddressFamily_free’ undeclared (first use in this function); did you mean ‘IPAddressFamily_t’?
  605 |         sk_IPAddressFamily_pop_free(ir, IPAddressFamily_free);
      |                                         ^~~~~~~~~~~~~~~~~~~~
      |                                         IPAddressFamily_t
extension.c:605:41: note: each undeclared identifier is reported only once for each function it appears in
extension.c: At top level:
extension.c:617:10: error: unknown type name ‘ASRange’; did you mean ‘ASRange_t’?
  617 | asr2json(ASRange const *range)
      |          ^~~~~~~
      |          ASRange_t
extension.c:639:10: error: unknown type name ‘ASIdOrRange’; did you mean ‘ASIdOrRange_t’?
  639 | aor2json(ASIdOrRange const *aor)
      |          ^~~~~~~~~~~
      |          ASIdOrRange_t
extension.c:655:11: error: unknown type name ‘ASIdOrRanges’; did you mean ‘ASIdOrRange_t’?
  655 | aior2json(ASIdOrRanges *aior)
      |           ^~~~~~~~~~~~
      |           ASIdOrRange_t
extension.c:680:12: error: unknown type name ‘ASIdentifierChoice’; did you mean ‘ASIdentifierChoice_t’?
  680 | asidc2json(ASIdentifierChoice const *asidc)
      |            ^~~~~~~~~~~~~~~~~~
      |            ASIdentifierChoice_t
extension.c: In function ‘ar2json’:
extension.c:698:9: error: ‘ASIdentifiers’ undeclared (first use in this function)
  698 |         ASIdentifiers const *asid = ext;
      |         ^~~~~~~~~~~~~
extension.c:698:22: error: expected ‘;’ before ‘const’
  698 |         ASIdentifiers const *asid = ext;
      |                      ^~~~~~
      |                      ;
extension.c:701:13: error: ‘asid’ undeclared (first use in this function)
  701 |         if (asid == NULL)
      |             ^~~~
extension.c:707:44: warning: implicit declaration of function ‘asidc2json’; did you mean ‘aia2json’? [-Wimplicit-function-declaration]
  707 |         if (json_object_add(root, "asnum", asidc2json(asid->asnum)))
      |                                            ^~~~~~~~~~
      |                                            aia2json
extension.c: In function ‘ar_destroy’:
extension.c:721:9: warning: implicit declaration of function ‘ASIdentifiers_free’ [-Wimplicit-function-declaration]
  721 |         ASIdentifiers_free(ar);
      |         ^~~~~~~~~~~~~~~~~~
extension.c: At top level:
extension.c:453:1: warning: ‘p2json’ defined but not used [-Wunused-function]
  453 | p2json(ASN1_BIT_STRING const *ap, int af)
      | ^~~~~~
make[2]: *** [Makefile:1652: fort-extension.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-misc/FORT-validator-1.6.2/work/fort-1.6.2/src'
make[1]: *** [Makefile:791: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/net-misc/FORT-validator-1.6.2/work/fort-1.6.2/src'
make: *** [Makefile:372: all-recursive] Error 1
alarig commented 1 month ago

I found the issue, openssl must be compiled with enable-rfc3779 but it’s not said in https://nicmx.github.io/FORT-validator/installation.html#option-3-compiling-and-installing-the-git-repository

ydahhrk commented 1 month ago

I see. I was not aware that 3779 was optional.

What environment is this?

alarig commented 1 month ago

It’s gentoo, I’m preparing the new release for ::guru