Skip to content

applications: Use SimpleNetDevice instead of PointToPoint

Stefano Avallone requested to merge stavallo/ns-3-dev:fix-build into master

Build fails on Mac OS for me:

Waf: Entering directory `/Users/stefano/ns-3-dev/build'
[1854/2685] Compiling src/applications/test/bulk-send-application-test-suite.cc
[2646/2685] Linking build/lib/libns3-dev-applications-test-debug.dylib
Undefined symbols for architecture x86_64:
  "ns3::PointToPointHelper::SetDeviceAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ns3::AttributeValue const&)", referenced from:
      BulkSendBasicTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
      BulkSendSeqTsSizeTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
  "ns3::PointToPointHelper::SetChannelAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, ns3::AttributeValue const&)", referenced from:
      BulkSendBasicTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
      BulkSendSeqTsSizeTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
  "ns3::PointToPointHelper::Install(ns3::NodeContainer)", referenced from:
      BulkSendBasicTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
      BulkSendSeqTsSizeTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
  "ns3::PointToPointHelper::PointToPointHelper()", referenced from:
      BulkSendBasicTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
      BulkSendSeqTsSizeTestCase::DoRun() in bulk-send-application-test-suite.cc.3.o
  "vtable for ns3::PointToPointHelper", referenced from:
      ns3::PointToPointHelper::~PointToPointHelper() in bulk-send-application-test-suite.cc.3.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is because the bulk-send-application-test-suite.cc is located in the applications module and makes use of the PointToPointHelper, but the applications module does not depend on the point-to-point module.

The suggested fix is to replace the PointToPointNetDevice with the SimpleNetDevice (the applications module depends on the network module).

Merge request reports