jafingerhut / p4-guide

Guide to p4lang repositories and some other public info about P4
530 stars 155 forks source link

Suggestion: use officially supported versions of protobuf / gRPC in installation scripts #32

Closed antoninbas closed 4 years ago

antoninbas commented 4 years ago

Looking at one script (https://github.com/jafingerhut/p4-guide/blob/master/bin/install-p4dev-p4runtime.sh), I realized that it was still installing the older versions of protobuf (3.2.0) and gRPC (1.3.2). To avoid confusion, I suggest moving to protobuf 3.6.1 and gRPC 1.17.2, which is the versions currently "officially" supported by p4lang software.

I also suggest installing the same versions for the Python packages. The script currently defaults to some version which depends on the distribution. The suggestion can be achieved with:

sudo pip install protobuf==3.6.1
sudo pip install grpcio==1.17.2
jafingerhut commented 4 years ago

Thanks. install-p4dev-v2.sh in the same directory does install these more recent versions you mention, but not yet for the Python packages, which I will update before closing this issue.

I mention both the current and newer install script in this README: https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md

I describe the install-p4dev/v2.sh as "bleeding edge" there, because I wrote it around the time when it wasn't as well tested, but sounds like I could make that one first now, and mark the other one as of historical interest.

jafingerhut commented 4 years ago

@antoninbas If I start with a freshly installed Ubuntu 18.04 Linux system, updated with all Canonical updates as of 2020-Jan-21, and run the commands below, I get the error message shown when trying to install version 1.17.2 of the Python2 grpcio package. Do you get different results? If so, with what OS version and commands?

I have no problem with the pip install protobuf==3.6.1 command, which goes through fine on the same system.

$ sudo apt install --yes python-pip
$ pip install grpcio==1.17.2
Collecting grpcio==1.17.2
  Could not find a version that satisfies the requirement grpcio==1.17.2 (from versions: 0.4.0a0, 0.4.0a1, 0.4.0a2, 0.4.0a3, 0.4.0a4, 0.4.0a5, 0.4.0a6, 0.4.0a7, 0.4.0a8, 0.4.0a13, 0.4.0a14, 0.5.0a0, 0.5.0a1, 0.5.0a2, 0.9.0a0, 0.9.0a1, 0.10.0a0, 0.11.0b0, 0.11.0b1, 0.12.0b0, 0.13.0, 0.13.1rc1, 0.13.1, 0.14.0rc1, 0.14.0, 0.15.0, 1.0.0rc1, 1.0.0rc2, 1.0.0, 1.0.1rc1, 1.0.1, 1.0.2rc0, 1.0.2, 1.0.3, 1.0.4, 1.1.0rc1, 1.1.0, 1.1.3, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0, 1.3.3, 1.3.5, 1.4.0rc1, 1.4.0, 1.6.0rc1, 1.6.0, 1.6.3, 1.7.0rc1, 1.7.0, 1.7.3, 1.8.0rc1, 1.8.0rc2, 1.8.0rc3, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.6, 1.9.0rc1, 1.9.0rc2, 1.9.0rc3, 1.9.0, 1.9.1, 1.10.0rc1, 1.10.0rc2, 1.10.0, 1.10.1rc1, 1.10.1rc2, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1rc1, 1.11.1, 1.12.0rc1, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0rc3, 1.13.0, 1.14.0rc1, 1.14.0rc2, 1.14.0, 1.14.1, 1.14.2rc1, 1.14.2, 1.15.0rc1, 1.15.0, 1.16.0rc1, 1.16.0, 1.16.1rc1, 1.16.1, 1.17.0rc1, 1.17.0, 1.17.1rc1, 1.17.1, 1.18.0rc1, 1.18.0, 1.19.0rc1, 1.19.0, 1.20.0rc1, 1.20.0rc2, 1.20.0rc3, 1.20.0, 1.20.1, 1.21.0rc1, 1.21.1rc1, 1.21.1, 1.22.0rc1, 1.22.0, 1.22.1, 1.23.0rc1, 1.23.0, 1.23.1, 1.24.0rc1, 1.24.0, 1.24.1, 1.24.3, 1.25.0rc1, 1.25.0, 1.26.0rc1, 1.26.0)
No matching distribution found for grpcio==1.17.2
jafingerhut commented 4 years ago

grpcio 1.17.1 and 1.18.0 appear to be the closest versions of that Python2 package that are available.

antoninbas commented 4 years ago

Yes I remember this. I'm actually using grpcio 1.17.1 locally. My guess is that there was no change to the Python package between 1.17.1 and 1.17.2.

jafingerhut commented 4 years ago

OK, I have tested my install-p4dev-v2.sh script using Python2 packages grpcio 1.17.1 and protobuf 3.6.1, and my basic testing of a few things seems to work.

I have fiddled around a bit too long updating the older install script install-p4dev-p4runtime.sh and found Python2 package versions that work for it, too.

Closing this issue. Feel free to reopen, or create another, if you have other suggestions.