Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99696 - php-4.4.0 fails to compile without PAM
Summary: php-4.4.0 fails to compile without PAM
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-20 09:47 UTC by Mark Mykkanen
Modified: 2007-08-12 04:27 UTC (History)
1 user (show)

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 Mark Mykkanen 2005-07-20 09:47:07 UTC
Following the tips on http://gentoo-wiki.com/HOWTO_Remove_PAM lead me to:

# emerge -C pam pam-login
# emerge --newuse shadow
# emerge -D --newuse world

...which caused php not to compile.

Reproducible: Always
Steps to Reproduce:
1. Remove PAM
2. set USE='-pam'
3. emerge php

Actual Results:  
checking for IMAP SSL support... yes
checking for pam_start in -lpam... no
checking for crypt in -lcrypt... yes
checking for OpenSSL version... >= 0.9.6
checking for CRYPTO_free in -lcrypto... (cached) yes
checking for SSL_CTX_set_ssl_version in -lssl... (cached) yes
checking whether IMAP works... no
configure: error: build test failed. Please check the config.log for details.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/php-4.4.0/work/php-4.4.0/config.log

!!! ERROR: dev-php/php-4.4.0 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed

configure:42021: checking for IMAP SSL support
configure:42479: checking for pam_start in -lpam
configure:42498: gcc -o conftest -O3 -march=athlon-tbird -fomit-frame-pointer 
-L/usr/lib  -L/usr/X11R6/lib -ltiff -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr
/X11R6/lib conftest.c -lpam  -lt1 -lfreetype -lX11 -lXpm -lpng -lz -ljpeg
-lexslt -lxml2 -lxslt -lz -ldb-4.0 -ldb-4.0 -lndbm -lgdbm -lcurl -lbz2 -lz -lssl -lc
rypto -lresolv -lm  -lxmlparse -lxmltok -lcurl -lidn -lssl -lcrypto -ldl -lssl
-lcrypto -ldl -lz -lxml2 -lz -lm 1>&5
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -lpam
collect2: ld returned 1 exit status
distcc[1759] ERROR: compile conftest.c on localhost failed
configure: failed program was:
#line 42487 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pam_start();

int main() {
pam_start()
; return 0; }
configure:42636: checking for crypt in -lcrypt
configure:42655: gcc -o conftest -O3 -march=athlon-tbird -fomit-frame-pointer 
-L/usr/lib  -L/usr/X11R6/lib -ltiff -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr
/X11R6/lib conftest.c -lcrypt  -lt1 -lfreetype -lX11 -lXpm -lpng -lz -ljpeg
-lexslt -lxml2 -lxslt -lz -ldb-4.0 -ldb-4.0 -lndbm -lgdbm -lcurl -lbz2 -lz -lssl -
lcrypto -lresolv -lm  -lxmlparse -lxmltok -lcurl -lidn -lssl -lcrypto -ldl -lssl
-lcrypto -ldl -lz -lxml2 -lz -lm 1>&5
configure:43435: checking for OpenSSL version
configure:43575: checking for CRYPTO_free in -lcrypto
configure:43734: checking for SSL_CTX_set_ssl_version in -lssl
configure:43924: gcc -o conftest -O3 -march=athlon-tbird -fomit-frame-pointer 
-L/usr/lib  -L/usr/X11R6/lib -ltiff -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr
/X11R6/lib conftest.c -lc-client   -lssl -lcrypto -lcrypt -lt1 -lfreetype -lX11
-lXpm -lpng -lz -ljpeg -lexslt -lxml2 -lxslt -lz -ldb-4.0 -ldb-4.0 -lndbm -lgd
bm -lcurl -lbz2 -lz -lssl -lcrypto -lresolv -lm  -lxmlparse -lxmltok -lcurl
-lidn -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz -lxml2 -lz -lm 1>&5
/var/tmp/portage/php-4.4.0/temp/cc5qdUxy.o(.text+0x26): In function `main':
: undefined reference to `auth_gssapi_valid'
collect2: ld returned 1 exit status
distcc[1833] ERROR: compile conftest.c on localhost failed
configure: failed program was:
#line 43899 "configure"
#include "confdefs.h"

    void mm_log(void){}
    void mm_dlog(void){}
    void mm_flags(void){}
    void mm_fatal(void){}
    void mm_critical(void){}
    void mm_nocritical(void){}
    void mm_notify(void){}
    void mm_login(void){}
    void mm_diskerror(void){}
    void mm_status(void){}
    void mm_lsub(void){}
    void mm_list(void){}
    void mm_exists(void){}
    void mm_searched(void){}
    void mm_expunged(void){}
    char auth_gssapi_valid();
    int main() {
      auth_gssapi_valid();
      return 0;
    }

configure:43950: checking whether IMAP works
configure:43983: gcc -o conftest -O3 -march=athlon-tbird -fomit-frame-pointer 
-L/usr/lib  -L/usr/X11R6/lib -ltiff -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr
/X11R6/lib conftest.c -lc-client   -lssl -lcrypto -lcrypt -lt1 -lfreetype -lX11
-lXpm -lpng -lz -ljpeg -lexslt -lxml2 -lxslt -lz -ldb-4.0 -ldb-4.0 -lndbm -lgd
bm -lcurl -lbz2 -lz -lssl -lcrypto -lresolv -lm  -lxmlparse -lxmltok -lcurl
-lidn -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz -lxml2 -lz -lm 1>&5
/usr/lib/libc-client.a(osdep.o)(.text+0x9943): In function `ssl_onceonlyinit':
: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/libc-client.a(osdep.o)(.text+0x96ea): In function `checkpw':
: undefined reference to `pam_start'
/usr/lib/libc-client.a(osdep.o)(.text+0x970b): In function `checkpw':
: undefined reference to `pam_set_item'
/usr/lib/libc-client.a(osdep.o)(.text+0x9723): In function `checkpw':
: undefined reference to `pam_setcred'
/usr/lib/libc-client.a(osdep.o)(.text+0x9737): In function `checkpw':
: undefined reference to `pam_end'
/usr/lib/libc-client.a(osdep.o)(.text+0x9753): In function `checkpw':
: undefined reference to `pam_authenticate'
/usr/lib/libc-client.a(osdep.o)(.text+0x976b): In function `checkpw':
: undefined reference to `pam_acct_mgmt'
/usr/lib/libc-client.a(osdep.o)(.text+0x9783): In function `checkpw':
: undefined reference to `pam_setcred'
/usr/lib/libc-client.a(osdep.o)(.text+0xb776): In function `checkpw_cleanup':
: undefined reference to `pam_setcred'
/usr/lib/libc-client.a(osdep.o)(.text+0xb786): In function `checkpw_cleanup':
: undefined reference to `pam_end'
collect2: ld returned 1 exit status
distcc[1845] ERROR: compile conftest.c on localhost failed
configure: failed program was:
#line 43958 "configure"
#include "confdefs.h"

    void mm_log(void){}
    void mm_dlog(void){}
    void mm_flags(void){}
    void mm_fatal(void){}
    void mm_critical(void){}
    void mm_nocritical(void){}
    void mm_notify(void){}
    void mm_login(void){}
    void mm_diskerror(void){}
    void mm_status(void){}
    void mm_lsub(void){}
    void mm_list(void){}
    void mm_exists(void){}
    void mm_searched(void){}
    void mm_expunged(void){}
    char mail_newbody();
    int main() {
      mail_newbody();
      return 0;
    }



Expected Results:  
installs happily.

# emerge info
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.5-r0, 2.6.12-gentoo-r5 i686)
=================================================================
System uname: 2.6.12-gentoo-r5 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.6.12
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.8.1-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-tbird -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/wget /etc/env.d"
CXXFLAGS="-O3 -march=athlon-tbird -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks loadpolicy sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex 3dnowext X a52 aac alsa apache1 apm arts artswrappersuid
avi bash-completion berkdb bitmap-fonts cddb cdr chroot crypt cups curl dga
divx4linux dts dv dvd dvdread emboss encode esd exif fame ffmpeg flac flash
freetype gd gdbm gif gimp gimpprint gpm gtk gtk2 hardened imagemagick imap imlib
imlib2 innodb ipv6 ithreads jack jpeg kde lcms ldap libg++ libwww lirc lzo mad
maildir mbox mikmod milter mldonkey mmx mmx2 mmxext mozcalendar moznocompose
mozsvg mp3 mpeg mpeg4 mysql nas ncurses network nls nptl nptlonly offensive ogg
oggvorbis opengl pdflib perl png ppds python qt quicktime readline rtc samba
sasl scanner sdl slang spell ssl subtitles svg svga tcpd theora threads tidy
tiff truetype truetype-fonts type1-fonts usb v4l v4l2 vhosts voodoo3 vorbis
xanim xine xinerama xml xml2 xmms xosd xv xvid yahoo zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-20 10:03:14 UTC
Your c-client lib must be built with the same USE flags as PHP.
As it links against PAM, and if so, PHP must also be linked against PAM.

Rebuild c-client, and then try PHP again.
Comment 2 Mark Mykkanen 2005-07-20 10:23:54 UTC
(In reply to comment #1)
> Your c-client lib must be built with the same USE flags as PHP.
> As it links against PAM, and if so, PHP must also be linked against PAM.
> 
> Rebuild c-client, and then try PHP again.

Thanks!

Is this still an issue with the "equery depends" department?  It did not show
c-client depending on pam.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-20 10:32:41 UTC
yeah, i'd blame equery.
the c-client ebuild clearly has pam in the DEPEND variable.

after turning off PAM, I'd recommend you do things this way:
emerge -C pam pam-login (and any other pam modules you might have)
emerge shadow
emerge -e system
emerge -e world

(yeah, I know the stuff in system is rebuilt twice with this, but there is no 
way to force it to be before world).
Comment 4 Mark Mykkanen 2005-07-20 10:39:29 UTC
(In reply to comment #3)
> yeah, i'd blame equery.
> the c-client ebuild clearly has pam in the DEPEND variable.
> 
> after turning off PAM, I'd recommend you do things this way:
> emerge -C pam pam-login (and any other pam modules you might have)
> emerge shadow
> emerge -e system
> emerge -e world
> 
> (yeah, I know the stuff in system is rebuilt twice with this, but there is no 
> way to force it to be before world).


Emerging the entire system is an overkill for me.  "emerge -N" seems also to be
affected, as it did not show c-client.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-08-12 04:27:08 UTC
*** Bug 188533 has been marked as a duplicate of this bug. ***