Summary: | vsftpd compile failure; undefined reference to pam_* | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tobias Brox <tobias> |
Component: | New packages | Assignee: | Rajiv Aaron Manglani (RETIRED) <rajiv> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Tobias Brox
2004-09-30 20:28:05 UTC
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 |