Giter Site home page Giter Site logo

Comments (4)

antoninbas avatar antoninbas commented on August 14, 2024

Are you using Ubuntu 14.04 and did run the install.sh script as per the README?
You may want to check that the Thrift headers were correctly installed on your system. Mine are under /usr/local/include/thrift/.

from p4factory.

awsation avatar awsation commented on August 14, 2024

I wanted to run this on Fedora so I have created a similar install script for it:

# installation script for ubuntu 14.04
trap 'exit' ERR                                                                             

sudo yum update

sudo yum install -y automake bison doxygen ethtool flex g++ git \                           
ipython ipython-notebook libany-moose-perl libboost-dev libboost-filesystem-dev \
libboost-program-options-dev libboost-system-dev libboost-test-dev libbsd-dev \             
libedit-dev libevent-dev libfreetype6-dev libhiredis-dev libjudy-dev libpcap-dev \          
libpng-dev libssl-dev libtool libyaml-0-2 libbz2-dev mininet openssl pkg-config python-dev \
python-dpkt python-jsonpickle python-imaging-tk python-matplotlib python-nose python-numpy \
python-pandas python-pip python-pygraph python-pygraphviz python-scipy \                    
python-setuptools python-sympy python-yaml redis-server thrift-compiler \
wireshark                                                                                   

sudo pip install --upgrade thrift

# build thrift from sources                                                                 
mkdir install_tmp

cd install_tmp                                                                              
wget -c http://archive.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz
tar zxvf thrift-0.9.2.tar.gz                                                                
cd thrift-0.9.2                                                                             
./configure --without-lua
cd test/cpp ; ln -s . .libs ; cd ../..                                                      
make -j4                                                                                    
sudo make install
sudo ldconfig                                                                               
cd ..                                                                                       

# Install high level interpreter and scapy                                                  

git clone https://github.com/p4lang/p4-hlir.git
cd p4-hlir                                                                                  
sudo python setup.py install                                                                
cd ..

# Install P4 dependency graph generator                                                     

git clone https://github.com/p4lang/p4c-graphs.git                                          
cd p4c-graphs                                                                               
sudo python setup.py install
cd ..                                                                                       

sudo yum remove python-scapy
git clone https://github.com/p4lang/scapy-vxlan.git                                         
cd scapy-vxlan                                                                              
sudo python setup.py install
cd ..                                                                                       

cd ..

# rm -rf install_tmp                                                                        

It finished fine, but when I went to build the basic routing modules it failed. It looks like I don't even have the /usr/local/include/thrift. Any ideas ?

Thanks.

from p4factory.

antoninbas avatar antoninbas commented on August 14, 2024

If you are sure that the installation went fine, you should:

  1. find the header on your system: sudo find / -name 'TBinaryProtocol.h'
  2. make sure it is in the preprocessor path: echo | cpp -Wp,-v

If you cannot find the header, then the installation went wrong. If the header is there but cpp does not look for it in the right place, it should be pretty easy to fix.

In my case, I get:

  1. /usr/local/include/thrift/protocol/TBinaryProtocol.h

ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/4.9/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
...

from p4factory.

awsation avatar awsation commented on August 14, 2024

@antoninbas thanks for your help. it looks like I was trying to install packages without paying attention that their name might be different in Fedora. For example, libboost-dev vs. boost-devel, judy-devel vs. libjudy-dev.

So in that sense, my installation, although it looked like it finished fine, never did. So I think that's where the problem is.

Thanks for your help and time.

Cheers.

from p4factory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.