Bugzilla – Bug 1184
click is listed as built even if it's not enabled
Last modified: 2011-06-14 16:00:25 UTC
$ ./waf configure && ./waf build Checking for program gcc or cc : /usr/lib/ccache/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/lib/ccache/g++ Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for program pkg-config : /usr/bin/pkg-config Checking for -Wl,--soname=foo support : yes Checking for type uint128_t : not found Checking for type __uint128_t : not found Checking for high precision time implementation : cairo 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 : yes Checking for header netpacket/packet.h : yes Checking for header linux/if_tun.h : yes Checking for pkg-config flags for GTK_CONFIG_STORE : ok Checking for pkg-config flags for LIBXML2 : ok Checking for NSC location : ok ../nsc (guessed) Checking for library dl : yes Checking for NSC supported architecture i686 : ok 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 (/usr/include) library boost_signals : ok library boost_filesystem : ok Checking for OpenFlow location : not found Checking for library sqlite3 : yes Checking for program python : /usr/bin/python Checking for Python version >= 2.3 : ok 2.7.1 Checking for library python2.7 : yes Checking for program python2.7-config : /usr/bin/python2.7-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++ : not found Checking for program sudo : /usr/bin/sudo Checking for program valgrind : /usr/bin/valgrind 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 : /usr/bin/doxygen ---- Summary of optional NS-3 features: Static build : not enabled (option --enable-static not selected) Threading Primitives : enabled Real Time Simulator : enabled Emulated Net Device : enabled Tap Bridge : enabled GtkConfigStore : enabled XmlIo : enabled Network Simulation Cradle : enabled 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)) SQlite stats data output : enabled 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 : not enabled (defaults to disabled) Build examples : not enabled (defaults to disabled) GNU Scientific Library (GSL) : enabled 'configure' finished successfully (2.455s) Waf: Entering directory `/home/vedranm/bin/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/vedranm/bin/ns-3-allinone/ns-3-dev/build' 'build' finished successfully (0.858s) Modules built: aodv applications bridge click config-store core csma csma-layout dsdv emu energy flow-monitor internet lte mesh mobility mpi netanim network nix-vector-routing ns3tcp ns3wifi olsr point-to-point point-to-point-layout propagation spectrum stats tap-bridge template test tools topology-read uan virtual-net-device visualizer wifi wimax Modules not built: openflow I have latest ns-3-dev downloaded by ./download.py in ns-3-allinone.
This is because Click is built in the same manner as MPI, and builds empty classes if Click isn't enabled. Running any of the Click examples in this case reminds the user to get Click enabled first. This was raised during the review by Tom [0], and Mathieu responded by saying it's much easier to avoid making wscripts too smart. So I left it as it is. If anyone can send in wscript patches for this, I'll be more than happy to push it through. :) [0] http://codereview.appspot.com/3988043/diff/35001/src/routing/click/helper/click-internet-stack-helper.cc#newcode23
In order to get the static build to work on darwin, I added the capability to our waf scripts to have enabled modules not be built if the components they depend on (click, Python, openflow, etc) are not present on the user's machine. So it is relatively easy to make the click module not be built when click is not installed.
Bug closed. Changeset: 73175a16fa7a
Thanks.