Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65981 - vsftpd compile failure; undefined reference to pam_*
Summary: vsftpd compile failure; undefined reference to pam_*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Rajiv Aaron Manglani (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-30 20:28 UTC by Tobias Brox
Modified: 2005-02-09 05:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Brox 2004-09-30 20:28:05 UTC
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"
Comment 1 Jeffrey Forman (RETIRED) gentoo-dev 2004-10-03 13:29:43 UTC
Could you try adding "pam" to your USE flag and re-emerging?
Comment 2 Nuno Alexandre 2004-12-15 09:20:45 UTC
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.

Comment 3 Robert Baxter 2004-12-30 09:30:23 UTC
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
Comment 4 Robert Baxter 2005-01-17 07:02:15 UTC
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
Comment 5 Jeffrey Forman (RETIRED) gentoo-dev 2005-01-17 08:04:07 UTC
Thanks rob, made the change in 2.0.1 ebuild
Comment 6 solar (RETIRED) gentoo-dev 2005-01-22 12:33:00 UTC
It does not appear to install the ELF vsftpd anymore with this update.
Comment 7 Lourdes Jones 2005-02-01 00:46:44 UTC
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.
Comment 8 Jeffrey Forman (RETIRED) gentoo-dev 2005-02-09 05:48:49 UTC
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