You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of p4studio installs Tofino P4 compiler as $SDE_INSTALL/bin/p4c.
This is incorrect and breaks a lot of things (starting with the standard cmake files for P4 code compilation). The proper name is $SDE_INSTALL/bin/bf-p4c.
The rationale is that Intel Tofino compiler is not a pure p4c for a given target (Tofino). That executable is actually called $SDE_INSTALL/bin/p4c-barefoot. Instead p4c is a compiler driver, i.e. a Python script that calls the compiler, the assembler and a number of other scripts to perform the compilation. Moreover, the set of parameters it accepts is different.
Using the name p4c creates a lot of confusion and often leads to very frustrating errors, especially in cases where people have both Tofino compiler and the 'regular' p4c installed.
The text was updated successfully, but these errors were encountered:
p4c and bf-p4c are identical python scripts, so it shouldn't matter which one you install (or what you install it as). Both will read .cfg files in the install directory to figure out what the supported/installed targets are -- p4c.tofino.cfg will specify where to find p4c-barefoot for tofino targets.
@ChrisDodd -- I agree that technically the name should not matter. However,
Please, see this report on how the renaming broke the official scripts that build P4 code
As I explained above, re-using the name p4c creates a lot of confusion every time someone has both the Intel compiler and the "regular" p4c in their path. We had tons of such support requests where the people would send logs that made absolutely no sense. Once the compiler was renamed, they all went away.
The current version of
p4studio
installs Tofino P4 compiler as$SDE_INSTALL/bin/p4c
.This is incorrect and breaks a lot of things (starting with the standard
cmake
files for P4 code compilation). The proper name is$SDE_INSTALL/bin/bf-p4c
.The rationale is that Intel Tofino compiler is not a pure
p4c
for a given target (Tofino). That executable is actually called$SDE_INSTALL/bin/p4c-barefoot
. Insteadp4c
is a compiler driver, i.e. a Python script that calls the compiler, the assembler and a number of other scripts to perform the compilation. Moreover, the set of parameters it accepts is different.Using the name
p4c
creates a lot of confusion and often leads to very frustrating errors, especially in cases where people have both Tofino compiler and the 'regular' p4c installed.The text was updated successfully, but these errors were encountered: