On my ~amd64 system, the configure stage of the install for openssh-4.1_p1-r1 fails with: checking for daemon... no checking for daemon in -lbsd... no checking for getpagesize... no checking for getpagesize in -lucb... no checking whether system supports SO_PEERCRED getsockopt... yes checking if openpty correctly handles controlling tty... no checking whether getpgrp requires zero arguments... yes checking for dlopen in -ldl... no checking for pam_set_item in -lpam... no configure: error: *** libpam missing This is for: net-misc/openssh-4.1_p1-r1 [3.9_p1-r2] -X509 -chroot -hpn +ipv6 -kerberos +ldap -libedit +pam (-selinux) -sftplogging -skey -smartcard -static +tcpd The problem goes away if the ldap flag is changed to -ldap. Pertinent section of the configure log: ----------------------------------------- configure:13508: checking for pam_set_item in -lpam configure:13538: x86_64-pc-linux-gnu-gcc -o conftest -march=k8 -O2 -pipe -fweb -ftracer -Wall -Wpointer-arith -Wno-uninitialized conftest.c -lpam -lldap -lutil -lz -lnsl >&5 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libldap.so: undefined reference to `ber_memalloc_x' /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libldap.so: undefined reference to `ber_memvfree_x' /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libldap.so: undefined reference to `ber_memrealloc_x' /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libldap.so: undefined reference to `ber_memcalloc_x' /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libldap.so: undefined reference to `ber_strndup_x' /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libldap.so: undefined reference to `ber_memfree_x' /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libldap.so: undefined reference to `ber_strdup_x' collect2: ld returned 1 exit status configure:13544: $? = 1 emerge info: ------------ Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r6 x86_64) ================================================================= System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.11 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 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -fweb -ftracer" CHOST="x86_64-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/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=k8 -O2 -pipe -fweb -ftracer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/etc/portage/overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X alsa avi berkdb bitmap-fonts cddb cdr crypt cups curl directfb dts dv dvd dvdr dvdread eds emacs encode esd fam fame fbcon ffmpeg firefox foomaticdb gcj gd gdbm gif gpm gstreamer gtk gtk2 ieee1394 imlib ipv6 java jikes jpeg junit libwww lirc live lzw lzw-tiff mad mjpeg mozilla mp3 mpeg ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl pam pdflib perl png python qt quicktime readline real rtc ruby sdl spell ssl tcpd tetex theora tiff truetype-fonts type1-fonts unicode usb userlocales v4l v4l2 vorbis xine xml2 xmms xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Check /usr/local/lib for stale libs (and delete them).
*** This bug has been marked as a duplicate of 94458 ***