Skip to content

Commit

Permalink
Fix compilation error for ubuntu 16.04
Browse files Browse the repository at this point in the history
Include iostream explicitly in ifmap_node.cc as it uses std::cout.

Earlier this include file was coming via boost/assert.h. In the version of boost
used in 16.04 this file(boost/assert.h) has been modified.

Closes-Bug: #1638644

Fix build with newer TBB

Partial-Bug: #1603881

Ubuntu1604: build and packaging changes

Setting right path for gtest

Partial-Bug: #1638584

Fix analytics compilation failure in ubuntu 16.04

Change-Id: I0c0d1f73aaa136398f992b32b43f7ce2b6218a88
Closes-Bug: #1638636
  • Loading branch information
bailkeri authored and vmahuli committed Feb 13, 2019
1 parent baac042 commit 50bd186
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
10 changes: 7 additions & 3 deletions lib/gunit/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ if distname != 'Ubuntu' or float(version) < 14.04:
gunit_h = env.Install('#/build/include/testing', 'gunit.h')
env.Depends(gunit_h, [gtest_dir, gmock_dir])
else:
gtest_path = '/usr/src/gmock/gtest'
gmock_path = '/usr/src/gmock'
if distname == 'Ubuntu' and float(version) == 16.04:
gtest_path = '/usr/src/gtest'
gtest_dir = env.Install('#/build/include', gtest_path)
else:
gtest_path = '/usr/src/gmock/gtest'
gtest_dir = env.Install('#/build/include', gtest_path + '/include/gtest')

gtest_dir = env.Install('#/build/include', gtest_path + '/include/gtest')
gmock_path = '/usr/src/gmock'
gunit_h = env.InstallAs('#/build/include/testing/gunit.h', 'gunit_nowarn.h')
env.Depends(gunit_h, [gtest_dir])
# endif
Expand Down
4 changes: 4 additions & 0 deletions src/analytics/syslog_collector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_stl.hpp>
#if BOOST_VERSION >= 105600
#include <boost/phoenix/object/construct.hpp>
#else
#include <boost/spirit/home/phoenix/object/construct.hpp>
#endif
#include <boost/uuid/uuid.hpp>
#if __GNUC_PREREQ(4, 6)
#pragma GCC diagnostic push
Expand Down
2 changes: 2 additions & 0 deletions src/ifmap/ifmap_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ifmap_node.h"

#include <iostream>

#include <pugixml/pugixml.hpp>

#include "ifmap/ifmap_table.h"
Expand Down
4 changes: 3 additions & 1 deletion src/vnsw/agent/vrouter/ksync/ksync_flow_index_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ KSyncFlowIndexManager::KSyncFlowIndexManager(KSync *ksync) :
}

KSyncFlowIndexManager::~KSyncFlowIndexManager() {
if (count_ > 0)
delete [] index_list_;
}

void KSyncFlowIndexManager::InitDone(uint32_t count) {
proto_ = ksync_->agent()->pkt()->get_flow_proto();
count_ = count;
index_list_.resize(count);
index_list_ = new struct IndexEntry[count_];
sm_log_count_ = ksync_->agent()->params()->flow_index_sm_log_count();
}

Expand Down
4 changes: 1 addition & 3 deletions src/vnsw/agent/vrouter/ksync/ksync_flow_index_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class KSyncFlowIndexManager {
tbb::mutex mutex_;
FlowEntryPtr owner_;
};
typedef std::vector<IndexEntry> IndexList;

KSyncFlowIndexManager(KSync *ksync);
virtual ~KSyncFlowIndexManager();
void InitDone(uint32_t count);
Expand All @@ -68,7 +66,7 @@ class KSyncFlowIndexManager {
KSync *ksync_;
FlowProto *proto_;
uint32_t count_;
IndexList index_list_;
struct IndexEntry *index_list_;
uint16_t sm_log_count_;
};

Expand Down
1 change: 1 addition & 0 deletions src/zookeeper/zookeeper_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

#include <cerrno>
#include <cstring>

#include <base/logging.h>

Expand Down

0 comments on commit 50bd186

Please sign in to comment.