Timo, first of all, I saw my message more as general reminder that Quagga isn’t a Linux-only tool. So keeping dependencies as low as possible makes it much easier to maintain and cross-platform. So I think adding any dependencies should be clearly stated (and discussed similar to any code review).
On 6 Nov 2015, at 23:11, Timo Teras wrote: > On Fri, 06 Nov 2015 16:02:35 -0800 > "Martin Winter" <[email protected]> wrote: > >> So Timo’s NHRPD branch requires a new library: libcares (libc ares). >> >> I think this was never really mentioned, but I would prefer if new >> requirements are >> clearly highlighted - and discussed. > > I did mention it in the beginning. But not sure if it was email or irc. Sorry, missed it (if it was on email). >> I worry that new libraries might break or make it impossible to build >> on some not so common platforms. > > The whole nhrpd module has several Linux dependencies. It really works > only on linux. It uses at least three different Netlink APIs and some > proc/sys knobs too. Before merge I'm adding the check that it can be > enabled only on linux. Good. I managed to get the library installed on all Linux, FreeBSD and NetBSD. I’m failing to find it for OmniOS (Solaris) so far… no idea if it would exit there. However, the compile fails on FreeBSD and NetBSD CC rt_socket.o rt_socket.c:370:11: error: use of undeclared identifier 'RTM_DEL' cmd = RTM_DEL; I assume this is the Linux dependency you are talking about. Would have been good to get it cross-platform, but it sounds that might not be an easy task (or not possible?) >> I assume in some cases we have to just accept this (and >> allow to configure it without this library - potentially loosing >> some of the new functionality) >> >> Not sure if the new library is REALLY needed or if there is a >> (workaround) without having new dependencies. > > It's asynchronous DNS. Doing synchronous DNS with libc function is > worse. So other option is to just leave DNS support out. However, I'd > prefer to keep the dependency. > > I chose c-ares because that's what I used with the opennhrp > implementation of nhrp. For that I chose it because: > a) it's easy to ingegrate to your own main loop > b) it's C89 > c) it pretty much runs almost on all OSes > (it's curl's dns lib, so it runs anything curl runs on) It actually required pkg-config as well (as a pre-requisite for configure to find the library.) Something to keep in mind when updating the packages (and highlight to package maintainers on the various platforms) >> So please, if you add new requirements, please highlight this on the >> list and let’s discuss them. > > But I have no strong opinion this. Any async dns lib will do if it does > better. All I really need is DNS lookup function for which I give the > FQDN and query type, and I get back parsed A/AAAA records. So if the overall function is only working on Linux then this might not matter at all, but otherwise maybe some simple libc alternative (if compiled without the libcares) - Martin Winter _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
