p4lang/third-party

Update base image to Ubuntu 20.04

antoninbas opened this issue · 4 comments

Ubuntu 16.04 is starting to show its age. I have been running into issues when building downstream images (for bmv2, PI) because of broken ppas.

I have a currently-experimental modified version of the Vagrantfile, root-bootstrap.sh and user-bootstrap.sh scripts for creating an Ubuntu 20.04 Desktop Linux system using vagrant, that builds all open source P4 dev tools, and passes the basic exercise in the p4lang/tutorials repo. It never installs Python2, using Python3 everywhere (which causes the p4c cpplint test to fail, but we know that works fine from CI testing on p4lang/p4c repo).

With a little more testing to ensure that I haven't broken anything too badly, perhaps it could be used as a starting point? It is on a branch of my personal fork of the p4lang/tutorials repo here: https://github.com/jafingerhut/tutorials/tree/add-2021-mar-vm-based-on-ubuntu-20.04 in the directory vm-ubuntu-20.04

Regarding my previous comment, one weird thing about my current scripts is that at various points they move some Python3 module files that some of the packages install into one system-wide directory, and move them into a different directory (/usr/local/lib/ptyhon3.x/dist-package if I recall correctly). This was a hacky attempt on my part to get something working, but it seems like there ought to be a better way. Some of the Python setup scripts install into a /usr/local/lib/python3.x/site-packages directory, but Ubuntu Python3 seems to expect to find them in dist-packages instead. If anyone has advice on eliminating those hacks, I'm all ears.

Ubuntu 16.04 as base image has given me nothing but pain and I had to implement a considerable amount of workarounds in the CI scripts for p4c. However, my assumption was that it is required because some older systems run p4c in an Ubuntu 16.04 environment?

Given that Ubuntu 16.04 is EOL in April 2021, I think this is a reasonable change for p4lang. That doesn't mean that p4c won't compile on Ubuntu 16.04 anymore, but it seems that for p4lang CI, prioritizing Ubuntu 20.04 makes more sense. We can keep this issue open for a bit and see if anyone complains. We can also announce this on p4-dev and Slack.