Bug 1105 - Move topology helpers into separate per-device modules
Move topology helpers into separate per-device modules
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: helpers
pre-release
All All
: P5 enhancement
Assigned To: John Abraham
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-19 09:09 EDT by John Abraham
Modified: 2011-05-01 10:52 EDT (History)
3 users (show)

See Also:


Attachments
patch part 1 (861.87 KB, patch)
2011-04-22 15:26 EDT, John Abraham
Details | Diff
patch part2 (956.01 KB, patch)
2011-04-22 15:33 EDT, John Abraham
Details | Diff
Patch part 3 (907.60 KB, patch)
2011-04-22 15:33 EDT, John Abraham
Details | Diff
Full diff excluding py files (96.94 KB, patch)
2011-04-22 15:41 EDT, John Abraham
Details | Diff
Config.log for the linking bug (25.84 KB, application/octet-stream)
2011-05-01 10:42 EDT, Tommaso Pecorella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Abraham 2011-04-19 09:09:37 EDT
Currently topology helpers are located like below 
csma-star under "csma" 
p2p-dumbbell,p2p-star and p2p-grid under "NetAnim"

To be inline with the modularization effort and considering dependencies, we would require "per-device" layout/topology helper modules such as

csma-layout
p2p-layout
wifi-layout, etc
Comment 1 John Abraham 2011-04-22 15:26:45 EDT
Created attachment 1092 [details]
patch part 1

patch had to be split due to size
Comment 2 John Abraham 2011-04-22 15:33:22 EDT
Created attachment 1093 [details]
patch part2

Part 2 of the patch
Comment 3 John Abraham 2011-04-22 15:33:48 EDT
Created attachment 1094 [details]
Patch part 3

Part 3 of the patch
Comment 4 John Abraham 2011-04-22 15:41:51 EDT
Created attachment 1095 [details]
Full diff excluding py files
Comment 5 Tom Henderson 2011-04-26 16:44:02 EDT
(In reply to comment #4)
> Created attachment 1095 [details]
> Full diff excluding py files

John, I reviewed this and it looks good to commit.

- csma-star-helper.h has a comment that needs to be fixed (that states that it is a dumbbell helper)
Comment 6 John Abraham 2011-04-28 10:09:48 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > Created attachment 1095 [details]
> > Full diff excluding py files
> 
> John, I reviewed this and it looks good to commit.
> 
> - csma-star-helper.h has a comment that needs to be fixed (that states that it
> is a dumbbell helper)

test
Comment 7 Tommaso Pecorella 2011-04-29 16:27:44 EDT
As a result of the movement the csma-test is broken.

As a matter of fact csma-system-test-suite.cc is relying on src/csma-layout/model/csma-star-helper.cc

[1377/1433] cxx_link: build/debug/src/test/csma-system-test-suite_4.o build/debug/src/test/global-routing-test-suite_4.o build/debug/src/test/sample-test-suite_4.o build/debug/src/test/static-routing-test-suite_4.o build/debug/src/test/error-model-test-suite_4.o build/debug/src/test/mobility-test-suite_4.o -> build/debug/libns3-test-test.dylib
Undefined symbols:
  "ns3::CsmaStarHelper::GetSpokeDevices() const", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::SpokeCount() const", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::GetHub() const", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::~CsmaStarHelper()", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::CsmaStarHelper(unsigned int, ns3::CsmaHelper)", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::GetSpokeNode(unsigned int) const", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::InstallStack(ns3::InternetStackHelper)", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::AssignIpv4Addresses(ns3::Ipv4AddressHelper)", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
  "ns3::CsmaStarHelper::GetHubIpv4Address(unsigned int) const", referenced from:
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
      CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Comment 8 John Abraham 2011-04-30 09:28:27 EDT
(In reply to comment #7)
> As a result of the movement the csma-test is broken.
> 
> As a matter of fact csma-system-test-suite.cc is relying on
> src/csma-layout/model/csma-star-helper.cc
> 
> [1377/1433] cxx_link: build/debug/src/test/csma-system-test-suite_4.o
> build/debug/src/test/global-routing-test-suite_4.o
> build/debug/src/test/sample-test-suite_4.o
> build/debug/src/test/static-routing-test-suite_4.o
> build/debug/src/test/error-model-test-suite_4.o
> build/debug/src/test/mobility-test-suite_4.o ->
> build/debug/libns3-test-test.dylib
> Undefined symbols:
>   "ns3::CsmaStarHelper::GetSpokeDevices() const", referenced from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::SpokeCount() const", referenced from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::GetHub() const", referenced from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::~CsmaStarHelper()", referenced from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::CsmaStarHelper(unsigned int, ns3::CsmaHelper)",
> referenced from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::GetSpokeNode(unsigned int) const", referenced from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::InstallStack(ns3::InternetStackHelper)", referenced
> from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::AssignIpv4Addresses(ns3::Ipv4AddressHelper)",
> referenced from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>   "ns3::CsmaStarHelper::GetHubIpv4Address(unsigned int) const", referenced
> from:
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
>       CsmaStarTestCase::DoRun()      in csma-system-test-suite_4.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status


Hi Tomasso,
please list the ./waf commands you executed to obtain this error.
Thanks
john
Comment 9 Tommaso Pecorella 2011-05-01 10:42:03 EDT
Created attachment 1102 [details]
Config.log for the linking bug
Comment 10 Tommaso Pecorella 2011-05-01 10:46:34 EDT
Hi John,

the usual commands I use when I'm in doubt.
./waf distclean
./waf configure --enable-test
./waf -j 3 (my machine have 8 processors).

The results of the configure are in the previous attachment, but I can copy-paste them for convenience.

-----

16:35:46:~/Development/workspace/ns-3-allinone/ns-3-dev pecos$ ./waf configure --enable-test
Checking for program gcc or cc           : /usr/bin/gcc 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for gcc                         : ok  
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for g++                         : ok  
Checking for program pkg-config          : /opt/local/bin/pkg-config 
Checking for type uint128_t              : not found 
Checking for type __uint128_t            : yes 
Checking for high precision time implementation : 128-bit integer 
Checking for header stdint.h                    : yes 
Checking for header inttypes.h                  : yes 
Checking for header sys/inttypes.h              : not found 
Checking for header stdlib.h                    : yes 
Checking for header signal.h                    : yes 
Checking for header pthread.h                   : yes 
Checking for header stdint.h                    : yes 
Checking for header inttypes.h                  : yes 
Checking for header sys/inttypes.h              : not found 
Checking for library rt                         : not found 
Checking for header netpacket/packet.h          : not found 
Checking for header linux/if_tun.h              : not found 
Checking for pkg-config flags for GTK_CONFIG_STORE  : ok  
Checking for pkg-config flags for LIBXML2           : ok  
Checking for NSC location                           : not found 
Checking for header sys/socket.h                    : yes 
Checking for header netinet/in.h                    : yes 
Checking for click location                         : not found 
boost headers                                       : Version 1_46_1 (/opt/local/include) 
library boost_signals                               : ok 
library boost_filesystem                            : ok 
Checking for OpenFlow location                      : not found 
Checking for program python                         : /usr/bin/python 
Checking for Python version >= 2.3                  : ok 2.6.1 
Checking for library python2.6                      : yes 
Checking for program python2.6-config               : /usr/bin/python2.6-config 
Checking for header Python.h                        : yes 
Checking for -fvisibility=hidden support            : yes 
Checking for pybindgen location                     : ok ../pybindgen (guessed) 
Checking for Python module pybindgen                : ok  
Checking for pybindgen version                      : ok 0.15.0.785 
Checking for types uint64_t and unsigned long equivalency : no 
Checking for types uint64_t and unsigned long long equivalency : yes 
Checking for the apidefs that can be used for Python bindings  : gcc-ILP32 
Checking for type of bindings to build                         : modular 
Checking for Python module pygccxml                            : not found 
Checking for program mpic++                                    : /usr/bin/mpic++ 
Checking for program sudo                                      : /usr/bin/sudo 
Checking for program valgrind                                  : not found 
Checking for pkg-config flags for GSL                          : ok  
Checking for -Wno-error=deprecated-declarations support        : yes 
Checking for -Wno-error=deprecated-declarations support        : yes 
Checking for -fstrict-aliasing support                         : yes 
Checking for -fstrict-aliasing support                         : yes 
Checking for -Wstrict-aliasing support                         : yes 
Checking for -Wstrict-aliasing support                         : yes 
Checking for program doxygen                                   : /opt/local/bin/doxygen 
---- Summary of optional NS-3 features:
Threading Primitives          : enabled
Real Time Simulator           : not enabled (librt is not available)
Emulated Net Device           : not enabled (<netpacket/packet.h> include not detected)
Tap Bridge                    : not enabled (<linux/if_tun.h> include not detected)
GtkConfigStore                : enabled
XmlIo                         : enabled
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
NS-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
NS-3 OpenFlow Integration     : not enabled (OpenFlow not enabled (see option --with-openflow))
Python Bindings               : enabled
Python API Scanning Support   : not enabled (Missing 'pygccxml' Python module)
MPI Support                   : not enabled (option --enable-mpi not selected)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build tests                   : enabled
Build examples                : not enabled (defaults to disabled)
Static build                  : not enabled (option --enable-static not selected)
GNU Scientific Library (GSL)  : enabled
'configure' finished successfully (7.006s)

Cheers,
Tommaso

PS: I see the bugzilla bug isn't yet fixed for good :( It's kinda ironic that bugzilla is bugged.
Comment 11 Tommaso Pecorella 2011-05-01 10:52:07 EDT
Fixed with latest build (changeset:   7102:e51a52cb627a)

Closing the bug.

Tommaso