When emerging vsftpd, I get errors like: sysdeputil.o(.text+0xb4e): In function `vsf_sysdep_check_auth': : undefined reference to `pam_start' sysdeputil.o(.text+0xb9a): In function `vsf_sysdep_check_auth': : undefined reference to `pam_set_item' sysdeputil.o(.text+0xbb8): In function `vsf_sysdep_check_auth': : undefined reference to `pam_authenticate' sysdeputil.o(.text+0xbd6): In function `vsf_sysdep_check_auth': : undefined reference to `pam_acct_mgmt' sysdeputil.o(.text+0xbf4): In function `vsf_sysdep_check_auth': : undefined reference to `pam_setcred' sysdeputil.o(.text+0xc77): In function `vsf_sysdep_check_auth': : undefined reference to `pam_open_session' sysdeputil.o(.text+0xc9a): In function `vsf_sysdep_check_auth': I suppose this is a missing dependency, but I don't care checking it up more now. Reproducible: Always Steps to Reproduce: Portage 2.0.51_rc7 (default-x86-1.4, gcc-3.4.2, glibc-2.3.4.20040808-r0, 2.6.8-gentoo-r4 i686) ================================================================= System uname: 2.6.8-gentoo-r4 i686 Intel(R) Pentium(R) M processor 1.50GHz Gentoo Base System version 1.5.3 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks" GENTOO_MIRRORS=" http://mirror.gentoo.no/ http://trumpetti.atm.tut.fi/gentoo/ http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d aalib acl acpi acpi4linux adns alsa apache apache2 apm audiofile avi bcmath berkdb bitmap-fonts blender-game calendar caps cdparanoia cdr cdrom cgi chroot cjk crypt curl dba dbm dbx devfs26 dga distcache distribution divx4linux doc droproot dvb dvd dvdread emacs emacs-w3 encode escreen fastcgi fbcon flac flash ftp gb gd gd-external gdbm ggi gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml imagemagick imlib innodb ipv6 irda jack java jikes jpeg junit kde ladcca lcms leim libgda libwww lirc mad mbox mcal memlimit motif mozilla mpeg mpi mule mysql nas ncurses nls nocd oggvorbis opengl oss pcmcia pdflib perl plotutils png pnp postgres python qt quicktime readline ruby samba scanner slang socks5 speex spell sqlite sse ssl svga sysvipc tcltk tcpd tetex threads tiff truetype trusted unicode usb videos wavelan wmf x86 xface xinerama xml xml2 xmms xosd xprint xv xvid yaz zeo zlib zvbi"
Could you try adding "pam" to your USE flag and re-emerging?
same thing happens here, if -pam is used. gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o ipv6parse.o access.o features.o readwrite.o ssl.o sysutil.o sysdeputil.o -Wl,-s `./vsf_findlibs.sh | sed "/[/-]\<.*pam.*\>/d"` sysdeputil.o(.text+0x63): In function `vsf_sysdep_check_auth': : undefined reference to `pam_start' sysdeputil.o(.text+0xa4): In function `vsf_sysdep_check_auth': : undefined reference to `pam_set_item' sysdeputil.o(.text+0xba): In function `vsf_sysdep_check_auth': : undefined reference to `pam_authenticate' sysdeputil.o(.text+0xd0): In function `vsf_sysdep_check_auth': : undefined reference to `pam_acct_mgmt' sysdeputil.o(.text+0xe5): In function `vsf_sysdep_check_auth': : undefined reference to `pam_setcred' sysdeputil.o(.text+0x101): In function `vsf_sysdep_check_auth': : undefined reference to `pam_end' sysdeputil.o(.text+0x12f): In function `vsf_sysdep_check_auth': : undefined reference to `pam_open_session' sysdeputil.o(.text+0x149): In function `vsf_sysdep_check_auth': : undefined reference to `pam_setcred' sysdeputil.o(.text+0x15a): In function `vsf_sysdep_check_auth': : undefined reference to `pam_end' sysdeputil.o(.text+0x198): In function `vsf_auth_shutdown': : undefined reference to `pam_close_session' sysdeputil.o(.text+0x1a9): In function `vsf_auth_shutdown': : undefined reference to `pam_setcred' sysdeputil.o(.text+0x1b7): In function `vsf_auth_shutdown': : undefined reference to `pam_end' collect2: ld returned 1 exit status make: *** [vsftpd] Error 1 If the user selected PAM support then everything works. BUT ... with pam support. im on amd64.
verified on x86. +pam = works fine. -pam = it dies with the errors listed previously. I think the problem might lie here though i'm not entirely sure: $ diff vsftpd-1.2.2/sysdeputil.c vsftpd-2.0.1/sysdeputil.c 3c3 < * Licence: GPL --- > * Licence: GPL v2 16a17 > #include "builddefs.h" 49c50,52 < #define VSF_SYSDEP_HAVE_PAM --- > #ifdef VSF_BUILD_PAM > #define VSF_SYSDEP_HAVE_PAM > #endif
the default builddefs.h contains: #undef VSF_BUILD_TCPWRAPPERS #define VSF_BUILD_PAM #undef VSF_BUILD_SSL to fix the ebuild, simply remove everything from src_compile() { blah } it's no longer needed and breaks the compile and add if ! use pam; then echo '#undef VSF_BUILD_PAM' >> builddefs.h fi to the src_unpack field pam is is turned on by default so this works
Thanks rob, made the change in 2.0.1 ebuild
It does not appear to install the ELF vsftpd anymore with this update.
Isn't 'emake CFLAGS="${CFLAGS}" || die' needed in the src_compile function since -fPIC is being filtered in the ebuild? (I thought an empty src_compile would pass the unfiltered CFLAGS but I could be wrong.) The current ebuild is broken however (the fix introduced on 17 January left a bogus line in src_compile and now nothing is compiled). See bug 79202 for more info.
I am working on this bug right now with Rob Baxter, a comment will be posted to bug 79202 [1] when the fix is committed. Apologies for someone not picking up on this when editing, and somehow comitting a foobared ebuild. -Jeffrey [1] http://bugs.gentoo.org/show_bug.cgi?id=79202