[P4-dev] Can't get past semantic check when building HLIR object of P4

Antonin Bas antonin at barefootnetworks.com
Fri Aug 7 11:00:06 EDT 2015

Hi Tyler,

My guess is that you are including twice the headers.p4 file. Look for
duplicate #include statements in your code or some circular dependencies.
If you don' find anything, you can send the code to the list and we'll be
happy to take a look.



On Fri, Aug 7, 2015 at 7:48 AM, Tyler Alterio <tyalt1 at gmail.com> wrote:

> Hey guys,
> I'm new to P4 and need some help. This problem is referring to the code in
> p4-hlir repository. (https://github.com/p4lang/p4-hlir)
> When I try and run the p4-validate or p4-shell, I get past the parsing
> phase just fine, however I never get past the semantic checking stage. I
> always get an error:
> "Semantic error: Redefinition of header type ethernet_t in file
> /home/usr1/Desktop/Shared/P4/p4-hlir/tests/includes/headers.p4 at line
> 1,previous definition was in file
> /home/usr1/Desktop/Shared/P4/p4-hlir/tests/includes/headers.p4 at line 1"
> I get anywhere 38 to 65 or these errors, where the files and line numbers
> match as well.
> It's clear that the same definition is trying to overwrite itself. I don't
> know why it happens, or how to prevent it. Nothing I've tried gets rid of
> this error. I've run this in both Windows and an Ubuntu VM. I've even tried
> writing my own script to build a HLIR object and get the same exact error.
> I was wondering if anybody has the same problem and knows how to fix it.
> Best,
> Tyler
> _______________________________________________
> P4-dev mailing list
> P4-dev at p4.org
> Listinfo - http://mail.p4.org/mailman/listinfo/p4-dev_p4.org
> Archives - http://mail.p4.org/pipermail/p4-dev_p4.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20150807/8a2c3b88/attachment-0001.html>

More information about the P4-dev mailing list