NetSys / bess

BESS: Berkeley Extensible Software Switch
Other
313 stars 156 forks source link

Deprecated protobuf support #1040

Open dariusgrassi opened 2 years ago

dariusgrassi commented 2 years ago

When building a fresh BESS installation, I found a small error regarding the Python protobuf package. I decided to open an issue instead of a PR, since the changes I made to fix the error don't necessarily encompass changes that may have to be made for a PR resolving the issue.

Steps to recreate are copied directly from the wiki and are run on a fresh bare-metal Ubuntu 18.04 machine:

git clone https://github.com/NetSys/bess.git
cd bess/
sudo apt install make apt-transport-https ca-certificates g++ make pkg-config libunwind8-dev liblzma-dev zlib1g-dev libpcap-dev libssl-dev libnuma-dev git python python-pip python-scapy libgflags-dev libgoogle-glog-dev libgraph-easy-perl libgtest-dev libgrpc++-dev libprotobuf-dev libc-ares-dev libbenchmark-dev libgtest-dev protobuf-compiler-grpc
pip install --user protobuf grpcio scapy

The error occurs on the last line. After running this, the following output is printed:

Collecting protobuf
  Downloading https://files.pythonhosted.org/packages/6c/be/4e32d02bf08b8f76bf6e59f2a531690c1e4264530404501f3489ca975d9a/protobuf-4.21.0-py2.py3-none-any.whl (164kB)
    100% |████████████████████████████████| 174kB 4.2MB/s
protobuf requires Python '>=3.7' but the running Python is 2.7.17

The simplest resolution I found was just to roll back protobuf to version 3.15.0 (i.e., pip install --user protobuf==3.15.0 grpcio scapy). BESS built and ran normally from there.

I am not sure if this entails any necessary changes in the BESS repository, such as in runtime.yml, but I wanted to point this out.

SirHao commented 2 years ago

I also meet the same problem, mark this issue.