[ndnSIM] Error Compiling ndn-cxx

Junxiao Shi shijunxiao at email.arizona.edu
Thu Aug 29 06:40:55 PDT 2019


Hi Stephen

It seems that you didn't clone ndnSIM repository recursively, and the build
system is picking up the ndn-cxx installed in /usr or /usr/local.
I can tell that from line numbers of Face constructors.

ndnSIM is not compatible with normal ndn-cxx, but requires a specific fork.
For ndnSIM 2.7, that would be
https://github.com/named-data-ndnSIM/ndn-cxx/tree/ndn-cxx-0.6.5-ndnSIM

To fix this problem, clone ndnSIM repository recursively:

   - If you decide to re-clone, use 'git clone --recursive'.
   - If you want to use the existing checkout, run 'git submodule update
   --init' within ndnSIM repository.


If you are still getting same error, consider running ndnSIM in a separate
container where you do not have ndn-cxx installed systemwide.
This eliminates the chance of picking up wrong versions.

Yours, Junxiao

On Thu, Aug 29, 2019 at 9:06 AM Stephen Dudley via ndnSIM <
ndnsim at lists.cs.ucla.edu> wrote:

> I am attempting to compile ndn-cxx from the 2.7 version. The compile
> fails, and don’t understand the source of the problem.  It contains errors
> like the following.
>
>
>
> no matching function for call to
> ‘ndn::Face::Face(std::shared_ptr<ndn::util::DummyClientFace::Transport>&)’
>
> no known conversion for argument 1 from
> ‘std::shared_ptr<ndn::util::DummyClientFace::Transport>’ to
> ‘boost::asio::io_service&’
>
> candidate expects 1 argument, 2 provided
>
> candidate expects 0 arguments, 2 provided
>
>
>
> Normally, I would think that this was a programming error, but since I
> assume that the download is from a build that actually works, that seems
> strange.  What else could be happening?  (I did have to download manually
> since connection to a repository without a recognized certificate is
> blocked by my company.  So, suggestions that I download again but this time
> use the git clone process instead won’t really help me.)
>
>
>
> The log messages are given below, if that provides any insights.
>
>
>
> ndn-cxx> ./waf
>
> Waf: Entering directory `/var/tmp/second/ndnSIM/ndn-cxx/build'
>
> fatal: not a git repository (or any of the parent directories): .git
>
> [ 34/139] Compiling src/util/regex/regex-top-matcher.cpp
>
> [ 36/139] Compiling src/util/network-monitor.cpp
>
> [ 37/139] Compiling src/util/indented-stream.cpp
>
> [ 38/139] Compiling src/util/dummy-client-face.cpp
>
> [ 39/139] Compiling src/util/config-file.cpp
>
> ../src/util/dummy-client-face.cpp: In constructor
> ‘ndn::util::DummyClientFace::DummyClientFace(const
> ndn::util::DummyClientFace::Options&,
> std::shared_ptr<ndn::util::DummyClientFace::Transport>)’:
>
> ../src/util/dummy-client-face.cpp:85:26: error: no matching function for
> call to
> ‘ndn::Face::Face(std::shared_ptr<ndn::util::DummyClientFace::Transport>&)’
>
>    , m_transport(transport)
>
>                           ^
>
> In file included from ../src/util/dummy-client-face.hpp:25:0,
>
>                  from ../src/util/dummy-client-face.cpp:22:
>
> ../src/util/../face.hpp:149:3: note: candidate:
> ndn::Face::Face(boost::asio::io_service&)
>
>    Face(boost::asio::io_service& ioService);
>
>    ^~~~
>
> ../src/util/../face.hpp:149:3: note:   no known conversion for argument 1
> from ‘std::shared_ptr<ndn::util::DummyClientFace::Transport>’ to
> ‘boost::asio::io_service&’
>
> ../src/util/../face.hpp:120:3: note: candidate: ndn::Face::Face()
>
>    Face();
>
>    ^~~~
>
> ../src/util/../face.hpp:120:3: note:   candidate expects 0 arguments, 1
> provided
>
> ../src/util/dummy-client-face.cpp: In constructor
> ‘ndn::util::DummyClientFace::DummyClientFace(const
> ndn::util::DummyClientFace::Options&,
> std::shared_ptr<ndn::util::DummyClientFace::Transport>,
> boost::asio::io_service&)’:
>
> ../src/util/dummy-client-face.cpp:93:26: error: no matching function for
> call to
> ‘ndn::Face::Face(std::shared_ptr<ndn::util::DummyClientFace::Transport>&,
> boost::asio::io_service&)’
>
>    , m_transport(transport)
>
>                           ^
>
> In file included from ../src/util/dummy-client-face.hpp:25:0,
>
>                  from ../src/util/dummy-client-face.cpp:22:
>
> ../src/util/../face.hpp:149:3: note: candidate:
> ndn::Face::Face(boost::asio::io_service&)
>
>    Face(boost::asio::io_service& ioService);
>
>    ^~~~
>
> ../src/util/../face.hpp:149:3: note:   candidate expects 1 argument, 2
> provided
>
> ../src/util/../face.hpp:120:3: note: candidate: ndn::Face::Face()
>
>    Face();
>
>    ^~~~
>
> ../src/util/../face.hpp:120:3: note:   candidate expects 0 arguments, 2
> provided
>
>
>
> Waf: Leaving directory `/var/tmp/second/ndnSIM/ndn-cxx/build'
>
> Build failed
>
> -> task in 'ndn-cxx' failed (exit status 1):
>
>         {task 140358633750352: cxx dummy-client-face.cpp ->
> dummy-client-face.cpp.2.o}
>
> ['/usr/bin/g++', '-pedantic', '-Wall', '-O2', '-g', '-std=c++11', '-fPIC',
> '-include', '/var/tmp/second/ndnSIM/ndn-cxx/build/ndn-cxx.2',
> '-I/var/tmp/second/ndnSIM/ndn-cxx/build',
> '-I/var/tmp/second/ndnSIM/ndn-cxx',
> '-I/var/tmp/second/ndnSIM/ndn-cxx/build/src',
> '-I/var/tmp/second/ndnSIM/ndn-cxx/src', '-I/usr/include',
> '-I/usr/local/include', '-DNDEBUG', '../src/util/dummy-client-face.cpp',
> '-c', '-o',
> '/var/tmp/second/ndnSIM/ndn-cxx/build/src/util/dummy-client-face.cpp.2.o']
>
>
>
> Stephen Dudley
>
> 801-594-2627
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190829/ba9b6525/attachment-0001.html>


More information about the ndnSIM mailing list