Actions
Bug #3609
closedBuild error when configured as --with-other-tests
Start date:
Due date:
% Done:
100%
Estimated time:
1.50 h
Description
Steps to reproduce:
./waf configure --with-other-tests
./waf
Expected: Build is successful. Unit tests are not built. tests/other
are built.
Actual:
In file included from ../tests/other/cs-benchmark.cpp:29:0:
/home/vagrant/NFD/tests/test-common.hpp: In destructor ‘nfd::tests::BaseFixture::~BaseFixture()’:
/home/vagrant/NFD/tests/test-common.hpp:55:26: error: ‘resetGlobalIoService’ was not declared in this scope
resetGlobalIoService();
^
Updated by Junxiao Shi over 8 years ago
I can see four possible solutions:
- Declare
WITH_TESTS
symbol when either--with-tests
or--with-other-tests
is set. - Forbid
tests/other
code from relying onWITH_TESTS
functions. --with-other-tests
implies--with-tests
.- Forbid
--with-other-tests
without--with-tests
: throw an error at configure time.
Updated by Davide Pesavento over 8 years ago
I thought the point of "other tests" was that they can be built against the "regular" NFD codebase, i.e. without defining WITH_TESTS
. So I guess option (2) is the only acceptable one.
Updated by Davide Pesavento about 8 years ago
- Start date deleted (
04/28/2016)
I'm seeing linking errors when NFD is configured with --with-other-tests
now:
[143/146] Linking build/cs-benchmark
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::makeInterestWorkload(unsigned long, std::function<ndn::Name (unsigned long)> const&)':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:93: undefined reference to `nfd::tests::makeInterest(ndn::Name const&, unsigned int)'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::makeDataWorkload(unsigned long, std::function<ndn::Name (unsigned long)> const&)':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:104: undefined reference to `nfd::tests::makeData(ndn::Name const&)'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::TableCsBenchmark::InsertFindHit::test_method()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:159: undefined reference to `boost::unit_test::unit_test_log_t::operator<<(boost::unit_test::log::begin const&)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:159: undefined reference to `boost::unit_test::unit_test_log_t::operator()(boost::unit_test::log_level)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:159: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::operator<<(boost::unit_test::lazy_ostream const&) const'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:159: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:159: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:38: undefined reference to `nfd::tests::BaseFixture::BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::~CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::makeInterestWorkload(unsigned long, std::function<ndn::Name (unsigned long)> const&)':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:93: undefined reference to `nfd::tests::makeInterest(ndn::Name const&, unsigned int)'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::makeDataWorkload(unsigned long, std::function<ndn::Name (unsigned long)> const&)':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:104: undefined reference to `nfd::tests::makeData(ndn::Name const&)'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::TableCsBenchmark::FindMissInsert::test_method()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:136: undefined reference to `boost::unit_test::unit_test_log_t::operator<<(boost::unit_test::log::begin const&)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:136: undefined reference to `boost::unit_test::unit_test_log_t::operator()(boost::unit_test::log_level)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:136: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::operator<<(boost::unit_test::lazy_ostream const&) const'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:136: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:136: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:38: undefined reference to `nfd::tests::BaseFixture::BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::~CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::makeInterestWorkload(unsigned long, std::function<ndn::Name (unsigned long)> const&)':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:93: undefined reference to `nfd::tests::makeInterest(ndn::Name const&, unsigned int)'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::TableCsBenchmark::Leftmost::test_method()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:173: undefined reference to `nfd::tests::makeData(ndn::Name const&)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:177: undefined reference to `boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring<char const>, unsigned long, boost::unit_test::basic_cstring<char const>)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:177: undefined reference to `boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_result const&, boost::unit_test::lazy_ostream const&, boost::unit_test::basic_cstring<char const>, unsigned long, boost::test_tools::tt_detail::tool_level, boost::test_tools::tt_detail::check_type, unsigned long, ...)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:188: undefined reference to `boost::unit_test::unit_test_log_t::operator<<(boost::unit_test::log::begin const&)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:188: undefined reference to `boost::unit_test::unit_test_log_t::operator()(boost::unit_test::log_level)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:188: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::operator<<(boost::unit_test::lazy_ostream const&) const'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:188: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:188: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:38: undefined reference to `nfd::tests::BaseFixture::BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::~CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::makeInterestWorkload(unsigned long, std::function<ndn::Name (unsigned long)> const&)':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:93: undefined reference to `nfd::tests::makeInterest(ndn::Name const&, unsigned int)'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::TableCsBenchmark::Rightmost::test_method()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:202: undefined reference to `nfd::tests::makeData(ndn::Name const&)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:206: undefined reference to `boost::unit_test::unit_test_log_t::set_checkpoint(boost::unit_test::basic_cstring<char const>, unsigned long, boost::unit_test::basic_cstring<char const>)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:206: undefined reference to `boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_result const&, boost::unit_test::lazy_ostream const&, boost::unit_test::basic_cstring<char const>, unsigned long, boost::test_tools::tt_detail::tool_level, boost::test_tools::tt_detail::check_type, unsigned long, ...)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:217: undefined reference to `boost::unit_test::unit_test_log_t::operator<<(boost::unit_test::log::begin const&)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:217: undefined reference to `boost::unit_test::unit_test_log_t::operator()(boost::unit_test::log_level)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:217: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::operator<<(boost::unit_test::lazy_ostream const&) const'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:217: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:217: undefined reference to `boost::unit_test::ut_detail::entry_value_collector::~entry_value_collector()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:38: undefined reference to `nfd::tests::BaseFixture::BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `nfd::tests::CsBenchmarkFixture::~CsBenchmarkFixture()':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:34: undefined reference to `nfd::tests::BaseFixture::~BaseFixture()'
tests/other/cs-benchmark.cpp.4.o: In function `boost::unit_test::make_test_case(boost::unit_test::callback0<boost::unit_test::ut_detail::unused> const&, boost::unit_test::basic_cstring<char const>)':
/usr/include/boost/test/unit_test_suite_impl.hpp:255: undefined reference to `boost::unit_test::ut_detail::normalize_test_case_name[abi:cxx11](boost::unit_test::basic_cstring<char const>)'
/usr/include/boost/test/unit_test_suite_impl.hpp:255: undefined reference to `boost::unit_test::test_case::test_case(boost::unit_test::basic_cstring<char const>, boost::unit_test::callback0<boost::unit_test::ut_detail::unused> const&)'
tests/other/cs-benchmark.cpp.4.o: In function `__static_initialization_and_destruction_0':
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:114: undefined reference to `boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(boost::unit_test::basic_cstring<char const>)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:117: undefined reference to `boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(boost::unit_test::test_case*, unsigned long)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:140: undefined reference to `boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(boost::unit_test::test_case*, unsigned long)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:163: undefined reference to `boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(boost::unit_test::test_case*, unsigned long)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:192: undefined reference to `boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(boost::unit_test::test_case*, unsigned long)'
/home/davide/NFD/build/../tests/other/cs-benchmark.cpp:220: undefined reference to `boost::unit_test::ut_detail::auto_test_unit_registrar::auto_test_unit_registrar(int)'
tests/other/cs-benchmark.cpp.4.o: In function `boost::unit_test::unit_test_log_t::unit_test_log_t()':
/usr/include/boost/test/unit_test_log.hpp:131: undefined reference to `vtable for boost::unit_test::unit_test_log_t'
tests/main.cpp.3.o: In function `init_unit_test()':
/usr/include/boost/test/unit_test_suite.hpp:228: undefined reference to `boost::unit_test::framework::master_test_suite()'
tests/main.cpp.3.o: In function `init_tests()':
/home/davide/NFD/build/../tests/main.cpp:57: undefined reference to `boost::unit_test::framework::master_test_suite()'
/home/davide/NFD/build/../tests/main.cpp:56: undefined reference to `boost::unit_test::framework::master_test_suite()'
tests/main.cpp.3.o: In function `void __gnu_cxx::new_allocator<boost::unit_test::output::compiler_log_formatter>::construct<boost::unit_test::output::compiler_log_formatter>(boost::unit_test::output::compiler_log_formatter*)':
/usr/include/boost/test/output/compiler_log_formatter.hpp:36: undefined reference to `vtable for boost::unit_test::output::compiler_log_formatter'
tests/main.cpp.3.o: In function `boost::unit_test::output::multi_log_formatter::multi_log_formatter()':
/home/davide/NFD/build/../tests/boost-multi-log-formatter.hpp:63: undefined reference to `boost::unit_test::runtime_config::log_format()'
tests/main.cpp.3.o: In function `void __gnu_cxx::new_allocator<boost::unit_test::output::compiler_log_formatter>::construct<boost::unit_test::output::compiler_log_formatter>(boost::unit_test::output::compiler_log_formatter*)':
/usr/include/boost/test/output/compiler_log_formatter.hpp:36: undefined reference to `vtable for boost::unit_test::output::compiler_log_formatter'
tests/main.cpp.3.o: In function `init_tests()':
/home/davide/NFD/build/../tests/main.cpp:96: undefined reference to `boost::unit_test::unit_test_log_t::set_formatter(boost::unit_test::unit_test_log_formatter*)'
tests/main.cpp.3.o: In function `void __gnu_cxx::new_allocator<boost::unit_test::output::xml_log_formatter>::construct<boost::unit_test::output::xml_log_formatter>(boost::unit_test::output::xml_log_formatter*)':
/usr/include/boost/test/output/xml_log_formatter.hpp:39: undefined reference to `vtable for boost::unit_test::output::xml_log_formatter'
/usr/include/boost/test/output/xml_log_formatter.hpp:39: undefined reference to `vtable for boost::unit_test::output::xml_log_formatter'
tests/main.cpp.3.o: In function `boost::unit_test::unit_test_log_t::unit_test_log_t()':
/usr/include/boost/test/unit_test_log.hpp:131: undefined reference to `vtable for boost::unit_test::unit_test_log_t'
tests/main.cpp.3.o: In function `main':
/home/davide/NFD/build/../tests/main.cpp:104: undefined reference to `boost::unit_test::unit_test_main(bool (*)(), int, char**)'
tests/main.cpp.3.o:(.rodata._ZTIN5boost9unit_test6output19multi_log_formatterE[_ZTIN5boost9unit_test6output19multi_log_formatterE]+0x10): undefined reference to `typeinfo for boost::unit_test::unit_test_log_formatter'
tests/main.cpp.3.o:(.rodata._ZTVN5boost9unit_test6output19multi_log_formatterE[_ZTVN5boost9unit_test6output19multi_log_formatterE]+0x70): undefined reference to `boost::unit_test::unit_test_log_formatter::log_entry_value(std::ostream&, boost::unit_test::lazy_ostream const&)'
collect2: error: ld returned 1 exit status
Updated by Eric Newberry about 7 years ago
- Status changed from New to In Progress
- Assignee set to Eric Newberry
I can work on this, given that it blocks #4327.
Updated by Eric Newberry about 7 years ago
- Blocks Feature #4327: Congestion mark integration test case added
Updated by Eric Newberry about 7 years ago
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
Updated by Davide Pesavento about 7 years ago
- Status changed from Code review to Closed
Actions