[ndnSIM] Compiling ndnSIM 2.1

Alex Afanasyev alexander.afanasyev at ucla.edu
Sun Jun 26 20:15:50 PDT 2016


> On Jun 26, 2016, at 2:43 PM, Ravi Ravindran <ravi.ravindran at gmail.com> wrote:
> 
> HI Alex,
> 
> 
> I'm facing two other issues with ndnSIM2.1
> 
> 1. Cannot run it with the visualizer, i compiled it with the python binding.
> 
> Ravis-MBP:ns-3 ravi$ ./waf --run ndn-grid --vis
> Waf: Entering directory `/Users/ravi/Documents/code/ndnSIM2.1/ns-3/build'
> Waf: Leaving directory `/Users/ravi/Documents/code/ndnSIM2.1/ns-3/build'
> Build commands will be stored in build/compile_commands.json
> 'build' finished successfully (2.112s)
> 
> ** (process:83730): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'
> 
> ** (process:83730): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'
> 
> ** (process:83730): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
>   warnings.warn(str(e), _gtk.Warning)
> Could not load plugin 'show_last_packets.py': No module named kiwi.ui.objectlist
> /Users/ravi/Documents/code/ndnSIM2.1/ns-3/src/visualizer/visualizer/core.py:641: Warning: invalid (NULL) pointer instance
>   self.window = gtk.Window()
> /Users/ravi/Documents/code/ndnSIM2.1/ns-3/src/visualizer/visualizer/core.py:641: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
>   self.window = gtk.Window()
> /Users/ravi/Documents/code/ndnSIM2.1/ns-3/src/visualizer/visualizer/core.py:653: GtkWarning: gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
>   sw = gtk.ScrolledWindow(); sw.show()

I'm guessing that you don't have XQuartz installed (https://www.xquartz.org/ <https://www.xquartz.org/>).  I've tested on my machine, visualizer works with macports (not possible at all with Homebrew).


> 2. Running scenarios in the scenario folder, doesn't work, so for this i copied the ndn-grid example to the ,configured it for the debug flag..
> 
> Ravis-MBP:scenario ravi$ ./waf
> Waf: Entering directory `/Users/ravi/Documents/code/ndnSIM2.1/scenario/build'
> [1/2] Compiling scenarios/ndn-grid.cpp
> In file included from ../scenarios/ndn-grid.cpp:26:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM-module.h:10:
> In file included from /usr/local/include/ns3-dev/ns3/ndn-all.hpp:23:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM/helper/ndn-stack-helper.hpp:30:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM/helper/ndn-face-container.hpp:30:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM/model/ndn-face.hpp:23:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM/NFD/daemon/face/face.hpp:29:
> In file included from /Users/ravi/Documents/code/ndnSIM2.1/ns-3/build/ns3/ndnSIM/NFD/common.hpp:66:
> In file included from /Users/ravi/Documents/code/ndnSIM2.1/ns-3/build/ns3/ndnSIM/ndn-cxx/util/signal.hpp:25:
> /Users/ravi/Documents/code/ndnSIM2.1/ns-3/build/ns3/ndnSIM/ndn-cxx/util/signal-signal.hpp:108:4: error: "cannot declare Owner as friend"
> #  error "cannot declare Owner as friend"
>    ^
> In file included from ../scenarios/ndn-grid.cpp:26:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM-module.h:10:
> In file included from /usr/local/include/ns3-dev/ns3/ndn-all.hpp:23:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM/helper/ndn-stack-helper.hpp:30:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM/helper/ndn-face-container.hpp:30:
> In file included from /usr/local/include/ns3-dev/ns3/ndnSIM/model/ndn-face.hpp:23:
> /usr/local/include/ns3-dev/ns3/ndnSIM/NFD/daemon/face/face.hpp:139:13: error: no type named 'FacePersistency' in namespace 'ndn::nfd'
>   ndn::nfd::FacePersistency
>   ~~~~~~~~~~^
> /usr/local/include/ns3-dev/ns3/ndnSIM/NFD/daemon/face/face.hpp:180:28: error: no type named 'FacePersistency' in namespace 'ndn::nfd'
>   setPersistency(ndn::nfd::FacePersistency persistency);
>                  ~~~~~~~~~~^
> /usr/local/include/ns3-dev/ns3/ndnSIM/NFD/daemon/face/face.hpp:211:13: error: no type named 'FacePersistency' in namespace 'ndn::nfd'
>   ndn::nfd::FacePersistency m_persistency;

Just did the same and had no problems.  I got a bunch of warnings from boost, but the compilation of ndn-grid.cpp (copied from src/ndnSIM/examples/ndn-grid.cpp to scenarios/ folder).

Not sure what could be wrong in your installation.  Did you run `sudo ./waf install` after compiling ndnSIM/NS-3?  I have only one guess that you may had previous installation of ndnSIM.

--
Alex

> 
> On Fri, Jun 24, 2016 at 2:31 PM, Ravi Ravindran <ravi.ravindran at gmail.com <mailto:ravi.ravindran at gmail.com>> wrote:
> Sure, thanks.
> 
> Regards,
> Ravi
> 
> On Fri, Jun 24, 2016 at 11:20 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu <mailto:alexander.afanasyev at ucla.edu>> wrote:
> It works, though i was able to install dependnecies only with macports.  There are a few missing packages for homebrew.
> 
> ---
> Alex
> 
>> On Jun 24, 2016, at 11:18 AM, Ravi Ravindran <ravi.ravindran at gmail.com <mailto:ravi.ravindran at gmail.com>> wrote:
>> 
>> Sure that worked..!. So the visualizer doesn't work on MAC, or has it to do something with homebrew based setups ?
>> 
>> Thanks
>> Ravi
>> 
>> On Fri, Jun 24, 2016 at 11:08 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu <mailto:alexander.afanasyev at ucla.edu>> wrote:
>> macport's version of cryptopp library was broken at some point.  Check if you have /opt/local/lib/libcryptopp.so or /opt/local/lib/libcryptopp.dylib file.  If so, remove it and try to recompile NS-3.
>> 
>> I am yet to try compilation myself with macports (not sure when).
>> 
>>> On Jun 24, 2016, at 11:05 AM, Ravi Ravindran <ravi.ravindran at gmail.com <mailto:ravi.ravindran at gmail.com>> wrote:
>>> 
>>> Macports..Alex.
>>> 
>>> Regards,
>>> Ravi
>>> 
>>> On Fri, Jun 24, 2016 at 10:42 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu <mailto:alexander.afanasyev at ucla.edu>> wrote:
>>> Yes, I'm using it on my mac.  Are you using macrports or homebrew (I've been using homebrew myself lately, though it doesn't support visualizer).
>>> 
>>> --
>>> Alex
>>> 
>>> > On Jun 24, 2016, at 10:39 AM, Ravi Ravindran <ravi.ravindran at gmail.com <mailto:ravi.ravindran at gmail.com>> wrote:
>>> >
>>> > hi Anil,
>>> >
>>> > Have you tried compiling ndnSIM2.1 on MAC, if so, i'm getting an error:
>>> >
>>> >
>>> > 2577/2642] Linking build/examples/wireless/ns3-dev-wifi-sleep-debug
>>> > [2578/2642] Linking build/libns3-dev-wave-debug.dylib
>>> > Undefined symbols for architecture x86_64:
>>> >   "vtable for CryptoPP::SHA256", referenced from:
>>> >       CryptoPP::SHA256::SHA256() in sec-tpm-file.cpp.3.o
>>> >       CryptoPP::SHA256::SHA256(CryptoPP::SHA256 const&) in sec-tpm-file.cpp.3.o
>>> >       CryptoPP::SHA256::SHA256() in validator.cpp.3.o
>>> >       CryptoPP::SHA256::SHA256(CryptoPP::SHA256 const&) in validator.cpp.3.o
>>> >       CryptoPP::SHA256::SHA256() in crypto.cpp.3.o
>>> >       CryptoPP::SHA256::SHA256(CryptoPP::SHA256 const&) in crypto.cpp.3.o
>>> >       CryptoPP::SHA256::SHA256() in digest.cpp.3.o
>>> >       ...
>>> >   NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
>>> > ld: symbol(s) not found for architecture x86_64
>>> > clang: error: linker command failed w
>>> >
>>> > Regards,
>>> > Ravi
>>> 
>>> 
>> 
>> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160626/dccbda54/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160626/dccbda54/attachment.bin>


More information about the ndnSIM mailing list