Bugzilla – Bug 1265
Make ns-3 directory "movable"
Last modified: 2011-09-26 06:05:07 UTC
Hi, would it be possible to make ns-3 directory movable after it's built? Right now, if it's stored in /home/username/ns-3-allinone/ns-3-dev, and you move it to e.g. /home/username/ns-3-allinone-something/ns-3-dev, waf gives: $ ./waf invalid lock file in /home/vedranm/ns-3-dev The project was not configured: run "waf configure" first! which is an improvement, IIRC waf 1.5 threw an exception. Is it possible to make it "movable"?
I really do not know, maybe you should ask the WAF developers? http://waf.googlecode.com/ As previously stated, I really want to avoid excessive "hacks" over WAF, as they make upgrades really difficult.
Sure.
Marking INVALID because the problem or solution does not belong in ns-3, it is an upstream waf issue.
Hi Gustavo, Thomas Nagy responded on bug report in waf issue tracker[1]. Does solution he describes seem feasible and easy enough to implement? [1] http://code.google.com/p/waf/issues/detail?id=1046
I followed the example and added the 'relocation' tool to ns-3. Can you test? changeset: 7544:51f8237d285a tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Mon Sep 26 10:41:55 2011 +0100 summary: Bug 1265 - Make ns-3 directory "movable"
Seems fixed :-) [vedranm@kaskade ~]$ mv ns-3-dev/ ns-3-dev-test [vedranm@kaskade ~]$ cd ns-3-dev-test/ [vedranm@kaskade ns-3-dev-test]$ ./waf --run examples/ energy/ mobility/ socket/ udp/ error-model/ naming/ stats/ udp-client-server/ ipv6/ realtime/ tcp/ waf matrix-topology/ routing/ tutorial/ wireless/ [vedranm@kaskade ns-3-dev-test]$ ./waf --run examples/tutorial/first.cc invalid lock file in /home/vedranm/ns-3-dev-test The project was not configured: run "waf configure" first! [vedranm@kaskade ns-3-dev-test]$ ./waf configure invalid lock file in /home/vedranm/ns-3-dev-test Setting top to : /home/vedranm/ns-3-dev-test Setting out to : /home/vedranm/ns-3-dev-test/build Checking for 'gcc' (c compiler) : /usr/lib/ccache/gcc Checking for 'g++' (c++ compiler) : /usr/lib/ccache/g++ Checking for program pkg-config : /usr/bin/pkg-config Checking for compilation flag -Wl,--soname=foo... support : ok Checking for click location : not found Checking for pkg-config flags for GTK_CONFIG_STORE : not found Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0' found Checking for pkg-config flags for LIBXML2 : not found Package libxml-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libxml-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libxml-2.0' found Checking for type uint128_t : not found Checking for type __uint128_t : not found Checking 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 sys/types.h : yes Checking for header sys/stat.h : yes Checking for header dirent.h : yes 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 NSC location : not found Checking for header sys/socket.h : yes Checking for header netinet/in.h : yes Checking boost includes : Package gsl was not found in the pkg-config search path. Perhaps you should add the directory containing `gsl.pc' to the PKG_CONFIG_PATH environment variable No package 'gsl' found ---- Summary of optional NS-3 features: NS-3 Click Integration : not enabled (nsclick not enabled (see option --with-nsclick)) GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found) XmlIo : not enabled (library 'libxml-2.0 >= 2.7' not found) Threading Primitives : enabled Real Time Simulator : enabled Emulated Net Device : enabled Network Simulation Cradle : not enabled (NSC not found (see option --with-nsc)) MPI Support : not enabled (option --enable-mpi not selected) NS-3 OpenFlow Integration : not enabled (Required boost libraries not found) SQlite stats data output : not enabled (library 'sqlite3' not found) Tap Bridge : enabled Python Bindings : not enabled (The configuration failed (complete log in /home/vedranm/ns-3-dev-test/build/config.log)) 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) : not enabled (GSL not found) 'configure' finished successfully (2.524s) [vedranm@kaskade ns-3-dev-test]$ ./waf build relocating the source directory '/home/vedranm/ns-3-dev' -> '/home/vedranm/ns-3-dev-test' Waf: Entering directory `/home/vedranm/ns-3-dev-test/build' [ 1/1233] install-ns3-header: src/aodv/model/aodv-packet.h -> build/ns3/aodv-packet.h [ 2/1233] install-ns3-header: src/aodv/model/aodv-neighbor.h -> build/ns3/aodv-neighbor.h [ 3/1233] install-ns3-header: src/aodv/model/aodv-rqueue.h -> build/ns3/aodv-rqueue.h (...) [ 575/1233] gen-module-header: build/ns3/wimax-mac-to-mac-header.h build/ns3/service-flow-record.h build/ns3/bs-service-flow-manager.h build/ns3/wimax-tlv.h build/ns3/cid-factory.h build/ns3/bs-uplink-scheduler-simple.h build/ns3/ul-mac-messages.h build/ns3/send-params.h build/ns3/bs-scheduler-simple.h build/ns3/ss-service-flow-manager.h build/ns3/simple-ofdm-wimax-channel.h build/ns3/bs-uplink-scheduler.h build/ns3/bs-net-device.h build/ns3/bs-scheduler.h build/ns3/snr-to-block-error-rate-manager.h build/ns3/wimax-mac-queue.h build/ns3/ipcs-classifier-record.h build/ns3/crc8.h build/ns3/ul-job.h build/ns3/wimax-channel.h build/ns3/cid.h build/ns3/connection-manager.h build/ns3/ipcs-classifier.h build/ns3/wimax-phy.h build/ns3/wimax-helper.h build/ns3/snr-to-block-error-rate-record.h build/ns3/ss-manager.h build/ns3/cs-parameters.h build/ns3/simple-ofdm-wimax-phy.h build/ns3/simple-ofdm-send-param.h build/ns3/ss-record.h build/ns3/bs-scheduler-rtps.h build/ns3/wimax-net-device.h build/ns3/mac-messages.h build/ns3/dl-mac-messages.h build/ns3/wimax-connection.h build/ns3/ss-net-device.h build/ns3/service-flow-manager.h build/ns3/bs-uplink-scheduler-rtps.h build/ns3/bvec.h build/ns3/service-flow.h build/ns3/ofdm-downlink-frame-prefix.h build/ns3/bs-uplink-scheduler-mbqos.h build/ns3/wimax-mac-header.h -> build/ns3/wimax-module.h [ 770/1233] cxx: utils/bench-simulator.cc -> build/utils/bench-simulator.cc.2.o [1100/1233] cxx: scratch/scratch-simulator.cc -> build/scratch/scratch-simulator.cc.1.o [1142/1233] cxxprogram: build/utils/bench-simulator.cc.2.o -> build/utils/bench-simulator [1212/1233] cxxprogram: build/scratch/scratch-simulator.cc.1.o -> build/scratch/scratch-simulator Waf: Leaving directory `/home/vedranm/ns-3-dev-test/build' 'build' finished successfully (2.854s) Modules built: aodv applications bridge config-store core csma csma-layout dsdv emu energy flow-monitor internet lte mesh mobility mpi netanim network nix-vector-routing 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: click openflow Thanks, this will save a lot of compiling.
Great. Closing then.