There isn’t enough information in this question to diagnose the problem. What compiler are you using and which compile-line flags are you supplying? This code fragment looks good, but perhaps the problem is somewhere else. Perhaps you can show the entire compiled file.
@aoiland – It looks like a fragment of a program written for Tofino or Tofino2. Therefore, you might be better off asking either on ICRP Forum (if you are an academic user) or on Intel Premier Support (if you are commercial user).
But we will ask you to provide the full program too.
I am also considering whether I need to join the Intel academy, but we know the syntax of P4 (we have been studying P4 for a long time), but the hardware environment of TNA is very troublesome. It is convenient to ask whether it costs a lot of money to join the Intel Academy as a research academy?
Thank you for providing the program. However, I want to remind you that while you are allowed to publish your TNA code, you are not allowed to discuss the specifics of SDE and its tools in public (including command-line options, inputs, outputs, error messages, etc.). This gets especially confusing when you are trying to discuss an unofficial preview version of the SDE from 2018 or so(!), which was probably the very first version where P4_16 support even appeared and TNA was still more of a prototype!
The program contains a subtle error (you are including common/util.p4 before you include common/header.p4), and the modern versions of the compiler will give you a much more meaningful message.
With regards to Intel Connectivity Academy and working with Tofino in general. Since you seem to represent an academic institution, you need to know that Intel has a special program, supporting academic and research institutions, called Intel Connectivity Research Program (ICRP). The membership is free and we have members from more than 250 universities and institutions all over the world. The members get access to the latest versions of SDE and they also enjoy generous academic discounts to attend the academy sessions. In fact, we start one tomorrow at 5PM Pacific time.
You can always find Academy schedule on this page, but you need to be an ICRP member to be able to attend the sessions and to see the discounts.
I invite you to join the program and at the same time I would encourage you to refrain posting questions/information on public forums so that you do not accidentally run afool of the NDA.