Task #4030
closedNFD build failed
0%
Description
Hi there,
I installed ndn-cxx and added PKG_CONFIG_PATH with the path containing libndn-cxx.so.
But I still met with problems when building NFD.
- I can only let it detect libndn-cxx with sudo ./waf configure, without sudo, it can't be detected.
- after sudo./waf configure, I got following failures with sudo ./waf
Appreciate any help.
Thanks.
Pengyuan
Build failed
-> task in '../bin/ndn-autoconfig' failed (exit status 1):
{task 140737297513808: cxx base.cpp -> base.cpp.7.o}
['/usr/bin/g++', '-pedantic', '-Wall', '-O2', '-g', '-std=c++11', '-pthread', '-pthread', '-include', '/home/pengzhou/git/zpymyyn/NFD/build/core-objects.2', '-I/home/pengzhou/git/zpymyyn/NFD/build/tools/ndn-autoconfig', '-I/home/pengzhou/git/zpymyyn/NFD/tools/ndn-autoconfig', '-I/home/pengzhou/git/zpymyyn/NFD/build', '-I/home/pengzhou/git/zpymyyn/NFD', '-I/home/pengzhou/git/zpymyyn/NFD/build/core', '-I/home/pengzhou/git/zpymyyn/NFD/core', '-I/usr/include', '-I/usr/local/include', '-DNDEBUG', '-DHAVE_NDN_CXX=1', '../tools/ndn-autoconfig/base.cpp', '-c', '-o', '/home/pengzhou/git/zpymyyn/NFD/build/tools/ndn-autoconfig/base.cpp.7.o']
-> task in '../bin/ndn-autoconfig' failed (exit status 1):
{task 140737297514000: cxx multicast-discovery.cpp -> multicast-discovery.cpp.7.o}
['/usr/bin/g++', '-pedantic', '-Wall', '-O2', '-g', '-std=c++11', '-pthread', '-pthread', '-include', '/home/pengzhou/git/zpymyyn/NFD/build/core-objects.2', '-I/home/pengzhou/git/zpymyyn/NFD/build/tools/ndn-autoconfig', '-I/home/pengzhou/git/zpymyyn/NFD/tools/ndn-autoconfig', '-I/home/pengzhou/git/zpymyyn/NFD/build', '-I/home/pengzhou/git/zpymyyn/NFD', '-I/home/pengzhou/git/zpymyyn/NFD/build/core', '-I/home/pengzhou/git/zpymyyn/NFD/core', '-I/usr/include', '-I/usr/local/include', '-DNDEBUG', '-DHAVE_NDN_CXX=1', '../tools/ndn-autoconfig/multicast-discovery.cpp', '-c', '-o', '/home/pengzhou/git/zpymyyn/NFD/build/tools/ndn-autoconfig/multicast-discovery.cpp.7.o']
Updated by Alex Afanasyev over 7 years ago
Can you provide more information on what exactly failed or this is all the output you're seeing? sudo
should be used only for installation stage (e.g., for sudo ./waf install
), all other stages should be run without.
We have seen something remotely related to this and it was because of different versions of python picked up by the system without and with python (e.g., you may be using pyenv
which is not used after sudo). You can try to run /usr/bin/python waf
and sudo /usr/bin/python waf
to check whether it fixes the issue.
Updated by Pengyuan Zhou over 7 years ago
Alex Afanasyev wrote:
Can you provide more information on what exactly failed or this is all the output you're seeing?
sudo
should be used only for installation stage (e.g., forsudo ./waf install
), all other stages should be run without.We have seen something remotely related to this and it was because of different versions of python picked up by the system without and with python (e.g., you may be using
pyenv
which is not used after sudo). You can try to run/usr/bin/python waf
andsudo /usr/bin/python waf
to check whether it fixes the issue.
Hi Alex,
Thanks for replying.
Now there are two cases, of which the first is:
If run waf configure without sudo, then it can't detect libndn-cxx, but I already include the path to libndn-cxx.pc in PKG_CONFIG_PATH, as following shows:
$ echo $PKG_CONFIG_PATH
/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:
$ sudo ls /usr/local/lib/pkgconfig/
libcdt.pc libcgraph.pc libgvc.pc libgvpr.pc liblab_gamut.pc libndn-cxx.pc libpathplan.pc libxdot.pc
so second case is run waf configure with sudo ( or with sudo /usr/bin/python):
then configure can be successfully done, but failure comes still in running waf ( with sudo /usr/bin/python):
[157/158] Linking build/bin/nfd-autoreg
tools/nfd-autoreg.cpp.2.o: In function `AutoregServer':
/home/pengzhou/git/NFD/build/../tools/nfd-autoreg.cpp:61: undefined reference to `ndn::nfd::FaceMonitor::FaceMonitor(ndn::Face&)'
collect2: error: ld returned 1 exit status
tools/nfdc/find-face.cpp.5.o: In function `nfd::tools::nfdc::FindFace::query()':
/home/pengzhou/git/NFD/build/../tools/nfdc/find-face.cpp:140: undefined reference to `ndn::nfd::FaceQueryFilter::empty() const'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/home/pengzhou/git/NFD/build'
Build failed
-> task in '../bin/nfd-autoreg' failed (exit status 1):
{task 140737297377040: cxxprogram nfd-autoreg.cpp.2.o,city-hash.cpp.2.o,config-file.cpp.2.o,global-io.cpp.2.o,manager-base.cpp.2.o,network-interface-predicate.cpp.2.o,network-interface.cpp.2.o,network.cpp.2.o,privilege-helper.cpp.2.o,random.cpp.2.o,rtt-estimator.cpp.2.o,scheduler.cpp.2.o,logger-factory.cpp.2.o,logger.cpp.2.o -> nfd-autoreg}
['/usr/bin/g++', '-pthread', '-pthread', '-pthread', 'tools/nfd-autoreg.cpp.2.o', 'core/city-hash.cpp.2.o', 'core/config-file.cpp.2.o', 'core/global-io.cpp.2.o', 'core/manager-base.cpp.2.o', 'core/network-interface-predicate.cpp.2.o', 'core/network-interface.cpp.2.o', 'core/network.cpp.2.o', 'core/privilege-helper.cpp.2.o', 'core/random.cpp.2.o', 'core/rtt-estimator.cpp.2.o', 'core/scheduler.cpp.2.o', 'core/logger-factory.cpp.2.o', 'core/logger.cpp.2.o', '-o', '/home/pengzhou/git/NFD/build/bin/nfd-autoreg', '-Wl,-Bstatic', '-L/usr/lib/x86_64-linux-gnu', '-Wl,-Bdynamic', '-L/usr/local/lib', '-L/usr/lib/x86_64-linux-gnu', '-lndn-cxx', '-lboost_system', '-lboost_filesystem', '-lboost_date_time', '-lboost_iostreams', '-lboost_regex', '-lboost_program_options', '-lboost_chrono', '-lboost_thread', '-lboost_log', '-lboost_log_setup', '-lboost_unit_test_framework', '-lcryptopp', '-lssl', '-lcrypto', '-lsqlite3', '-lrt', '-lpthread', '-lboost_system', '-lboost_chrono', '-lboost_program_options', '-lboost_thread', '-lboost_log', '-lboost_log_setup', '-lrt', '-lresolv']
-> task in '../bin/nfdc' failed (exit status 1):
{task 140737297434576: cxxprogram main.cpp.6.o,available-commands.cpp.5.o,channel-module.cpp.5.o,command-definition.cpp.5.o,command-parser.cpp.5.o,execute-command.cpp.5.o,face-id-fetcher.cpp.5.o,face-module.cpp.5.o,fib-module.cpp.5.o,find-face.cpp.5.o,format-helpers.cpp.5.o,forwarder-general-module.cpp.5.o,help.cpp.5.o,legacy-nfdc.cpp.5.o,legacy-status.cpp.5.o,rib-module.cpp.5.o,status-report.cpp.5.o,status.cpp.5.o,strategy-choice-module.cpp.5.o,city-hash.cpp.2.o,config-file.cpp.2.o,global-io.cpp.2.o,manager-base.cpp.2.o,network-interface-predicate.cpp.2.o,network-interface.cpp.2.o,network.cpp.2.o,privilege-helper.cpp.2.o,random.cpp.2.o,rtt-estimator.cpp.2.o,scheduler.cpp.2.o,logger-factory.cpp.2.o,logger.cpp.2.o -> nfdc}
['/usr/bin/g++', '-pthread', '-pthread', '-pthread', 'tools/nfdc/main.cpp.6.o', 'tools/nfdc/available-commands.cpp.5.o', 'tools/nfdc/channel-module.cpp.5.o', 'tools/nfdc/command-definition.cpp.5.o', 'tools/nfdc/command-parser.cpp.5.o', 'tools/nfdc/execute-command.cpp.5.o', 'tools/nfdc/face-id-fetcher.cpp.5.o', 'tools/nfdc/face-module.cpp.5.o', 'tools/nfdc/fib-module.cpp.5.o', 'tools/nfdc/find-face.cpp.5.o', 'tools/nfdc/format-helpers.cpp.5.o', 'tools/nfdc/forwarder-general-module.cpp.5.o', 'tools/nfdc/help.cpp.5.o', 'tools/nfdc/legacy-nfdc.cpp.5.o', 'tools/nfdc/legacy-status.cpp.5.o', 'tools/nfdc/rib-module.cpp.5.o', 'tools/nfdc/status-report.cpp.5.o', 'tools/nfdc/status.cpp.5.o', 'tools/nfdc/strategy-choice-module.cpp.5.o', 'core/city-hash.cpp.2.o', 'core/config-file.cpp.2.o', 'core/global-io.cpp.2.o', 'core/manager-base.cpp.2.o', 'core/network-interface-predicate.cpp.2.o', 'core/network-interface.cpp.2.o', 'core/network.cpp.2.o', 'core/privilege-helper.cpp.2.o', 'core/random.cpp.2.o', 'core/rtt-estimator.cpp.2.o', 'core/scheduler.cpp.2.o', 'core/logger-factory.cpp.2.o', 'core/logger.cpp.2.o', '-o', '/home/pengzhou/git/NFD/build/bin/nfdc', '-Wl,-Bstatic', '-L/usr/lib/x86_64-linux-gnu', '-Wl,-Bdynamic', '-L/usr/local/lib', '-L/usr/lib/x86_64-linux-gnu', '-lndn-cxx', '-lboost_system', '-lboost_filesystem', '-lboost_date_time', '-lboost_iostreams', '-lboost_regex', '-lboost_program_options', '-lboost_chrono', '-lboost_thread', '-lboost_log', '-lboost_log_setup', '-lboost_unit_test_framework', '-lcryptopp', '-lssl', '-lcrypto', '-lsqlite3', '-lrt', '-lpthread', '-lboost_system', '-lboost_chrono', '-lboost_program_options', '-lboost_thread', '-lboost_log', '-lboost_log_setup', '-lrt', '-lresolv']
Appreciate your help!
Updated by Ashlesh Gawande over 7 years ago
Someone in our lab was having the same problem. Older version of ndn-cxx is being detected which does not have ndn::nfd::FaceMonitor::FaceMonitor(ndn::Face&). In our case it was because NFD was installed from PPA earlier. So removed the PPA, deleted the ndn-cxx library installed by the PPA and installed the latest ndn-cxx from source.
(You can check the output of ldconfig -p | grep ndn to see where the ndn-cxx lib is installed from PPA and whether it has multiple versions installed).
Updated by Pengyuan Zhou over 7 years ago
Ashlesh Gawande wrote:
Someone in our lab was having the same problem. Older version of ndn-cxx is being detected which does not have ndn::nfd::FaceMonitor::FaceMonitor(ndn::Face&). In our case it was because NFD was installed from PPA earlier. So removed the PPA, deleted the ndn-cxx library installed by the PPA and installed the latest ndn-cxx from source.
(You can check the output of ldconfig -p | grep ndn to see where the ndn-cxx lib is installed from PPA and whether it has multiple versions installed).
Hi, thanks for the solution.
I did install from PPA previously, and after removing them, still met with similar failure.
But just tried to clone the original repos and then it built successfully......(previously I cloned the folk repo)
No idea why, but anyway, now it built.
Updated by Junxiao Shi over 7 years ago
- Status changed from New to Rejected
I'm glad your issue is solved.
In the future, this kind of support requests should be posted to nfd-dev mailing list. Also, see http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2016-May/001748.html on how to effectively help developers reproduce your problem.
Updated by Pengyuan Zhou over 7 years ago
Junxiao Shi wrote:
I'm glad your issue is solved.
In the future, this kind of support requests should be posted to nfd-dev mailing list. Also, see http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2016-May/001748.html on how to effectively help developers reproduce your problem.
Hi, thanks, I'll follow the instructions in the future.