Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Build on Ubuntu 14.04 #13

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,8 @@ function(fboss_add_thrift)
set(services ${services} ${CMAKE_BINARY_DIR}/gen/${dirname}/gen-cpp2/${srv}.h)
endforeach(srv)
foreach(gen cpp cpp2)
foreach(reflect ${arg_REFLECT})
set(outputs ${outputs}
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${reflect}_reflect.h
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${reflect}_reflect.cpp)
endforeach(reflect)
foreach(output constants types)
set(outputs ${outputs}
foreach(output constants types reflection)
set(outputs ${outputs}
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${basename}_${output}.h
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${basename}_${output}.cpp)
endforeach(output)
Expand All @@ -249,11 +244,9 @@ function(fboss_add_thrift)
endfunction(fboss_add_thrift)

fboss_add_thrift(THRIFTSRC common/fb303/if/fb303.thrift SERVICES FacebookService)
fboss_add_thrift(THRIFTSRC common/network/if/Address.thrift
OPTIONS json,compatibility,include_prefix=common/network/if
REFLECT Address)
fboss_add_thrift(THRIFTSRC fboss/agent/switch_config.thrift
REFLECT switch_config)
fboss_add_thrift(THRIFTSRC common/network/if/Address.thrift
OPTIONS json,compatibility,include_prefix=common/network/if)
fboss_add_thrift(THRIFTSRC fboss/agent/switch_config.thrift)
fboss_add_thrift(THRIFTSRC fboss/agent/hw/sim/sim_ctrl.thrift SERVICES SimCtrl)
fboss_add_thrift(THRIFTSRC fboss/agent/if/ctrl.thrift
SERVICES FbossCtrl PortStatusListenerClient)
Expand Down
3 changes: 1 addition & 2 deletions fboss/agent/NeighborUpdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ using std::chrono::seconds;
using std::shared_ptr;
using boost::container::flat_map;
using folly::Future;
using folly::Unit;
using folly::collectAll;

namespace facebook { namespace fboss {
Expand Down Expand Up @@ -136,7 +135,7 @@ NeighborUpdater::NeighborUpdater(SwSwitch* sw)
sw_(sw) {}

NeighborUpdater::~NeighborUpdater() {
std::vector<Future<Unit>> stopTasks;
std::vector<Future<void>> stopTasks;

for (auto entry : updaters_) {
auto vlan = entry.first;
Expand Down
5 changes: 2 additions & 3 deletions fboss/agent/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@ Generate the python bindings from the thrift files:
done


######
# Apply a couple of fixups (fixups or ???)

Dodge the "can't find generator 'cpp2' error"

sed -i -e '^namespace cpp2 facebook.fboss/#namespace cpp2 facebook.fboss/' \
sed -i -e 's/^namespace cpp2 facebook.fboss/#namespace cpp2 facebook.fboss/' \
$FBOSS/fboss/agent/if/*.thrift

fboss.agent doesn't exist, but fboss.ctrl does

sed -i -e 's/^from fboss.agent/from fboss.ctrl/' \
$FBOSS/fboss/agent/tools/fboss_route.py


Now run the fboss_route command:

export FBOSS_IF=$FBOSS/fboss/agent/if/gen-py
Expand Down
4 changes: 2 additions & 2 deletions fboss/agent/tools/fboss_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ def list_routes(args):
def list_optics(args):
details = args.details
with get_client(args) as client:
for key,val in client.getTransceiverInfo(range(1,64)).iteritems():
for key,val in client.getTransceiverInfo(range(1,65)).iteritems():
print ("Optic %d: %s" % (key, str(val)))

def list_ports(args):
details = args.details
with get_client(args) as client:
#for intf in client.getInterfaceList():
for idx, intf in client.getPortStatus(range(1,64)).iteritems():
for idx, intf in client.getPortStatus(range(1,65)).iteritems():
stats = client.getPortStats(idx) if details else ""
print ("Port %d: %s: %s" % (idx, str(intf), stats))

Expand Down
6 changes: 3 additions & 3 deletions getdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ function update() {
(cd $repo && git pull)
else
git clone $1
git checkout $2
fi
}

Expand All @@ -22,6 +21,7 @@ function build() {
(
echo "building $1..."
cd $1
git checkout $2
if [ ! -x ./configure ]; then
autoreconf --install
./configure
Expand All @@ -32,9 +32,9 @@ function build() {

echo "installing packages"
sudo apt-get install -yq autoconf automake libdouble-conversion-dev \
libssl-dev make zip git autoconf libtool g++ libboost-all-dev \
libssl-dev make cmake zip git autoconf libtool g++ libboost-all-dev \
libevent-dev flex bison libgoogle-glog-dev scons libkrb5-dev \
libsnappy-dev libsasl2-dev libnuma-dev libi2c-dev libcurl4-nss-dev
libsnappy-dev libsasl2-dev libnuma-dev libi2c-dev libcurl4-nss-dev libdb-dev

echo "creating external..."
mkdir -p external
Expand Down