[P4-dev] Xenial & bionic P4lang packages - now available

Antonin Bas antonin at barefootnetworks.com
Mon Apr 8 19:19:36 EDT 2019


Hi Frederic,

Thanks for sharing this.
I just tested the installation on Ubuntu Bionic. I have a few questions /
remarks:

1) I think step 5) should say "sudo apt-get install p4lang". "sudo apt-get
install p4lang-bionic" did not work for me.
2) Is the infrastructure (code / scripts) you used to do the Debian
packaging available online, along with the steps you followed?
3) Based on a previous email exchange, I was under the impression that the
i386 packaging was failing because of some missing packages / some apt
issue. Now it sounds like it is failing because of a bmv2 unit test
failing. Do you have any logs? Do you know which test in particular is
failing?
4) I was surprised by the size of the p4c package (100MB) but it may be
because each p4c backend binary (p4c-bm2-ss, p4c-bm2-psa, p4c-ebpf,
p4c-graphs, p4test) is self-contained and they do not used a shared library
for their common parts.

Thanks again,

Antonin

On Mon, Apr 8, 2019 at 8:38 AM Frédéric LOUI <frederic.loui at renater.fr>
wrote:

> Hi experts,
>
> Referring to my previous email whose subject was « p4lang/third-party »,
> I conducted (a lot of) software chain tests.
> After this heavy study which helped to understand all software
> interactions I finally came up with deb packages for P4lang software.
>
> There are 2 flavours of these packages:
>
> 1- One long time proven p4 software flavour based on protobuf 3.2.1/grpc
> 1.3.2 combo. (And other dependencies)
> 2- And another more bleeding edge flavour based on recent protobuf
> 3.6.1/grpc.1.17.2 combo (And additional more recent dependencies)
>
> Please note that :
>
> -1- is for Xenial.
>       These packages are more « raw" compared to their bionic
>  counterparts in -2-
>
> -2- is for Bionic.
>      These packages are more bistro compliant but there is room for
> improvement. Also I subdivided bionic packages in 2 repositories.
>       a- One repository encompasses all 3rd party dependencies
>       b- The second encompasses only p4lang software.
>       => The reason is that you might want to build MASTER/dev branch
> against the 3rd party de[pendencies that should not change overtime.
>            (If needed I can build specific p4lang packages ...)
>
> For Debian fans, I build packages for Debian stable AKA: stretch and it
> seems to work quite well.  I would need Debian repository service in order
> to publish them. (PPA is for ubuntu IIRC)
> Due to a lack of time, I sticked to PPA but it is actually easier to build
> p4lang on Debian as protobuf 3.6.1 and graph 1.17.2 are already included in
> the experimental Debian distro user land.
> Just back port them and you are almost ready to go.
>
> If you have a hosting service (easy and free to use) where I can put
> Debian stretch package, please let me know.
> Retrospectively, it should be also OK to also have P4lang  FreeBSD via
> ports packages as FreeBSD 12 already includes protobuf 3.7.1 / grpc 1.19.0
> (So it should not be a problem to install protobuf 3.6.1/grpc.1.17.2 on
> FreeBSD)
>
>
> So the fun part:
>
> -1- For P4lang Xenial packages:
> -------------------------------------------
> I’m pleased to let you know that P4Lang packages for xenial are available
> here:
>
> https://launchpad.net/~frederic-loui/+archive/ubuntu/p4lang-xenial
>
> You can have a P4Lang environment using the following procedure:
>
> 0- Get a fresh ubuntu 16.04 VM or docker image.
>
> 1- Add ppa package:
>     sudo apt-get install software-properties-common
>
> 2- Add this PPA:
>     sudo add-apt-repository ppa:frederic-loui/p4lang-xenial
>     sudo apt-get update
>
> 3- install p4lang
>      sudo apt-get install p4lang-xenial
>
> 4- Add mininet following mininet install script. (Recommended by mininet)
>
> And voila !
>
> I tested some simple_switch and simple_switch_grpc tutorial and these are
> apparently working fine.
>
>
> -2-or P4Lang Bionic packages: (with recent dependency software)
> -----
> -----------------------------------------------------------------------------------
> I’m pleased to let you know that P4Lang packages for bionic are available
> here:
>
> https://launchpad.net/~frederic-loui/+archive/ubuntu/p4lang-3rd-party
> https://launchpad.net/~frederic-loui/+archive/ubuntu/p4lang-bionic
>
> You can have a P4Lang environment using the following procedure:
>
> 0- Get a fresh ubuntu 18.04 VM or docker image.
>
> 1- Add ppa package:
>     sudo apt-get install software-properties-common
>
> 2- Add p4lang-3rd-party PPA:
>     sudo add-apt-repository ppa:frederic-loui/p4lang-3rd-party
>     sudo apt-get update
>
> 3- install p4lang-3rd-party PPA
>      sudo apt-get install p4lang-3rd-party
>
> 4- Add p4lang-bionic PPA:
>     sudo add-apt-repository ppa:frederic-loui/p4lang-bionic
>     sudo apt-get update
>
> 5- install p4lang-bionic PPA
>      sudo apt-get install p4lang-bionic
>
> 6- Add mininet following mininet install script. (Recommended by mininet)
>
> And voila !
>
> I tested some simple_switch and simple_switch_grpc tutorial and these are
> apparently working fine.
>
> PS1: One caveat, on both Xenial and bionic bmv2 compilation ends
> (apparently well) on amd64 and i386 arch.  (Only 1 test is failing)
>        However, « make check » fail on i386 then it prevents the while
> package building process.
>        I selected only amd64 arch but this prevent to have p4c with both
> build arch.
>        So I disabled «  make check »
>
> PS2: As I compiled p4c with bmv2 for the tests, I had to let architecture
> to « any » in order to have also an i386 version of p4c. (make and make
> check succeed)
>
> PS3: building process for p4c finished at 100%. However «  make check »
> failed for few eBPF test. (31 March 2019)
>
> PS4: I would like to thank Antonin BAS for his support and availability,
>
> Happy P4 !
>
> If you have any suggestion please let me know either via the mailing list
> or directly.
>
> All the best,
>
> À bientôt,
> --  Frederic
>
>
>
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>


-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190408/5dfa49be/attachment-0001.html>


More information about the P4-dev mailing list