-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compilation error in p4 program #19
Comments
hi root@df34ca928050:~/t4p4s# ./t4p4s.sh ./router.p4 Error: P4 to C compilation failed (error code: 1) thanks, |
just a last message regading the things, here is how you can reproduce this: mc36@ubi16: |
Hi! I've tried to compile your code and it failed for me as well, but with a different error. One of my colleagues who works on the compiler will have an answer to that issue soon. The steps I did: `Exception: 'is_metadata' Error: P4 to C compilation failed (error code: 1)` |
hi, mc36@ubi16:~/t4p4s$ ./t4p4s.sh examples/router.p4 Error: P4 to C compilation failed (error code: 1) |
hi,
i'm maintaining a p4 router that fails to compile with p4elte but compiles with p4lang/p4c
and with some platform specific modifications with barefoot/tofino.
can you give me some advise on how to compile it with p4elte?
the sources can be found at http://sources.nop.hu/misc/p4lang/
here is the compiler output:
root@e586c8f1dda9:~/t4p4s# ./t4p4s.sh ./router.p4
[COMPILE P4-16] ./router.p4 @std
Error during the compilation of None
Traceback (most recent call last):
File "src/compiler.py", line 471, in
main()
File "src/compiler.py", line 466, in main
print_with_backtrace(sys.exc_info(), current_compilation['from'] if current_compilation else "(no compiled file)")
File "src/compiler.py", line 452, in main
hlir = load_from_p4(args, cache_dir_name)
File "/root/t4p4s/src/compiler_load_p4.py", line 244, in load_from_p4
hlir = load_hlir(filename, cache_dir_name)
File "/root/t4p4s/src/compiler_load_p4.py", line 163, in load_hlir
return continue_stages(stages, stage_idx, data)
File "/root/t4p4s/src/compiler_load_p4.py", line 132, in continue_stages
new_data = loader(None, data)
File "/root/t4p4s/src/compiler_load_p4.py", line 167, in
return ([], lambda file, data: pickle.load(file) if file is not None else no_cache_loader(data) if data is not None else None)
File "/root/t4p4s/src/compiler_load_p4.py", line 204, in
'loaders': [cache_loader(lambda hlir: set_additional_attrs(hlir, args['p4v']))],
File "/root/t4p4s/src/hlir16/hlir16_attrs.py", line 883, in set_additional_attrs
attrfun(hlir16)
File "/root/t4p4s/src/hlir16/hlir16_attrs.py", line 516, in attrs_controls_tables
set_table_key_attrs(hlir16, table)
File "/root/t4p4s/src/hlir16/hlir16_attrs.py", line 423, in set_table_key_attrs
k.id = 'field_instance_' + k.header_name + '_' + k.field_name
File "/root/t4p4s/src/hlir16/p4node.py", line 239, in getattr
return self.dict[key]
KeyError: 'header_name'
Error: P4 to C compilation failed (error code: 1)
root@e586c8f1dda9:~/t4p4s#
thanks,
csaba
The text was updated successfully, but these errors were encountered: