Bug 1828 - Tests and examples do not compile when sctp-tools is not enabled
Tests and examples do not compile when sctp-tools is not enabled
Status: CLOSED FIXED
Product: dce
Classification: Unclassified
Component: other
unspecified
PC Linux
: P5 enhancement
Assigned To: Hajime Tazaki
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-09 12:08 EST by alina
Modified: 2014-04-15 09:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alina 2014-01-09 12:08:00 EST
There are several DCE tests and examples that are not validating the dependency with bld.env['SCTP_TOOLS_FOUND'] in the wscripts and will not compile without it. 

The simplest way to fix the problem is to install sctp-tools-dev. Is sctp-tools-dev a required dependency for DCE ? In this case, shouldn't the ./waf configure fail if it was not found?

Checking for header netinet/sctp.h               : not found
---- Summary of optional NS-3 features:
Static build                  : not enabled (option --enable-static not selected)
Logging                       : enabled
Assert checks                 : enabled
Code coverage                 : not enabled (option --enable-gcov not selected)
Example programs              : enabled
Test programs                 : enabled
Debug Symbols                 : enabled
ELF magic loader              : not enabled (elf-loader not found)
Aspect-based tracing          : not enabled (libaspect not found)
sctp-tools-dev                : not enabled (sctp-tools (netinet/sctp.h) not found)

The output from ./waf build gives the following error:

[137/163] cxxprogram: build/myscripts/loaders-test/mytest.cc.1.o -> build/bin_dce/mytest
[138/163] cxxprogram: build/myscripts/tuto3/dce-tuto3.cc.1.o -> build/myscripts/tuto3/bin/dce-tuto3
[139/163] cxxprogram: build/example/ccnx/dce-ccn-cache.cc.14.o build/example/ccnx/misc-tools.cc.14.o -> build/bin/dce-ccn-cache
[140/163] cxxprogram: build/example/bash/dce-bash-simple.cc.13.o -> build/bin/dce-bash-simple
[141/163] cxxprogram: build/myscripts/ccn-mt1/ccn-mt1.cc.1.o -> build/myscripts/ccn-mt1/bin/dce-ccn-mt1
lib/libns3-dce.so: undefined reference to ns3::LinuxSctpSocketFactory::GetTypeId()'
lib/libns3-dce.so: undefined reference to `vtable for ns3::LinuxSctpSocketFactoryImpl'
lib/libns3-dce.so: undefined reference to `ns3::LinuxSctp6SocketFactory::GetTypeId()'
lib/libns3-dce.so: undefined reference to `vtable for ns3::LinuxSctp6SocketFactoryImpl'
collect2: error: ld returned 1 exit status
Comment 1 Hajime Tazaki 2014-01-09 18:26:07 EST
thanks again.

the issue was fixed: if the sctp-tools-dev package wasn't found, it skipped two files built, but built socket factories, which don't use lksctp in fact.

http://code.nsnam.org/ns-3-dce/rev/fab0397aa9a4

I also added bake system deps check for the library.

http://code.nsnam.org/bake/rev/dab7b1222857