LDFLAGS=-Wl,--as-needed is a great tool to check library dependencies. Currently build of svxlink-080730 fails with --as-needed with the following error:
--- Linking AsyncConfig_demo...
AsyncConfig_demo.o: In function `main':
/var/tmp/portage/media-radio/svxlink-080730/work/svxlink-080730/async/demo/AsyncConfig_demo.cpp:12: undefined reference to `Async::Config::Config()'
/var/tmp/portage/media-radio/svxlink-080730/work/svxlink-080730/async/demo/AsyncConfig_demo.cpp:13: undefined reference to `Async::Config::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/var/tmp/portage/media-radio/svxlink-080730/work/svxlink-080730/async/demo/AsyncConfig_demo.cpp:20: undefined reference to `Async::Config::getValue(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/var/tmp/portage/media-radio/svxlink-080730/work/svxlink-080730/async/demo/AsyncConfig_demo.cpp:28: undefined reference to `Async::Config::~Config()'
/var/tmp/portage/media-radio/svxlink-080730/work/svxlink-080730/async/demo/AsyncConfig_demo.cpp:28: undefined reference to `Async::Config::~Config()'
collect2: ld returned 1 exit status
make[1]: *** [AsyncConfig_demo] Error 1
make: *** [all] Error 2
That's because missing dependency. Patch in attachment fixes this issue.
svxlink-080730--as-needed.patch
Well, mensioning asynccore should not be necessary since asynccpp knows asynccore is needed. That's the way I like it to be. A user of a library should only need to specify the name of the library he use, not the libraries it depends on. None of the other applications mension asynccore. Why is it needed in the demo case?
This issue has now been closed on GitHub.