philoL / NFD-out-of-the-box

Other
3 stars 1 forks source link

Can't build NFD-out-of-the-box #2

Open tanim-ics opened 2 years ago

tanim-ics commented 2 years ago

I am trying to build this NFD as it has a self-learning strategy V2, which adds unicast faces automatically. But I can not build as it throws the following error:

$ ./waf configure

Setting top to                           : /home/picocluster/Desktop/tm/NFD-out-of-the-box
Setting out to                           : /home/picocluster/Desktop/tm/NFD-out-of-the-box/build
Checking for 'g++' (C++ compiler)        : /usr/bin/g++
Checking C++ compiler version            : 8.3.0
Checking supported CXXFLAGS              : -std=c++14
Checking supported LINKFLAGS             : -fuse-ld=gold
Checking for program 'doxygen'           : not found
Checking for program 'tar'               : /bin/tar
Checking for program 'sphinx-build'      : not found
Checking for program 'bash'              : /bin/bash
Checking for program 'pkg-config'        : /usr/bin/pkg-config
Checking for 'libndn-cxx'                : yes
Checking for 'libsystemd'                : not found
Checking for librt library               : yes
Checking for libresolv library           : yes
Checking if privilege drop/elevation is supported : yes
Checking for header valgrind/valgrind.h           : not found
Checking for program 'dpkg-architecture'          : /usr/bin/dpkg-architecture
Checking boost includes                           : 1.68.0
Checking boost libs                               : boost_system boost_program_options boost_filesystem
Checking for boost linkage                        : ok
Checking if Unix sockets are supported            : yes
Checking for libpcap library                      : yes
Checking for WebSocket++ includes                 : 0.8.1
Checking supported CXXFLAGS                       : -O2 -g -pedantic -Wall -Wextra -Wcatch-value=2 -Wextra-semi -Wnon-virtual-dtor -Wno-unused-parameter -fdiagnostics-color -Wno-psabi
Checking supported LINKFLAGS                      : -Wl,-O1
'configure' finished successfully (13.830s)
$ ./waf

Waf: Entering directory `/home/picocluster/Desktop/tm/NFD-out-of-the-box/build'
[  6/157] Compiling daemon/face/ethernet-factory.cpp
[  7/157] Compiling daemon/face/unix-stream-factory.cpp
[  8/157] Compiling daemon/face/unix-stream-transport.cpp
[  9/157] Compiling daemon/common/privilege-helper.cpp
[ 10/157] Compiling daemon/face/socket-utils.cpp
[ 11/157] Compiling daemon/table/cs-policy-lru.cpp
[ 12/157] Compiling daemon/table/strategy-choice-entry.cpp
[ 13/157] Compiling daemon/table/pit-in-record.cpp
[ 14/157] Compiling daemon/table/fib.cpp
In file included from ../daemon/table/pit-in-record.hpp:29,
                 from ../daemon/table/pit-entry.hpp:29,
                 from ../daemon/table/name-tree-entry.hpp:30,
                 from ../daemon/table/name-tree-hashtable.hpp:29,
                 from ../daemon/table/name-tree-iterator.hpp:29,
                 from ../daemon/table/name-tree.hpp:29,
                 from ../daemon/table/fib.hpp:30,
                 from ../daemon/fw/forwarder.hpp:33,
                 from ../daemon/fw/strategy.hpp:29,
                 from ../daemon/table/strategy-choice-entry.cpp:27:
../daemon/table/pit-face-record.hpp:54:13: error: ‘Nonce’ in ‘class ndn::Interest’ does not name a type
   Interest::Nonce
             ^~~~~
../daemon/table/pit-face-record.hpp:82:13: error: ‘Nonce’ in ‘class ndn::Interest’ does not name a type
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
             ^~~~~
../daemon/table/pit-face-record.hpp:82:42: warning: extra ‘;’ [-Wpedantic]
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
                                          ^
                                          -
In file included from ../daemon/fw/forwarder.hpp:38,
                 from ../daemon/fw/strategy.hpp:29,
                 from ../daemon/table/strategy-choice-entry.cpp:27:
../daemon/table/dead-nonce-list.hpp:73:35: error: ‘ndn::Interest::Nonce’ has not been declared
   has(const Name& name, Interest::Nonce nonce) const;
                                   ^~~~~
../daemon/table/dead-nonce-list.hpp:78:35: error: ‘ndn::Interest::Nonce’ has not been declared
   add(const Name& name, Interest::Nonce nonce);
                                   ^~~~~
../daemon/table/dead-nonce-list.hpp:98:41: error: ‘ndn::Interest::Nonce’ has not been declared
   makeEntry(const Name& name, Interest::Nonce nonce);
                                         ^~~~~

In file included from ../daemon/table/pit-in-record.hpp:29,
                 from ../daemon/table/pit-in-record.cpp:26:
../daemon/table/pit-face-record.hpp:54:13: error: ‘Nonce’ in ‘class ndn::Interest’ does not name a type
   Interest::Nonce
             ^~~~~
../daemon/table/pit-face-record.hpp:82:13: error: ‘Nonce’ in ‘class ndn::Interest’ does not name a type
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
             ^~~~~
../daemon/table/pit-face-record.hpp:82:42: warning: extra ‘;’ [-Wpedantic]
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
                                          ^
                                          -

In file included from ../daemon/table/pit-in-record.hpp:29,
                 from ../daemon/table/pit-entry.hpp:29,
                 from ../daemon/table/name-tree-entry.hpp:30,
                 from ../daemon/table/name-tree-hashtable.hpp:29,
                 from ../daemon/table/name-tree-iterator.hpp:29,
                 from ../daemon/table/name-tree.hpp:29,
                 from ../daemon/table/fib.hpp:30,
                 from ../daemon/table/fib.cpp:26:
../daemon/table/pit-face-record.hpp:54:13: error: ‘Nonce’ in ‘class ndn::Interest’ does not name a type
   Interest::Nonce
             ^~~~~
../daemon/table/pit-face-record.hpp:82:13: error: ‘Nonce’ in ‘class ndn::Interest’ does not name a type
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
             ^~~~~
../daemon/table/pit-face-record.hpp:82:42: warning: extra ‘;’ [-Wpedantic]
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
                                          ^
                                          -

Waf: Leaving directory `/home/picocluster/Desktop/tm/NFD-out-of-the-box/build'
Build failed
 -> task in 'daemon-objects' failed with exit status 1 (run with -v to display more information)
 -> task in 'daemon-objects' failed with exit status 1 (run with -v to display more information)
 -> task in 'daemon-objects' failed with exit status 1 (run with -v to display more information)

I have tried ndn-cxx-0.7.1, 0.7.0, 0.6.0. It did not work. What ndn-cxx library should I use to build the NFD?

philoL commented 2 years ago

It should be safe to use a version of ndn-cxx just before sl-2 patches are committed. You may try this commit https://github.com/named-data/ndn-cxx/commit/670a52f2a30461c824926cc1108ba209fc4227eb.

JKRhb commented 1 year ago

Hi @philoL, I tried to update the current state of the sl-2 branch to be compatible with the upstream repository again (currently still a bit WIP, but I hope to be finished soon). Would you accept a PR with the changes? Or do you currently have a different roadmap in mind?

JKRhb commented 1 year ago

You now can find an initial updated/fixed version on this branch.