[P4] Béna vagyok vagy compiler error?
Leskó Dániel
ldani at elte.hu
Thu Jun 9 13:06:48 CEST 2016
Sziasztok!
Naiv felhasználóként próbálom a compilerünket. Arra már rájöttem, hogy a
3.x -es python nem jó, az is megvan, hogy a compiler.py-t a trunkban
állva érdemes elindítani mert különben a két opcionálisnak jelölt
compiler/generated_dir default értékével nem tud mit kezdeni. Ezeket
mondjuk egy release notesban érdemes lenne felvezetni.
De ezek után az alábbi hibát kapom: (nem csak az l2_l3.p4-re, a többit
is próbáltam, hasonló eredménnyel)
C:\p4-repo\trunk>python src/compiler.py examples/p4_src/l2_l3.p4
WARNING: No error rule is defined for exclusive state 'pragma'
WARNING: Token 'DIVIDE' defined, but not used
WARNING: Token 'PPHASH' defined, but not used
WARNING: Token 'MOD' defined, but not used
WARNING: There are 3 unused tokens
parsing successful
semantic checking successful
Header type standard_metadata_t not byte-aligned, adding padding
validating: True
validating: True
validating: True
validating: True
Desugaring src\hardware_indep\actions.c.py...
Desugaring src\hardware_indep\actions.h.py...
Desugaring src\hardware_indep\controlplane.c.py...
Desugaring src\hardware_indep\dataplane.c.py...
Traceback (most recent call last):
File "src/compiler.py", line 174, in <module>
main()
File "src/compiler.py", line 169, in main
generate_all_in_dir(compiler_files_path, desugared_path,
generated_path, hli
r)
File "src/compiler.py", line 107, in generate_all_in_dir
code = generate_code(full_file, genfile, {'hlir': hlir})
File "src/compiler.py", line 90, in generate_code
exec(code, localvars, localvars)
File "<string>", line 82, in <module>
File "C:\p4-repo\trunk\src\utils.py", line 124, in format_p4_node
return "if (%s) { %s } else { %s }" % (format_expr(node.condition),
format_p
4_node(node.next_[True]), format_p4_node(node.next_[False]))
File "C:\p4-repo\trunk\src\utils.py", line 150, in format_expr
return "(" + format_expr(e.left) + ")" + format_op(e.op) + "(" +
format_expr
(e.right) + ")"
TypeError: cannot concatenate 'str' and 'NoneType' objects
Mit csinálok rosszul? (windows alatt próbálom, de ennek itt nem illene
gondot okoznia)
Dani
More information about the P4
mailing list