dnsmasq fails to compile, as it obviously doesn't realize I neither have nor need ipv6 support. When appending -DNO_IPV6, it compiles just fine, but the ebuild does not seem to check, so the flag never gets set. Here's the log extract: armeb-softfloat-linux-uclibc-gcc -march=armv5t -mtune=xscale -Os -pipe -fforce-addr -fomit-frame-pointer -Wstack-protector -Wformat=2 -DAI_ADDRCONFIG=0x00000400 -DNO_GETTEXT `echo | ../bld/pkg-wrapper pkg-config --cflags dbus-1` -Wall -W -c log.c tftp.c: In function `tftp_err': tftp.c:458: warning: format not a string literal, argument types not checked tftp.c:458: warning: format not a string literal, argument types not checked armeb-softfloat-linux-uclibc-gcc -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 tftp.o log.o `echo | ../bld/pkg-wrapper pkg-config --libs dbus-1` option.o: In function `one_opt': option.c:(.text+0x1758): undefined reference to `in6addr_any' network.o: In function `create_wildcard_listeners': network.c:(.text+0x900): undefined reference to `in6addr_any' network.o: In function `reload_servers': network.c:(.text+0x1178): undefined reference to `in6addr_any' dnsmasq.o: In function `main': dnsmasq.c:(.text+0x1418): undefined reference to `in6addr_any' collect2: ld returned 1 exit status make[1]: *** [dnsmasq] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-dns/dnsmasq-2.40/work/dnsmasq-2.40/src' make: *** [dnsmasq] Error 2 I'm trying to install it to an NSLU2: Portage 2.1.3.19 (uclibc/arm, gcc-3.4.6, uclibc-0.9.28.3-r0, 2.6.21.7 armv5teb) ================================================================= System uname: 2.6.21.7 armv5teb XScale-IXP42x Family rev 2 (v5b) Timestamp of tree: Thu, 07 Feb 2008 14:32:01 +0000 distcc 2.18.3 armeb-softfloat-linux-uclibc (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p17-r1 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="arm" CBUILD="armeb-softfloat-linux-uclibc" CFLAGS="-march=armv5t -mtune=xscale -Os -pipe -fforce-addr -fomit-frame-pointer -Wstack-protector -Wformat=2 -DAI_ADDRCONFIG=0x00000400" CHOST="armeb-softfloat-linux-uclibc" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=armv5t -mtune=xscale -Os -pipe -fforce-addr -fomit-frame-pointer -Wstack-protector -Wformat=2 -DAI_ADDRCONFIG=0x00000400" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distcc distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes --timeout=500" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="arm cli cracklib cups dri midi mudflap ncurses openmp pcre readline reflection samba session spl tcpd uclibc xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
it sounds like dnsmasq needs USE=ipv6 for disabling and enabling IPv6 support
Created attachment 144016 [details] adds USE=ipv6 test this out to see if that helps
Thank you - the patch works beautifully when setting "-ipv6". I suppose, if I set ipv6 in make.conf and re-emerge world, it should work, too. Haven't tried that, though. ;-) However, when setting "ipv6" only for dnsmasq, obviously no other packages are pulled in, and again compilation fails. Is that the expected behaviour, or shouldn't the ebuild rather "know" what other libraries need to be compiled before, if the user suddenly wants ipv6 support?
Fixed in net-dns/dnsmasq-2.41. The only way to check the dependencies for ipv6 would be to do a built_with_use check on the libc, after figuring out which libc is running. I checked the tree and it does not appear that any other packages do this, so I will leave it out. Maybe I will do something more robust once portage has USE dependencies.