NS3 Installation on OSX 10.12 Using Bake tool By: Adil A Alsuhaim Updated: June 29, 2017 The way I installed ns-3.26 on Mac successfully is by using the Bake tool.

General Pre-requisites : 1.

Install xcode command line tools. If you have already done that, you can skip it. You can do that by typing in the terminal xcode-select –install

2. Download MacPorts form http://www.macports.org Make sure your $PATH includes /opt/local/bin which is where MacPort’s command, port, is installed. It might be something different. But make sure MacPorts is correctly installed by typing port in the terminal. 3. Install HomeBrew tool (http://homebrew.sh) by simply using the command they provide (uses Ruby, which I believe is installed by xcode) /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 4. Install Mercurial using MacPorts using sudo port install mercurial

Now we will download pre-requisites for NS3 using Bake tool: 1. Download the bake tool using Mercurial command, hg, as follows: hg clone http://code.nsnam.org/bake The NS3 advises to add bake to your path. 2. Use the bake tool to check for pre-requisites: bake.py check On a fresh Mac OSX 10.12 (Sierra), you're probably going to be missing the following. This is what a CVS, Bazaar, Unrar tool, 7z data compression utility, XZ data compression utility, cMake and autoreconf 3. We will use MacPorts & HomeBrew to install the required packages as follows: • Install CVS: o sudo port install cvs o You can run ./bake.py check to see that CVS is no longer missing. • Install bazaar o brew install bzr o For some reason, “bake.py check” doesn’t like MacPort’s Bazaar. If you have issues installing something with MacPorts, try to do it with HomeBrew instead or vice versa.



• •

Install rar/7zip/xz tools using HomeBrew o brew install unrar o brew install p7zip o brew install xz Install cMake o brew install cMake Install Autoconf o brew install autoconf

4. Tell bake took what components do you want to install. In my case, I want ns-3.26. ./bake.py configure –e ns-3.26 This basically creates an XML file with your configuration 5. Now we want to check more pre-requisites for NS3 (I needed to have Python Binding because I needed to use Python Visualization (PyViz), which is an online visualization tool (you visualize your simulation as it runs, as opposed to NetAnim, which visualizes the simulation offline, or retrospectively (from an XML file using ns3::AnimationInterface) To run the check, run ./bake.py show In my case, I got the following missing pygoocanvas, pygraphviz, python-dev and qt4 Qt4, not Qt5 is needed for NetAnim. However, don’t waste your time downloading Qt4 from Qt’s website. OSX Sierra does not support. I could not even build Qt4 from sources on Sierra. What I used is HomeBrew, which applies a patch to Qt4 and then installs it successfully for OSX El-Capitan and Sierra!

OPTIONAL : Installing visualization tools pre-requisutes •

To install pygoocanvas, use MacPorts. This will depends on which version of Python do you have installed. I believe there are issues with Python3, so I am using Python2.7 o sudo port install py27-goocanvas o You should run ./bake.py show to see that pygoocanvas is now “OK”



To install pygraphviz, use MacPorts. o sudo port install py27-pygraphviz o You should run ./bake.py show to see that pygraphviz is now “OK”



If you have issues with Python version, you may run: o port select python Which will show you available Python on your system. You may get something like this Available for python: None (active) Python26-apple Python27 Python27-apple So I believe you can select which one you want to use. I believe I have installed python for MacPorts, and so I can choose python27 (as opposed to python27-apple) sudo port select python python27



I could not get “python-dev” requirement to be satisfied, but I installed ns3 and got what I needed installed with no issues.



To install Qt4 (which is needed to build NetAnim) on OSX Sierra you will need to use HomeBrew. You can check if you have Qt installed by running “qmake” or “qmake --version” to see what version. I used the following formula. o brew install cartr/qt4/qt-legacy-formula o Note that there was an older formula to do this “brew install cartr/qt4/qt”, which is now deprecated. This will download Qt4.8.7 and then applies a patch for your OSX version. It will apply the ElCapitan patch, which works for Sierra, I believe. Run ./bake.py show to show Qt4 dependency. Notice that it may show that it is “missing”, but will also tell you that Qt is Enabled. You can check by running qmake --version

Build NS3 using Bake tool Now we simply download and build ns3 using the bake tool as follows: ./bake.py download ./bake.py build or simply, you can do this in one go and type ./bake.py deploy You can now run ./waf configure if you see that PyViz is enabled good! Otherwise, you might need to do a little “trick”

Building NetAnim 3.107 and a PyViz trick! •

• • • • •



Once you installed Qt4, you can now build NetAnim 3.107 with Qt4. Go to the source directory of NetAnim and build it with make (this will use qmake for Qt4) o cd netanim-3.107 o make If this did not work, consider building NetAnim with the command: o make clean o qmake NetAnim.pro If NetAnim did not build correctly, it might be because you are using Qt5, so check which qmake does your system point to. Check Qt4 version by typing: o qmake –version If the version is Qt4.x, go ahead and build NetAnim. Otherwise, check where your qmake file is by typing: o which qmake You will get the location of your qmake file, which is likely something like this: o /usr/bin/qmake If you know where the qmake file for Qt4 is, make sure your system look in that directory first. You can do that by modifying your $PATH environment variable. First check your $PATH environment variables with the command: o echo $PATH The result will be something like this: /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11 /bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands

o

• • • •

• •

Notice that your system searches these directories in order for any command you type in terminal, so /opt/local/bin is checked first, then opt/local/sbin and so on. o We want to make sure the qmake for Qt4 is searched first if we want to build NetAnim with Qt4. Qt4 installed by HomeBrew installs will be placed in this directory: o /usr/local/Cellar/qt@4/ And the qmake for Qt4 is will be in the directory o /usr/local/Cellar/qt@4/4.8.7_1/bin We will add this directory to $PATH so that the system searches it first by typing: o export PATH=/usr/local/Cellar/qt@4/4.8.7_1/bin:$PATH We can check this again by typing echo $PATH to get: /usr/local/Cellar/qt@4/4.8.7_1/bin/opt/local/bin:/opt/local/sbin:/usr/l ocal/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks /Mono.framework/Versions/Current/Commands Notice that our Qt4 directory is searched first! Alternatively, you may choose to create a symbolic link to the qmake executable in /usr/local/bin and avoid adding the directory to $PATH so that you do not end up with a large $PATH variable that can be hard to read. To create a symbolic link, we type: o o



ln -s /usr/local/Cellar/qt@4/4.8.7_1/bin/qmake /usr/local/bin/qmake

Your system looks in /usr/local/bin before /usr/bin, and therefore it will find qmake in /usr/local/bin and use qmake for Qt4 instead.

Note that on Ubuntu, we have qtchooser which can be used to select which version of Qt to use. This does not seem to be available in OSX.



NS3 may not recognize PyGraphViz/PyBindGen that is needed for PyViz. The issue is due to a version number “string” mismatch! For example, when you run NS3’s ./waf configure, you may see Checking for pybindgen version : 0.17.0.post57+nga6376f2.d20161013 Pybindgen (found ‘0.17.0.post57+nga6376f2.d20161013’) , (need ‘0.17.0.post57+nga6376f2) The last portion of the version string need to be . This string is in the file: place_where_bake_was_downloaded/Bake/source/pybindgen/version.py In the line: Version = ‘0.17.0.post57+nga6376f2.d20161013’ You will remove the .d20161013 from the string, then save & quit. Run ./waf configure again, and now you should have PyViz enabled for NS3

I hope you find this useful. Regards, Adil A Alsuhaim Clemson University, USA Contact: [email protected] or [email protected]

NS3 Installation on OSX 10.12 Using Bake tool -

Jun 29, 2017 - Install Autoconf o brew install autoconf. 4. Tell bake took what components do you want to install. ... pygoocanvas, pygraphviz, python-dev and qt4. Qt4, not Qt5 is needed for NetAnim. ... I could not get “python-dev” requirement to be satisfied, but I installed ns3 and got what I needed installed with no issues.

474KB Sizes 14 Downloads 213 Views

Recommend Documents

Medical installation tool
Mar 29, 2006 - Techniques,” Technical Manual. (Continued). Primary Examiner * Nicholas Woodall. (74) Attorney, Agent, or Firm * Nutter McClennen & Fish.

pdf organizer osx
Sign in. Page. 1. /. 1. Loading… Page 1 of 1. File: Pdf organizer osx. Download now. Click here if your download doesn't start automatically. Page 1 of 1.

Install uTracer on OSX 10.11 'El Capitan' - DOS4Ever
Dec 28, 2015 - in Apple System information. Or even better use the program 'Arduino' (https://www.arduino.cc/). For the last step remember the link to the USB ...

Pdf mac osx
and gaining customers throughword ofmouth. Theamount of valuable market research that which forevermoreshall bethecompany could be. getting could beso ...

pdf osx editor
File: Pdf osx editor. Download now. Click here if your download doesn't start automatically. Page 1 of 1. pdf osx editor. pdf osx editor. Open. Extract. Open with.

Student Visa Application (INZ 1012) - Victoria
Nov 21, 2011 - ... Undertaking for a Student (INZ 1014) completed by a third party guarantor accepting ..... that the information provided was correct before signing the declaration. .... electronic credit card and your application is being lodged.

OSX El Capitan dmg
Page 1 of 20. Agarest war reloaded.Thetown rarbg.99724595025 - Download OSXElCapitan dmg.Lip to lip de kis.Also, hasa movie projectionist, Tyler. inserts singleframes of pornographywho let the dogs outchildren's movies. Finally, Tyler's brainchild, t

OSX El Capitan dmg
Page 1 of 20. Agarest war reloaded.Thetown rarbg.99724595025 - Download OSXElCapitan dmg.Lip to lip de kis.Also, hasa movie projectionist, Tyler. inserts singleframes of pornographywho let the dogs outchildren's movies. Finally, Tyler's brainchild, t

pdf-12111\objective-c-on-osx-hold-the-gui-25-pages-of ...
... apps below to open or edit this item. pdf-12111\objective-c-on-osx-hold-the-gui-25-pages-of ... 25-minutes-25-pages-in-25-minutes-by-thomas-pfaff.pdf.

gaze direction estimation tool based on head motion ... - eurasip
The data acquisition system is a single digital camera. The main advantage of this solution is that iris position and head motion can be extracted from the same video data. Oth- er systems for gaze direction estimation usually use more sophisticated

Bake Sale Guidelines 2014.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Bake Sale ...

Installation of Cygwin and cron on Windows XP - tinypig
Now it is time to select the software packages that will be installed. The select ... The service can run either as yourself or under a privileged account. Running as ...

gaze direction estimation tool based on head motion ... - eurasip
98, pp. 236-274, 2005. [2] B. Noureddin, P. Lawrence, C. Man – A Non Contact System for Tracking Gaze in a Human Computer Interface – Com- puter Vison ...

MCGP: A Software Synthesis Tool Based on Model ... - Semantic Scholar
Department of Computer Science, Bar Ilan University. Ramat Gan 52900 .... by following the best generated programs, and by navigating through the chain.

MCGP: A Software Synthesis Tool Based on Model ...
candidate program from a correct solution. The tool allows the user to control various parameters, such as the syntactic building blocks, the structure of the programs, and the fitness function, and to follow their effect on the convergence of the sy

SAP Basis Installation on UNIX - Oracle Database.pdf
Page 3 of 236. SAP Basis Installation on UNIX - Oracle Database.pdf. SAP Basis Installation on UNIX - Oracle Database.pdf. Open. Extract. Open with. Sign In.

MCGP: A Software Synthesis Tool Based on Model ... - Semantic Scholar
whether) a candidate solution program satisfies a property. The main ... software, a natural challenge is to generate automatically correct-by-design pro- grams.

Installation Guide - Installing Fedora 13 on x86, AMD64 ...
9. Boot Options. 109. 9.1. Configuring the Installation System at the Boot Menu . ...... This manual helps you install Fedora on desktops, laptops, and servers.

Installation Guide - Installing Fedora 13 on x86, AMD64 ...
Basic System Recovery. 201 .... C.3.3. Creating and Saving Backup Passphrases . ...... If you plan to install from a network location, or install on an iSCSI target:.

CC Bake Sale Poster.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps. ... CC Bake Sale Poster.pdf. CC Bake Sale Poster.pdf. Open. Extract.