[P4-dev] Installing P4 sample switch

Sarath Kamisetty sarath.kamisetty at gmail.com
Wed Aug 31 22:44:56 EDT 2016


I am trying to follow the instructions posted in
https://github.com/p4lang/switch to compile and run the switch (switch.p4).
Is there one single script that performs all the steps ? I couldn't find
one. Any other documentation to get this up and running will be helpful.

I did the following:

#1) Installed PTF
#2) Installed p4c-bmv2
#3) Compiled bmv2 with --with-pdfixed option. Where do I install this ?
Instructions at https://github.com/p4lang/behavioral-model only mention how
to compile, not about installing it in any location. It is unclear how this
switch.p4 will use this path I compiled bmv2 in.

At this point, I did the following under the switch/ directory

 ./configure --with-bmv2 --with-switchsai

And "make" failed promptly with the following error:

[saratk at ubuntu:~/Projects/ws1/Closet/p4/matrix/apps/switch]make
make  all-recursive
make[1]: Entering directory
Making all in p4-build
make[2]: Entering directory
make[2]: *** No rule to make target `all'.  Stop.
make[2]: Leaving directory
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
make: *** [all] Error 2
[saratk at ubuntu:~/Projects/ws1/Closet/p4/matrix/apps/switch]

Suspecting something wrong with p4-build/, I followed instructions at
https://github.com/p4lang/p4-build/ under switch/p4-build/ and "configure"
step failed:

./configure --with-bmv2 P4_NAME=switch

checking for vector... yes
checking for p4c-bmv2... /usr/local/bin/p4c-bmv2
*checking bm/pdfixed/pd_common.h usability... no*
*checking bm/pdfixed/pd_common.h presence... no*
*checking for bm/pdfixed/pd_common.h... no*
*configure: error: bmv2 pdfixed headers not found*
*configure: error: ./co**nfigure failed for p4-build*

However, I do see these files from step 3 in different path. Is there some
environment variable that I need to set so this step succeeds ? Pls. help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20160831/90309706/attachment-0002.html>

More information about the P4-dev mailing list