i386-gentoo-linux-uclibc-gcc -I/usr/kerberos/include -march=i386 -Os -pipe -fomit-frame-pointer -L/usr/lib -o fetchmail socket.o getpass.o pop2.o pop3.o imap.o etrn.o odmr.o fetchmail.o env.o idle.o options.o daemon.o driver.o transact.o sink.o smtp.o uid.o mxget.o md5ify.o cram.o kerberos.o gssapi.o opie.o rpa.o interface.o netrc.o unmime.o conf.o checkalias.o lock.o rcfile_l.o rcfile_y.o norm_charmap.o getaddrinfo.o getnameinfo.o libfm.a -lcrypt -lssl -lcrypto mxget.o: In function `getmxrecords': mxget.c:(.text+0xab): undefined reference to `__dn_skipname' collect2: ld returned 1 exit status make[2]: *** [fetchmail] Error 1 make[2]: Leaving directory `/var/tmp/portage/fetchmail-6.3.4/work/fetchmail-6.3.4' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/fetchmail-6.3.4/work/fetchmail-6.3.4' make: *** [all] Error 2 hardened ~ # emerge --info Portage 2.0.54-r2 (uclibc/x86/hardened, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.16-gentoo-r8 i686) ================================================================= System uname: 2.6.16-gentoo-r8 i686 Intel(R) Pentium(R) D CPU 3.00GHz Gentoo Base System version 1.6.14 distcc 2.18.3 i386-gentoo-linux-uclibc (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.4.2 dev-python/pycrypto: [Not Present] dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i386-gentoo-linux-uclibc" CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer" CHOST="i386-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-Os -pipe" DISTDIR="/var/cache/distfiles" FEATURES="autoconfig buildpkg distlocks nodoc noinfo noman sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/var/cache/packages/default" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/alpine-portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X509 bitmap-fonts bri bzip2 cdr cli cracklib curl dri encode expat gd gmp hardened iproute2 ipv6 jpeg mad mhash minimal ncurses netboot ogg oss pci pcmcia pic png pppd readline reflection rrdtool sensord session snmp speex spl ssl tdb truetype truetype-fonts type1-fonts uclibc udev usb userlocales vorbis winbind xorg zlib userland_GNU kernel_linux elibc_uclibc" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
dn_skipname does not exist in uClibc. It's documented as far back as 2004 as not existing. You will probably need to patch around it. http://www.google.com/search?q=fetchmail+uclibc
They must have added calls to dn_skipname in recent releases. fetchmail-6.3.2-r1 (stable) compiles without problems and I am using that version. I just wanted to report this before 6.3.4 is marked stable to tell that there are problems ahead for uclibc users.
Embedded, what do you suggest to work around this uClibc issue?
fix it in uClibc
I just tested fetchmail-6.3.6 against the latest uclibc (0.9.28-r2) and it fails with the same linker error. Could we please get back any of the pre 6.3.4 versions to the portage tree until this is fixed?
This is weird, because 6.3.2 already contains a call to dn_skipname(). Even 6.3.0 had it. Natanael, can you please grab ebuilds from http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/fetchmail/?hideattic=0 and test which will and which won't work? embedded@: Alternatively, can I get access to some Gentoo uclibc system to test this myself? I'm not sure if you have some available for tests like this...
(In reply to comment #6) > Natanael, can you please grab ebuilds from > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/fetchmail/?hideattic=0 > and test which will and which won't work? fetchmail-6.3.2-r1 works fetchmail-6.3.3 works fetchmail-6.3.4 fails fetchmail-6.3.6 fails Portage 2.1.1-r2 (uclibc/x86/hardened, gcc-3.4.6, uclibc-0.9.28-r2, 2.6.19-gentoo-r4 i686) ================================================================= System uname: 2.6.19-gentoo-r4 i686 Intel(R) Pentium(R) D CPU 3.00GHz Gentoo Base System version 1.12.6 Last Sync: Tue, 16 Jan 2007 09:30:01 +0000 distcc 2.18.3 i386-gentoo-linux-uclibc (protocols 1 and 2) (default port 3632) [disabled] app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i386-gentoo-linux-uclibc" CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer" CHOST="i386-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-Os -pipe" DISTDIR="/var/cache/distfiles" FEATURES="autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/var/cache/packages/default" 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'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/alpine-portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X509 alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol bitmap-fonts bri bzip2 cli cracklib dlloader dri elibc_uclibc encode expat extensions hardened input_devices_evdev input_devices_keyboard input_devices_mouse iproute2 ipv6 jpeg kernel_linux lua mad minimal misdn_cards_avmfritz misdn_cards_hfcmulti misdn_cards_hfcpci misdn_cards_hfcsmini misdn_cards_hfcsusb misdn_cards_netjetpci misdn_cards_sedlfax misdn_cards_w6692pci misdn_cards_xhfc ncurses netboot ntfs ogg oss pci pcmcia pic png pppd pri readline reflection rrdtool sensord session snmp speex spl ssl tdb truetype truetype-fonts type1-fonts uclibc uclibc++ udev usb userland_GNU userlocales video_cards_dummy video_cards_fbdev video_cards_v4l winbind wordexp xorg zaptel zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
6.3.3 is back in CVS. Thanks for testing!
I'd suggest not to use older versions because of security bug CVE-2006-5867.
(In reply to comment #9) > I'd suggest not to use older versions because of security bug CVE-2006-5867. > Which puts me in an interesting situation. Newer fetchmail fails to compile due to missing features in uclibc. Old version has security problems. What to do?
Basically, strip the alias detection code (which is AFAIR the only part using the resolver functions directly, look for res_* and dn_*), which is of limited use in real-life deployment scenarios because it relies on (bold) assumptions that are typically no longer true today: it assumes that the server listed as the MX for a given domain, that is the SMTP server, were also the IMAP/POP3 server. It still is on some sites, but that's not a general rule. In fact, this alias detection code is scheduled for removal in a later version (not on the 6.3 branch though) because of these assumptions, the non-portability to IPv6 and other issues with it. The interesting fix underneath in one of the recent 6.3.X versions however was calling res_init() as well at the beginning of a poll loop to cater for systems that change /etc/resolv.conf but still let fetchmail run extended amounts of time. We need to make sure this res_init() alone does not break with the µC-oriented libc spinoffs. Does it work to compile fetchmail with dietlibc?
A workaround to this used by nslu2 linux [1] is to set undef those macros that cause the code to be included: /* Define to 1 if you have the <resolv.h> header file. */ #undef HAVE_RESOLV_H /* Define to 1 if you have the 'res_search' function. */ #undef HAVE_RES_SEARCH [1] http://trac.nslu2-linux.org/optware/browser/trunk/make/fetchmail.mk
Created attachment 121645 [details, diff] Fix mxget.o linker failures (dn_skipname) for µClibc The attached patch extends the configure check for res_search() by another check for dn_skipname() which µClibc doesn't provide. This fixes the link failures for dn_skipname() by disabling the DNS feature automatically on systems that don't provide a BSD/BIND9 compatible libresolv.a. Please file a feature request for µClibc to enable dn_skipname() and once that's added, rebuilding fetchmail should pick it up and enable DNS automatically.
The patch from comment #13 has been committed to the upstream fetchmail SVN repository and is scheduled to appear in 6.3.9.
sounds like newer fetchmail's are fixed
This is still an issue in net-mail/fetchmail-6.3.8-r2. i386-gentoo-linux-uclibc-gcc -I/usr/kerberos/include -march=i386 -Os -pipe -fomit-frame-pointer -L/usr/lib -o fetchmail socket.o getpass.o fetchmail.o env.o idle.o options.o daemon.o driver.o transact.o sink.o smtp.o uid.o mxget.o md5ify.o cram.o gssapi.o opie.o interface.o netrc.o unmime.o conf.o checkalias.o lock.o rcfile_l.o rcfile_y.o norm_charmap.o pop3.o imap.o etrn.o odmr.o rpa.o libfm.a -lcrypt -lssl -lcrypto mxget.o: In function `getmxrecords': mxget.c:(.text+0xab): undefined reference to `__dn_skipname' collect2: ld returned 1 exit status make[2]: *** [fetchmail] Error 1 make[2]: Leaving directory `/var/tmp/portage/net-mail/fetchmail-6.3.8-r2/work/fetchmail-6.3.8' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-mail/fetchmail-6.3.8-r2/work/fetchmail-6.3.8' make: *** [all] Error 2
the patch from comment #13 (renamed to fethcmail-6.3.8-dn_skipname.patch) and the change below fixes the issue. --- fetchmail-6.3.8-r2.ebuild.orig 2008-06-17 09:35:41 +0000 +++ fetchmail-6.3.8-r2.ebuild 2008-06-17 09:29:18 +0000 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-mail/fetchmail/fetchmail-6.3.8-r2.ebuild,v 1.7 2008/06/16 18:34:59 jer Exp $ -inherit eutils +inherit eutils autotools DESCRIPTION="the legendary remote-mail retrieval and forwarding utility" HOMEPAGE="http://fetchmail.berlios.de" @@ -33,6 +33,10 @@ # this patch fixes bug #34788 (ticho@gentoo.org 2004-09-03) epatch "${FILESDIR}"/${PN}-6.2.5-broken-headers.patch + + # bug #134187 + epatch "${FILESDIR}"/${P}-dn_skipname.patch + eautoreconf } src_compile() {
fetchmail-6.3.19 has the patch already. Closing. $ grep -C5 dn_skipname configure.ac #endif #ifdef HAVE_RESOLV_H #include <resolv.h> #endif extern int res_search(); ]], [[res_search(0, 0, 0, 0, 0); dn_skipname(0,0);]])], [AC_MSG_RESULT([found]) AC_DEFINE(HAVE_RES_SEARCH, [1], [Define to 1 if you have the 'res_search' and 'dn_skipname' functions.]) break], [AC_MSG_RESULT([not found])]) LIBS=$old_LIBS done dnl Check for libcrypt -- it may live in libc or libcrypt, as on IRIX