Re: [Dnsmasq-discuss] dnsmasq failing to compile
Switched to kernel sources 2.6.18.1 and it built fine so must be an issue between dnsmasq and the 2.6.19 kernel. Philip Wall On Sat December 2 2006 23:30, /dev/rob0 wrote: On Saturday 02 December 2006 21:56, Philip Wall wrote: Getting this during compile of a fresh dnsmasq 2.35 Kernel 2.6.19 They changed a bunch of things in this kernel. Slamd64 11 (slackware 64bit version) gcc 3.4.6 Previous versions had no problem building $ time make -j5 make I18N=-DNO_GETTEXT -f ../bld/Makefile -C src dnsmasq make[1]: Entering directory `/home/common/src/dnsmasq-2.35/src' cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c cache.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c rfc1035.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c util.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c option.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c forward.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c isc.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c network.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c dnsmasq.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c dhcp.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c lease.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c rfc2131.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c netlink.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c dbus.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c bpf.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c helper.c cc -o dnsmasq cache.o rfc1035.o util.o option.o forward.o isc.o network.o dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o `echo | ../bld/pkg-wrapper pkg-config --libs dbus-1` make[1]: Leaving directory `/home/common/src/dnsmasq-2.35/src' real0m3.050s user0m4.116s sys 0m0.476s $ cat /etc/slackware-version ; gcc --version Slackware 10.2.1 (x86_64) gcc (GCC) 3.4.6 ... Perhaps you're missing some requisite library? But anyway, dnsmasq is provided in both Slackware and Slamd64: $ locate dnsmasq | grep '\.tgz$' /home/common/slamd64-10.2b/slackware/n/dnsmasq-2.24-x86_64-1.tgz /home/common/slamd64-11.0/slackware/n/dnsmasq-2.33-x86_64-1.tgz /home/common/slackware-10.1/slackware/n/dnsmasq-2.20-i486-1.tgz /home/common/slackware-10.2/slackware/n/dnsmasq-2.23-i486-1.tgz /home/common/slackware-11.0/slackware/n/dnsmasq-2.33-i486-1.tgz ... so you could: 1. installpkg it 2. Edit and run Fred's dnsmasq.SlackBuild cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c netlink.c netlink.c: In function `iface_enumerate': netlink.c:159: warning: implicit declaration of function `IFA_RTA' netlink.c:159: warning: initialization makes pointer from integer without a cast netlink.c:160: error: dereferencing pointer to incomplete type netlink.c:162: error: dereferencing pointer to incomplete type netlink.c:166: error: dereferencing pointer to incomplete type netlink.c:172: error: `IFA_LOCAL' undeclared (first use in this function) netlink.c:172: error: (Each undeclared identifier is reported only once netlink.c:172: error: for each function it appears in.) netlink.c:174: error: `IFA_BROADCAST' undeclared (first use in this function) netlink.c:181: error: dereferencing pointer to incomplete type netlink.c:185: error: dereferencing pointer to incomplete type netlink.c:190: error: `IFA_ADDRESS' undeclared (first use in this function) netlink.c:197: error: dereferencing pointer to incomplete type netlink.c:197: error: dereferencing pointer to incomplete type make[1]: *** [netlink.o] Error 1 make[1]: Leaving directory `/www/src/dnsmasq-2.35/src' make: *** [dnsmasq] Error 2 I'm running on a 2.6.18.2 kernel with /usr/src/linux pointing to linux-2.6.15.5 sources. So yes, maybe the 2.6.19 kernel is your problem. Although I have it on good authority that 2.6.19 is perfect, and any problems with it are your own %*^$*! fault. Linus said so. :)
Re: [Dnsmasq-discuss] dnsmasq failing to compile
Carlos Carvalho wrote: Philip Wall (philip.w...@gmail.com) wrote on 4 December 2006 23:49: Switched to kernel sources 2.6.18.1 and it built fine so must be an issue between dnsmasq and the 2.6.19 kernel. Applications shouldn't depend directly on the kernel headers, they depend on the headers used by libc. There's something strange in your configuration. That's the theory: the practise is that for interfaces which are linux specific, it's necessary to #include linux/somefile and, whilst /usr/include/linux _should_ be some nice, change controlled, stable API, set of userspace headers, nobody actually maintains such a thing. Distros are therefore forced to use the include tree from some kernel-or-other, and when that changes, things can break. In this case, I can't see any solution other than to resort to #ifdef and swearing. I'll put something together and post a patch here soon. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] dnsmasq failing to compile
Philip Wall wrote: Switched to kernel sources 2.6.18.1 and it built fine so must be an issue between dnsmasq and the 2.6.19 kernel. Philip Wall The following patch seems to fix it. Cheers, Simon. --- src/netlink.c.orig 2006-12-05 14:37:43.0 + +++ src/netlink.c 2006-12-05 14:36:56.0 + @@ -18,6 +18,14 @@ #include linux/netlink.h #include linux/rtnetlink.h +/* linux 2.6.19 buggers up the headers, patch it up here. */ +#ifndef IFA_RTA +# define IFA_RTA(r) \ + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg + +# include linux/if_addr.h +#endif + static struct iovec iov; static void nl_err(struct nlmsghdr *h);
Re: [Dnsmasq-discuss] dnsmasq failing to compile
On Saturday 02 December 2006 21:56, Philip Wall wrote: Getting this during compile of a fresh dnsmasq 2.35 Kernel 2.6.19 They changed a bunch of things in this kernel. Slamd64 11 (slackware 64bit version) gcc 3.4.6 Previous versions had no problem building $ time make -j5 make I18N=-DNO_GETTEXT -f ../bld/Makefile -C src dnsmasq make[1]: Entering directory `/home/common/src/dnsmasq-2.35/src' cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c cache.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c rfc1035.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c util.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c option.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c forward.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c isc.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c network.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c dnsmasq.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c dhcp.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c lease.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c rfc2131.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c netlink.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c dbus.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c bpf.c cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c helper.c cc -o dnsmasq cache.o rfc1035.o util.o option.o forward.o isc.o network.o dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o `echo | ../bld/pkg-wrapper pkg-config --libs dbus-1` make[1]: Leaving directory `/home/common/src/dnsmasq-2.35/src' real0m3.050s user0m4.116s sys 0m0.476s $ cat /etc/slackware-version ; gcc --version Slackware 10.2.1 (x86_64) gcc (GCC) 3.4.6 ... Perhaps you're missing some requisite library? But anyway, dnsmasq is provided in both Slackware and Slamd64: $ locate dnsmasq | grep '\.tgz$' /home/common/slamd64-10.2b/slackware/n/dnsmasq-2.24-x86_64-1.tgz /home/common/slamd64-11.0/slackware/n/dnsmasq-2.33-x86_64-1.tgz /home/common/slackware-10.1/slackware/n/dnsmasq-2.20-i486-1.tgz /home/common/slackware-10.2/slackware/n/dnsmasq-2.23-i486-1.tgz /home/common/slackware-11.0/slackware/n/dnsmasq-2.33-i486-1.tgz ... so you could: 1. installpkg it 2. Edit and run Fred's dnsmasq.SlackBuild cc -O2 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c netlink.c netlink.c: In function `iface_enumerate': netlink.c:159: warning: implicit declaration of function `IFA_RTA' netlink.c:159: warning: initialization makes pointer from integer without a cast netlink.c:160: error: dereferencing pointer to incomplete type netlink.c:162: error: dereferencing pointer to incomplete type netlink.c:166: error: dereferencing pointer to incomplete type netlink.c:172: error: `IFA_LOCAL' undeclared (first use in this function) netlink.c:172: error: (Each undeclared identifier is reported only once netlink.c:172: error: for each function it appears in.) netlink.c:174: error: `IFA_BROADCAST' undeclared (first use in this function) netlink.c:181: error: dereferencing pointer to incomplete type netlink.c:185: error: dereferencing pointer to incomplete type netlink.c:190: error: `IFA_ADDRESS' undeclared (first use in this function) netlink.c:197: error: dereferencing pointer to incomplete type netlink.c:197: error: dereferencing pointer to incomplete type make[1]: *** [netlink.o] Error 1 make[1]: Leaving directory `/www/src/dnsmasq-2.35/src' make: *** [dnsmasq] Error 2 I'm running on a 2.6.18.2 kernel with /usr/src/linux pointing to linux-2.6.15.5 sources. So yes, maybe the 2.6.19 kernel is your problem. Although I have it on good authority that 2.6.19 is perfect, and any problems with it are your own %*^$*! fault. Linus said so. :) -- Offlist mail to this address is discarded unless /dev/rob0 or not-spam is in Subject: header