NTP installation on DCE

44 views
Skip to first unread message

Meenakshi Syamkumar

unread,
Sep 22, 2017, 10:53:22 AM9/22/17
to ns-3-users
I have been trying to get NTP installation working with DCE and had no luck so far. Here is what I have done so far:

NTP installation:

  1. export CFLAGS="$CFLAGS -fPIC"

  2. export CXXFLAGS="$CXXFLAGS -fPIC"

  3. CXXFLAGS="$CXXFLAGS -fPIC" CFLAGS=-pie CFLAGS=-rdynamic ./configure --enable-linuxcaps
  4. LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/usr/include/x86_64-linux-gnu/sys" CFLAGS+=-fPIC CFLAGS+=" -U_FORTIFY_SOURCE" CFLAGS+="  -D_FORTIFY_SOURCE=0" CFLAGS+=" -g" LDFLAGS=-pie LDFLAGS+=" -rdynamic" LDLIBS="-llapack -llapcke" make
  5. make install
DCE CODE:

I just modified the given example "dce_iperf.cc" to make the following changes on Node 0. The rest of the file looks as such excepting for these new additions:

  dce.SetBinary("ntpd");

  dce.ResetArguments ();

  dce.ResetEnvironment ();

  dce.AddArgument ("-c");

  dce.AddArgument ("/etc/ntp.conf");

  dce.AddArgument ("-p");

  dce.AddArgument ("/var/run/ntpd.pid");

  dce.AddArgument ("-g");

  dce.AddArgument ("-u");

  dce.AddArgument ("104:110");

  

  apps = dce.Install (nodes.Get (0));

  apps.Start (Seconds (0.7));


ERROR in waf:

I made the following additions to "model/libc-ns3.h" to get rid of my previous errors:

NATIVE (log10)

NATIVE (frexp)

NATIVE (setsid)


But I am stuck at the following error and I am not able to find a resolution even if I set the "LD_LIBRARY_PATH" correctly. 

root@my-node:/users/msyam/ns3_workspace/bake/source/ns-3-dce# ./waf 

Waf: Entering directory `/users/msyam/ns3_workspace/bake/source/ns-3-dce/build'


--------------------------------------------------------------------

 Python bindings compilation 

--------------------------------------------------------------------

[ 10/330] lib/pkgconfig/libns3-dev-netlink-debug.pc:  -> build/lib/pkgconfig/libns3-dev-netlink-debug.pc

[111/330] lib/pkgconfig/libns3-dev-dce-debug.pc:  -> build/lib/pkgconfig/libns3-dev-dce-debug.pc

Waf: Leaving directory `/users/msyam/ns3_workspace/bake/source/ns-3-dce/build'

'build' finished successfully (0.268s)

root@my-node:/users/msyam/ns3_workspace/bake/source/ns-3-dce# ./waf --run dce-ntp

Waf: Entering directory `/users/msyam/ns3_workspace/bake/source/ns-3-dce/build'


--------------------------------------------------------------------

 Python bindings compilation 

--------------------------------------------------------------------

[ 10/330] lib/pkgconfig/libns3-dev-netlink-debug.pc:  -> build/lib/pkgconfig/libns3-dev-netlink-debug.pc

[111/330] lib/pkgconfig/libns3-dev-dce-debug.pc:  -> build/lib/pkgconfig/libns3-dev-dce-debug.pc

Waf: Leaving directory `/users/msyam/ns3_workspace/bake/source/ns-3-dce/build'

'build' finished successfully (0.252s)

assert failed. cond="handle != 0", msg="Could not open elf-cache/0/ntpd elf-cache/0/ntpd: symbol shmdt, version GLIBC_2.2.5 not defined in file 0001.so.6 with link time reference", file=../model/cooja-loader-factory.cc, line=236

terminate called without an active exception

Command ['/users/msyam/ns3_workspace/bake/source/ns-3-dce/build/bin/dce-ntp'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").


Can you please provide some pointers to get NTP working correctly?
Reply all
Reply to author
Forward
0 new messages