dns-stats / compactor

Tools to capture DNS traffic and record it in C-DNS files.
Other
32 stars 12 forks source link

boost::log untested #52

Open bortzmeyer opened 5 years ago

bortzmeyer commented 5 years ago

The git HEAD ./configure apparently does not test the availability of boost::log so make will fail:


  CXX      src/libcdns_a-pseudoanonymise.o
  CXX      src/libcdns_a-rotatingfilename.o
  CXX      src/libcdns_a-streamwriter.o
  AR       libcdns.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CXXLD    compactor
/usr/bin/ld: src/compactor-sniffers.o: in function `BaseSniffers::packet_read_thread()':
/home/stephane/tmp/compactor/src/sniffers.cpp:253: undefined reference to `boost::log::v2_mt_posix::trivial::logger::get()'
/usr/bin/ld: src/compactor-sniffers.o: in function `BaseSniffers::packet_read_thread()':
/usr/include/boost/log/sources/basic_logger.hpp:456: undefined reference to `boost::log::v2_mt_posix::core::get_logging_enabled() const'
/usr/bin/ld: src/compactor-sniffers.o: in function `BaseSniffers::packet_read_thread()':
/usr/include/boost/log/sources/severity_feature.hpp:135: undefined reference to `boost::log::v2_mt_posix::sources::aux::get_severity_level()'
/usr/bin/ld: src/compactor-sniffers.o: in function `BaseSniffers::packet_read_thread()':
/usr/include/boost/log/sources/basic_logger.hpp:259: undefined reference to `boost::log::v2_mt_posix::core::open_record(boost::log::v2_mt_posix::attribute_set const&)'
/usr/bin/ld: src/compactor-sniffers.o: in function `BaseSniffers::packet_read_thread()':
/usr/include/boost/log/sources/record_ostream.hpp:526: undefined reference to `boost::log::v2_mt_posix::aux::unhandled_exception_count()'
/usr/bin/ld: src/compactor-sniffers.o: in function `BaseSniffers::packet_read_thread()':
/usr/include/boost/log/core/core.hpp:308: undefined reference to `boost::log::v2_mt_posix::core::push_record_move(boost::log::v2_mt_posix::record&)'
banburybill commented 5 years ago

Hi Stephane,

Can you give me more details on the platform you are building on? configure.ac does include a check for boost::log. Running configure on Ubuntu Xenial certainly fails if libboost-log1.58-dev is not installed.

bortzmeyer commented 5 years ago

Can you give me more details on the platform you are building on?

Debian "testing" alias "buster", x86_64

I forgot to install the package libboost-log-dev , configure went fine but make failed with the above messages. After 'sudo aptitude install libboost-log-dev 'and running configure again, make went fine.

banburybill commented 5 years ago

Curious. I've been building on Debian Sid (which should be pretty close to Testing), and if I remove libboost-log-dev and libboost-log1.67-dev I get the following on configure.

checking for exit in -lboost_log... no
checking for exit in -lboost_log_setup... no
configure: error: Could not link against boost_log_setup !
banburybill commented 5 years ago

Thanks. I've now reproduced this. It looks like the test (from the Autoconf archive) just checks BOOST_LOG_TRIVIAL() works, and on a clean Buster install this is header-only. This is also true for Debian Sid - my previous results were because I had uninstalled libboost-log-dev but not libboost-log.