Skip to content

Install Tofino P4 compiler as "bf-p4c" not "p4c" #50

@vgurevich

Description

@vgurevich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions