Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Lo priority) Update to Thrift version 0.11.0 to enable installation on Ubuntu 18.04 ? #597

Closed
jafingerhut opened this issue May 3, 2018 · 4 comments

Comments

@jafingerhut
Copy link
Contributor

commented May 3, 2018

I installed an Ubuntu 18.04 LTS Linux virtual machine a few days ago, to see whether I could install p4lang/behavioral-model, p4lang/p4c, and a few other open source P4 tools I sometimes use.

I had trouble compiling Thrift version 0.9.2 that p4lang/behavioral-model's travis/install-thrift.sh script currently tries to do. As a quick experiment, I tried changing that script to install Thrift version 0.11.0 instead. It built fine, as did behavioral-model and p4c, and all of p4c's 'make check' tests ran successfully, including the ones that run packets through simple_switch after installing a handful of table entries according to the contents of the STF test files.

I have not tried any other kind of extensive testing of other tools like mininet, nor tried to understand the changes from Thrift version 0.9.2 to 0.11.0 to see if there are any gotchas. Just wanted to mention this for the long term possibility of supporting newer Ubuntu releases. There might very well be an easy way to continue using Thrift 0.9.2 on Ubuntu 18.04 -- I didn't look into that in any depth.

@JoTro812

This comment has been minimized.

Copy link

commented Jul 31, 2018

Hi, can I ask what version of the p4lang/behavioral-model you're using? I'm doing a similar thing and also found i had to upgrade thrift to 0.11.0, but i'm still seeing compilation errors using tag 1.8.x of the code. Did you compile master?

@jafingerhut

This comment has been minimized.

Copy link
Contributor Author

commented Jul 31, 2018

A few minutes ago I created a brand new Ubuntu 18.04 desktop virtual machine, updated the Ubuntu 18.04 software with all updates as of now (2018-Jul-31), and ran these commands:

sudo apt install git
git clone https://github.com/jafingerhut/p4-guide
./p4-guide/bin/install-p4dev-with-thrift-0.11.0.sh

That last command is a public bash script that among other things, clones the latest master versions of the p4lang/behavioral-model and p4lang/p4c repositories. Before using the behavioral-model/travis/install-thrift.sh script, it changes all version numbers from 0.9.2 to 0.11.0.

When I ran it, these were the latest git commits for those two repositories:

p4lang/behavioral-model

commit 3a56709fefd84af1af8f0a8ed4e802ff1adc12ce
Author: Antonin Bas <antonin@barefootnetworks.com>
Date:   Mon Jul 23 16:44:23 2018 -0700

    changed VERSION number to 1.12.0 for release

p4lang/p4c

commit d0965513319e517f2977249e58e8679bd50c9e6e
Author: Calin Cascaval <cascaval@barefootnetworks.com>
Date:   Sun Jul 29 18:25:32 2018 -0700

    prevent opening a pipe in case there were errors (#1421)
    
    * prevent opening a pipe in case there were errors
    
    If there have been compiler errors and we open a pipe to
    preprocess additional files, we end up killing the pipe early.
    So it is better not to open the file at all.

I was able to use simple_switch_CLI to connect to a simple_switch process and install table entries, and then process a few packets that matched those entries. I didn't do much more extensive testing than that -- it isn't completely broken.

@jafingerhut

This comment has been minimized.

Copy link
Contributor Author

commented Sep 16, 2018

David Hancock on the p4-dev email list has done more extensive testing with Ubuntu 18.04 and Thrift 0.11.0 than I have, and reported some problems in attempting to use that combination here: http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2018-September/003655.html

@jafingerhut

This comment has been minimized.

Copy link
Contributor Author

commented Sep 19, 2018

With the merge of this PR #657 Thrift 0.9.2 compiles properly on Ubuntu 18.04, so that plus the other problems mentioned with Thrift 0.11.0 on the p4-dev email list probably means it is reasonable to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.