NetSys / bess

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

Issue with compiling on new Ubuntu 16.04 install #850

Closed dburnham2000 closed 6 years ago

dburnham2000 commented 6 years ago

In getting bess to install on a new VM with Ubuntu 16.04.5 today I found the following issues:

  1. The instructions for installing dependancies has an error in the line: ansible-playbook -K -t package -i localhost, -c local env/build-dep.yml As the package.yml file was removed and merged into other files a while ago, running this as it causes nothing to be installed. To resolve, the -t package needs to be removed: ansible-playbook -K -i localhost, -c local env/build-dep.yml
  2. Ubuntu 16.04.5 uses g++ version 5.5 as its default. As pointed out by others, replacing g++ 5.5 with v7 or greater causes issues. I did not attempt to duplicate removing g++ 5 to see the issues created. To resolve this, as the build-dep.yml script already installed g++7, I modified the core Makefile with an additional if statement. I will submit this as a separate pull request, but it is very quick and dirty.
  3. At this point bess compiles but bessctl will not run due to missing python modules. To resolve this, the following needs to be run:
    sudo -H pip install google
    sudo -H pip install protobuf

    Then bessctl is able to run.

Additionally, I had to install those pip packages to get bessctl to run on Ubuntu 18.04. I hope this is helpful to somebody.

dburnham2000 commented 6 years ago

Linking to Pull Request #851 for convenience.

sangjinhan commented 6 years ago
  1. Thank you! I updated the wiki page.

  2. You can simply run CXX=g++-7 make to specify which compiler to use, or add export CXX=g++-7 in your .bashrc file. I will close the PR, as it wouldn't work if g++>=7.0 exists but g++-7 executable is not available (e.g., named g++-7.0 for some reason or only g++-8 is installed). Setting environmental variable CXX for make sounds more conventional.

  3. Actually env/runtime.yml is the file that install the required runtime packages for you. I'll update the wiki page accordingly.

dburnham2000 commented 6 years ago

That is a more elegant way to resolve the issue; I knew the way I did it was quick and dirty, but wanted to document it just the same.

Thanks!