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

Frédéric LOUI frederic.loui at renater.fr
Mon Apr 8 11:37:25 EDT 2019


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 <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-3rd-party> 
https://launchpad.net/~frederic-loui/+archive/ubuntu/p4lang-bionic <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




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


More information about the P4-dev mailing list