unable to compile source_routing
tutorials/exercises/source_routing
from p4.v1 import p4runtime_pb2 ImportError: No module named p4.v1
please help , i am trying from a while .. urgent how it fix this in ubuntu
I strongly suspect you have an incomplete P4Runtime installation on the system where you tried this.
What method did you use to install P4-related software on the system where this occurred?
If you used vagrant up method included in this tutorial repository, did your host system run out of disk space during the installation, which could leave it in an incorrect partially-installed state?
Can you point me to any document to setup p4runtime on x86 ubuntu
On Wed 15 Apr, 2020, 1:47 AM Andy Fingerhut, [email protected] wrote:
I strongly suspect you have an incomplete P4Runtime installation on the system where you tried this.
What method did you use to install P4-related software on the system where this occurred?
If you used vagrant up method included in this tutorial repository, did your host system run out of disk space during the installation, which could leave it in an incorrect partially-installed state?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/p4lang/tutorials/issues/342#issuecomment-613659264, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD2SAOUOZ7OWLFOBKR7L3DRMTAFTANCNFSM4MHWBRKQ .
There are the README instructions in the p4runtime repository that give some instructions on installing it. It is possible to follow them and succeed, but it is easy to get it wrong and have an incomplete installation.
vagrant up in this tutorials repository is one way.
The end of the README for this tutorials repository has a section listing live tutorials that have been given before, and several of them have links to downloads of successfully installed VM images that you can download (several gigabytes in size) and run using VirtualBox. https://github.com/p4lang/tutorials#older-tutorials
Yet another is to run a bash script that I have written that, starting from a freshly installed Ubuntu 16.04 or 18.04 Linux system with enough free disk space, will install most of the open source P4 development tools on it. https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md
- git submodule update --init --recursive
- [[ 16.04 > 19 ]]
- make
[MAKE] Generating cache.mk
[HOSTLD] Linking /home/ali/P4/grpc/bins/opt/grpc_cpp_plugin
/usr/bin/ld: warning: libprotobuf.so.12, needed by
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libprotoc.so, may conflict
with libprotobuf.so.9
/home/ali/P4/grpc/objs/opt/src/compiler/cpp_plugin.o: In function
ProtoBufMethod::get_output_type_name[abi:cxx11]() const': /home/ali/P4/grpc/./src/compiler/protobuf_plugin.h:55: undefined reference togoogle::protobuf::MethodDescriptor::output_type() const' /home/ali/P4/grpc/objs/opt/src/compiler/cpp_plugin.o: In functionProtoBufMethod::get_input_type_name[abi:cxx11]() const': /home/ali/P4/grpc/./src/compiler/protobuf_plugin.h:52: undefined reference togoogle::protobuf::MethodDescriptor::input_type() const' /home/ali/P4/grpc/objs/opt/src/compiler/cpp_plugin.o: In functionProtoBufMethod::output_type_name[abi:cxx11]() const': /home/ali/P4/grpc/./src/compiler/protobuf_plugin.h:48: undefined reference togoogle::protobuf::MethodDescriptor::output_type() const' /home/ali/P4/grpc/objs/opt/src/compiler/cpp_plugin.o: In functionProtoBufMethod::input_type_name[abi:cxx11]() const': /home/ali/P4/grpc/./src/compiler/protobuf_plugin.h:45: undefined reference togoogle::protobuf::MethodDescriptor::input_type() const' /home/ali/P4/grpc/objs/opt/src/compiler/cpp_plugin.o: In functionProtoBufMethod::get_module_and_message_path_output(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const': /home/ali/P4/grpc/./src/compiler/protobuf_plugin.h:71: undefined reference togoogle::protobuf::MethodDescriptor::output_type() const' /home/ali/P4/grpc/objs/opt/src/compiler/cpp_plugin.o: In functionProtoBufMethod::get_module_and_message_path_input(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const': /home/ali/P4/grpc/./src/compiler/protobuf_plugin.h:62: undefined reference togoogle::protobuf::MethodDescriptor::input_type() const' collect2: error: ld returned 1 exit status Makefile:18137: recipe for target '/home/ali/P4/grpc/bins/opt/grpc_cpp_plugin' failed make: *** [/home/ali/P4/grpc/bins/opt/grpc_cpp_plugin] Error 1
please help
On Wed, Apr 15, 2020 at 4:08 PM Andy Fingerhut [email protected] wrote:
There are the README instructions in the p4runtime repository that give some instructions on installing it. It is possible to follow them and succeed, but it is easy to get it wrong and have an incomplete installation.
vagrant up in this tutorials repository is one way.
The end of the README for this tutorials repository has a section listing live tutorials that have been given before, and several of them have links to downloads of successfully installed VM images that you can download (several gigabytes in size) and run using VirtualBox. https://github.com/p4lang/tutorials#older-tutorials
Yet another is to run a bash script that I have written that, starting from a freshly installed Ubuntu 16.04 or 18.04 Linux system with enough free disk space, will install most of the open source P4 development tools on it. https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/p4lang/tutorials/issues/342#issuecomment-613960988, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD2SALEKI7LK62LQ6SOEG3RMWFCXANCNFSM4MHWBRKQ .
--
Warm RegardsMd.Ayyaz A Mulla (+91-9945950646)
If you got the results above by running my install script on an Ubuntu 16.04 system where you had earlier tried to install the P4 software via some other means, but it had not completed for some reason, then most likely the reason the script failed is because of files left over from that failed earlier attempt. My install script makes NO attempt to try to remove or work around an existing installation (or failed installation) of the software -- there are just too many possibilities for states that the file system might be left in for me to possibly test such a script. My recommendation is to start from a freshly installed Ubuntu 16.04 Linux system, with no other software installed on it, as stated in the article that I linked, and please read everything else that article says in case you missed any other parts of it: https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md
If you got the results in your comment by running some other command, then I have no idea what you tried, unless you describe exactly what you did.