Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98399 - sys-libs/pam-0.78-r2 fail to emerge, linking not done
Summary: sys-libs/pam-0.78-r2 fail to emerge, linking not done
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: PAM Gentoo Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 98760 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-08 14:26 UTC by Forza
Modified: 2005-07-12 05:30 UTC (History)
1 user (show)

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


Attachments
PAM config.log (config.log,78.55 KB, text/plain)
2005-07-08 15:17 UTC, Forza
Details
PAM Make.Rules (Make.Rules,2.83 KB, text/plain)
2005-07-08 15:17 UTC, Forza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forza 2005-07-08 14:26:38 UTC
I initially had the /usr dependency problem like many others has reported. I used their 
fix and now I get a problem with the linking of pam before it finishes the installation.

I have tried to re-emerge libtool, but it did not help.

Reproducible: Always
Steps to Reproduce:


Actual Results:  
make[2]: Leaving directory `/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/
modules/pam_succeed_if'
make[2]: Entering directory `/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/
modules/pam_tally'
mkdir -p ./dynamic
i686-pc-linux-gnu-gcc -Wall -Wwrite-strings     -Wpointer-arith -Wcast-qual -Wcast-align    
-Wstrict-prototypes -Wmissing-prototypes         -Wnested-externs -Winline -Wshadow -
Dlinux -I/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/include -Wl,-L/var/tmp/
portage/pam-0.78-r2/work/Linux-PAM-0.78/lib -O2 -march=pentium3 -fomit-frame-
pointer -pipe -msse -mmmx   -I./include -I/var/tmp/portage/pam-0.78-r2/work/Linux-
PAM-0.78/libpam/include -I/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78 -I/var/
tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/libpamc/include  -fPIC -I../pammodutil/
include -DPAM_DYNAMIC   -c pam_tally.c -o dynamic/pam_tally.o
i686-pc-linux-gnu-gcc: -L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib: linker 
input file unused because linking not done
pam_tally.c: In function `tally_bump':
pam_tally.c:334: warning: dereferencing type-punned pointer will break strict-aliasing 
rules
pam_tally.c:337: warning: dereferencing type-punned pointer will break strict-aliasing 
rules
i686-pc-linux-gnu-gcc: -L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib: linker 
input file unused because linking not done
gcc -shared -L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib  -o pam_tally.so 
dynamic/pam_tally.o -L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib  -L../
pammodutil -lpammodutil -L../../libpam -lpam
i686-pc-linux-gnu-gcc -Wall -Wwrite-strings     -Wpointer-arith -Wcast-qual -Wcast-align    
-Wstrict-prototypes -Wmissing-prototypes         -Wnested-externs -Winline -Wshadow -
Dlinux -I/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/include -Wl,-L/var/tmp/
portage/pam-0.78-r2/work/Linux-PAM-0.78/lib -O2 -march=pentium3 -fomit-frame-
pointer -pipe -msse -mmmx   -I./include -I/var/tmp/portage/pam-0.78-r2/work/Linux-
PAM-0.78/libpam/include -I/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78 -I/var/
tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/libpamc/include  -fPIC -I../pammodutil/
include -DPAM_DYNAMIC   -c pam_tally_app.c -o dynamic/pam_tally_app.o
i686-pc-linux-gnu-gcc: -L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib: linker 
input file unused because linking not done
i686-pc-linux-gnu-gcc: -L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib: linker 
input file unused because linking not done
i686-pc-linux-gnu-gcc -Wall -Wwrite-strings     -Wpointer-arith -Wcast-qual -Wcast-align    
-Wstrict-prototypes -Wmissing-prototypes         -Wnested-externs -Winline -Wshadow -
Dlinux -I/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/include -Wl,-L/var/tmp/
portage/pam-0.78-r2/work/Linux-PAM-0.78/lib -O2 -march=pentium3 -fomit-frame-
pointer -pipe -msse -mmmx   -I./include -I/var/tmp/portage/pam-0.78-r2/work/Linux-
PAM-0.78/libpam/include -I/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78 -I/var/
tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/libpamc/include  -fPIC -I../pammodutil/
include -o pam_tally dynamic/pam_tally_app.o -L/var/tmp/portage/pam-0.78-r2/work/
Linux-PAM-0.78/lib  -L../pammodutil -lpammodutil -L../../libpam -lpam
../../libpam/libpam.so: undefined reference to `dlerror'
../../libpam/libpam.so: undefined reference to `dlclose'
../../libpam/libpam.so: undefined reference to `dlopen'
../../libpam/libpam.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[2]: *** [pam_tally] Error 1
make[2]: Leaving directory `/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/
modules/pam_tally'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/
modules'
make: *** [modules] Error 2

!!! ERROR: sys-libs/pam-0.78-r2 failed.
!!! Function src_compile, Line 272, Exitcode 2
!!! PAM build failed


Expected Results:  
Clean build

ortage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3, glibc-2.3.5-r0, 2.6.12-mm2 i686)
===================================================
==============
System uname: 2.6.12-mm2 i686 Pentium III (Katmai)
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Jun  5 2005, 23:39:59)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.5, 1.9.5
sys-devel/binutils:  2.16-r1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe -msse -mmmx"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/
share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/
qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe -msse -mmmx"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages sandbox sfperms 
strict"
GENTOO_MIRRORS="http://ftp.sunet.se/pub/Linux/distributions/gentoo ftp://ftp.ipv6.uni-
muenster.de/pub/linux/distributions/gentoo ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.
uninett.no/pub/linux/Gentoo http://ds.thn.htu.se/linux/gentoo http://mirror.pudas.net/
gentoo ftp://mirror.pudas.net/gentoo"
LANG="en_GB.utf8"
LC_ALL="en_GB.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage_overlay"
SYNC="rsync://vlaai.snt.ipv6.utwente.nl/gentoo-portage"
USE="x86 X aavm accessibility acpi apache2 artworkextra avi bcmath berkdb bitmap-
fonts bzip2 bzlib calendar cdr crypt ctype curl dba dio eds emboss encode esd exif 
extensions fam flac flash foomaticdb fortran ftp gd gdbm gif gmp gnome gnutls gpm 
gstreamer gtk gtk2 gtkhtml hal howl imap imlib ipv6 jabber java javascript jce jpeg junit 
ldap libg++ libwww mad maildir mhash mikmod mime ming mmx motif mozilla mp3 
mpeg msn mysql ncurses nls nntp nptl nptlonly ogg oggvorbis opengl oscar pam pcntl 
pcre pdflib perl php pic png posix python qt quicktime readline samba sasl sdl session 
shared sharedmem simplexml slang sockets spell spl sse ssh ssl svg svga tcltk tcpd 
threads tidy tiff truetype truetype-fonts type1-fonts unicode vorbis xml xml2 xmlrpc 
xmms xprint xsl xv yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, LINGUAS
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-08 14:56:37 UTC
Please attach config.log and Make.Rules from
/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/.
Comment 2 Forza 2005-07-08 15:17:19 UTC
Created attachment 62966 [details]
PAM config.log
Comment 3 Forza 2005-07-08 15:17:52 UTC
Created attachment 62967 [details]
PAM Make.Rules
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-08 15:36:57 UTC
Ok, your problems is probably that you do not have a /usr/lib/libdl.so symlink ...

I have:

------
$ ls -l /usr/lib/libdl*
-rw-r--r--  1 root root 13602 Jun 18 18:45 /usr/lib/libdl.a
lrwxrwxrwx  1 root root    22 Jun 18 18:48 /usr/lib/libdl.so ->
../../lib64/libdl.so.2
-rw-r--r--  1 root root 49402 Jun 18 18:45 /usr/lib/libdl_g.a
------
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-08 15:38:01 UTC
On amd64 though .. so you need to:

  # ln -s ../../lib/libdl.so.2 /usr/lib/libdl.so

(and not lib64 ...) if you do not have it ...
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-08 15:40:23 UTC
PS: why I say so, is because the ./configure libdl tests fails like so:

-----
configure:3766: checking for dlopen in -ldl
configure:3796: i686-pc-linux-gnu-gcc -o conftest
-I/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/include
-Wl,-L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib -O2 -march=pentium3
-fomit-frame-pointer -pipe -msse -mmmx 
-L/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/lib  conftest.c -ldl   >&5
/var/tmp/portage/pam-0.78-r2/temp/ccFK3Qlv.o: In function `main':
conftest.c:(.text+0xd): warning: Using 'dlopen' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
/usr/lib/gcc/i686-pc-linux-gnu/4.0.1-pre20050616/../../../libdl.a(dlopen.o): In
function `dlopen':
dlopen.c:(.text+0x1b): undefined reference to `__dlopen'
collect2: ld returned 1 exit status
-----

From above you can see it tries to link to the static library (libdl.a) and not
the dynamic one, and this usually is with newer compilers when you have the
.so's in /lib, and the .a in /usr/lib without a symlink or linker script in
/usr/lib - bug #4411 
Comment 7 Forza 2005-07-08 15:44:09 UTC
>Ok, your problems is probably that you do not have a /usr/lib/libdl.so symlink ...

No. I did have that before and it would cause an error as reported by others: https://
bugs.gentoo.org/show_bug.cgi?id=85069

Hm maybe it was libdl.so.2 and not libdl.so
Comment 8 Forza 2005-07-08 16:13:12 UTC
I tried the symlink to /lib/libdl.so.2:




make[2]: Entering directory `/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/
modules/pam_xauth'
mkdir -p ./dynamic
mkdir -p /var/tmp/portage/pam-0.78-r2/image//lib/security
/bin/install -c -m 755 pam_xauth.so /var/tmp/portage/pam-0.78-r2/image//lib/security
test -d /var/tmp/portage/pam-0.78-r2/image//usr/share/man/man8 || mkdir -p /var/tmp/
portage/pam-0.78-r2/image//usr/share/man/man8
/bin/install -c -m 644 pam_xauth.8 /var/tmp/portage/pam-0.78-r2/image//usr/share/
man/man8/
make[2]: Leaving directory `/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/
modules/pam_xauth'
make[1]: Leaving directory `/var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/
modules'
 * Checking if all modules were built...

 * ERROR: pam_cracklib have dependencies in /usr.


!!! ERROR: sys-libs/pam-0.78-r2 failed.
!!! Function src_install, Line 307, Exitcode 0
!!! pam_cracklib have dependencies in /usr.
Comment 9 Forza 2005-07-08 16:17:31 UTC
in /var/tmp/portage/pam-0.78-r2/work/Linux-PAM-0.78/modules/pam_cracklib

# ldd pam_cracklib.so
        linux-gate.so.1 =>  (0xffffe000)
        libcrack.so.2 => /usr/lib/libcrack.so.2 (0xb7f8c000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7f5e000)
        libc.so.6 => /lib/libc.so.6 (0xb7e29000)
        libpam.so.0 => /lib/libpam.so.0 (0xb7e21000)
        /lib/ld-linux.so.2 (0x80000000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7e1d000)
Comment 10 Forza 2005-07-08 16:34:08 UTC
Ok I fixed it. It was cracklib that had duplicates of its libraries in both /lib and /usr/lib

I removed both sets and re-emerged cracklib and it fixed things =). Thanks for your 
quick help
Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-08 16:45:28 UTC
Hmm, yeah, if it was /usr/libdl.so.2, then it was wrong.  You should however
have the /usr/lib/libdl.so symlink, and a /usr/lib/libc.so _linker_script_, and
not a /usr/lib/libc.so.* ...

-----
lycan ~ # ls -l /usr/lib/libc.so*
-rwxr-xr-x  1 root root 253 Jun 18 18:45 /usr/lib/libc.so
lycan ~ # cat /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a  AS_NEEDED (
/lib64/ld-linux-x86-64.so.2 ) )
lycan ~ #
-----

(once again, it will be lib, and not lib64 for you ...)
Comment 12 Forza 2005-07-08 16:54:39 UTC
(In reply to comment #11)
>... and a /usr/lib/libc.so _linker_script_, and not a /usr/lib/libc.so.* ...


# ls -l /usr/lib/libc.so*
-rwxr-xr-x  1 root root    204 Jun 18 13:08 /usr/lib/libc.so
-rwxr-xr-x  1 root root 580404 Jan 23 18:54 /usr/lib/libc.so.5

# equery b /usr/lib/libc.so.5
sys-libs/lib-compat-1.4 (/usr/lib/libc.so.5)


I suppose I can leave it there? The libc.so is indeed a linker-script as you said:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-08 17:00:59 UTC
My p4 dev box is currently not up, but if I remember it should be fine .. just
check that ldd /bin/bash (or whatever) shows /lib/libc.so.6, and it should be fine.
Comment 14 Forza 2005-07-08 17:14:13 UTC
(In reply to comment #13)
> My p4 dev box is currently not up, but if I remember it should be fine .. just
> check that ldd /bin/bash (or whatever) shows /lib/libc.so.6, and it should be fine.
> 

It does. Thank you. Everything seem to be in perfect working order now :) Have a nice 
weekend.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2005-07-12 05:30:21 UTC
*** Bug 98760 has been marked as a duplicate of this bug. ***