NICMx / FORT-validator

RPKI cache validator
MIT License
47 stars 22 forks source link

Main #94

Closed THEWWWTHING closed 1 year ago

ydahhrk commented 1 year ago
  1. Why?
  2. It doesn't compile:
$ ./autogen.sh
$ ./configure
$ make
Making all in src
make[1]: Entering directory '/home/aleiva/git/fort/src'
make  all-am
make[2]: Entering directory '/home/aleiva/git/fort/src'
gcc -DHAVE_CONFIG_H -I.    -Wall -Wno-cpp -Wpedantic -std=gnu11 -O2 -g  -I/usr/include/libxml2 -DBACKTRACE_ENABLED -g -O2 -MT fort-main.o -MD -MP -MF .deps/fort-main.Tpo -c -o fort-main.o `test -f 'main.c' || echo './'`main.c
In file included from asn1/asn1c/ASIdOrRange.h:16,
                 from asn1/asn1c/ASIdentifierChoice.h:61,
                 from asn1/asn1c/ASIdentifiers.h:41,
                 from resource.h:7,
                 from cert_stack.h:6,
                 from state.h:5,
                 from thread_var.h:4,
                 from main.c:6:
asn1/asn1c/ASRange.h:24:2: error: unknown type name ‘ASId_t’
   24 |  ASId_t  min;
      |  ^~~~~~
asn1/asn1c/ASRange.h:25:2: error: unknown type name ‘ASId_t’
   25 |  ASId_t  max;
      |  ^~~~~~
In file included from asn1/asn1c/ASIdentifierChoice.h:61,
                 from asn1/asn1c/ASIdentifiers.h:41,
                 from resource.h:7,
                 from cert_stack.h:6,
                 from state.h:5,
                 from thread_var.h:4,
                 from main.c:6:
asn1/asn1c/ASIdOrRange.h:34:3: error: unknown type name ‘ASId_t’
   34 |   ASId_t  id;
      |   ^~~~~~
make[2]: *** [Makefile:1690: fort-main.o] Error 1
make[2]: Leaving directory '/home/aleiva/git/fort/src'
make[1]: *** [Makefile:867: all] Error 2
make[1]: Leaving directory '/home/aleiva/git/fort/src'
make: *** [Makefile:362: all-recursive] Error 1
ydahhrk commented 1 year ago

Wait... I just noticed we have two AS identifiers (ASID.h and ASId.h), and they're basically identical.

Is this giving you trouble in a case-insensitive file system? If so, it would seem to me the proper solution would be to delete one of them, not make them fully identical.

ydahhrk commented 1 year ago

Ok, I suppose you're not going to elaborate further at this point, so I fixed what I thought was broken, okay. Hopefully it'll solve whatever problem you're having.

Irsservices commented 1 year ago

Can you explain briefly so I can understand better on how to go about this.

+19453457018

On Fri, Jun 30, 2023, 11:14 AM Alberto Leiva Popper < @.***> wrote:

Merged #94 https://github.com/NICMx/FORT-validator/pull/94 via 84952a9 https://github.com/NICMx/FORT-validator/commit/84952a96c5b4923dbf754b7ec5d8a3b35ab0bd23 .

— Reply to this email directly, view it on GitHub https://github.com/NICMx/FORT-validator/pull/94#event-9690565313, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4XVE6YGBIVM72CYZ3Q5J63XN4JPLANCNFSM6AAAAAAXAGHCYY . You are receiving this because you commented.Message ID: @.***>

ydahhrk commented 1 year ago

As proposed, THEWWWTHING's patch turned the ASId.h module into an exact clone of the ASID.h module.

Whatever the goal was, the patch was misguided because none of the ASId usages were updated, so the code did not compile.

While reviewing the patch, I realized there was no reason to keep ASId and ASID separate. They were the same type, only spelled a little differently. My theory is that THEWWWTHING downloaded the code into a filesystem which, because of file name collision, wasn't capable of containing both files (ASId.h and ASID.h) in the same folder. So one thing lead to another and they ended up uploading a pull request in which both files had the same content.

I fixed the pull request by fusing the two types. The issue is now closed because I already merged the patch into main.

You can download the latest version of the code by clicking <> Code > Download ZIP here. (Or just git cloning as usual.)