[blfs-support] make shadow fails after installation of Linux-PAM

Ronnie van Aarle ronnie.van.aarle at gmail.com
Sat Feb 4 05:43:36 PST 2012

Well, I tried, and it seems my assuptions on the libdir= from
libpam_misc.lawas right. I did the same thing again for
libpam.la because libpam.so also was not found.

However, now I ran into a new problem, and I am not sure how to fix it. The
issue now is:

$ ls -lag /usr/lib/libpam{,misc}.so
lrwxrwxrwx 1 blfs 10 feb  3 13:24 /usr/lib/libpam_misc.so -> ../../lib/
lrwxrwxrwx 1 blfs 10 feb  3 13:24 /usr/lib/libpam.so -> ../../lib/

It seems like both symlinks are pointing to the directory ../../lib.

I know some basics on bash, but its still puzzling for me and far from
routine. I thought I might have done something wrong so I went on step
back, unzipped Linux-PAM again and did these steps over:

$ make install
$ chmod -v 4755 /lib/security/unix_chkpwd

I skipped the tests that had to do with *.la because these files are
updated with the new path and allready in place.

$ mv -v /lib/security/pam_tally /sbin

$ if [ -L /lib/libpam.so ]; then
   for LINK in libpam{,c,_misc}.so; do
       ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &&
       rm -v /lib/${LINK}

I do have my doubts on this last if-statement for-loop, because I don't
realy think it does what it is supposed to do. In my situation, I am
building shadow from


So ../../lib does not exist. I suppose that I can just drop the ../../
because I think the /lib/libpam{,c,_misc}.so are the files that are
required. While I'm writing this email I just decided that that is also the
next thing I want to try, however, I would realy appreciate some
confirmation from someone who has more skills and routine in bash than I do.

I'm a bit afreight of deviating from the instructions from the book,
because in the past, with earlier attempts of installing lfs, I also found
issues that forced me to attempt solving things myself and I did end up
with a broken or incomplete build, which is luckily not the case this time.

Besides that I'm also a bit paranoid on every package that has to do with
security, because in the near future I want to make another lfs build that
I want to use for website hosting, and I do need to be able to guarantee my
future users a stable service.

This one is on a notebook, with which I want to develop and test the
applications and configurations that I want to deploy on the next
installation, a server for hosting them.

Any assistance is realy appreciated, because I have to rely on the quality
and stability of the resulting builds in the future.


2012/2/3 Ronnie van Aarle <ronnie.van.aarle at gmail.com>

> $ cat /usr/lib/libpam_misc.la
> # libpam_misc.ls - a libtool library file
> # generated by ltmail.sh (GNU libtool) 2.2.6
> #
> # Please DO NOT delete this file!
> # It is necessary for linking the library
> # The name that we can dlopen(3).
> dlname='libpam_misc.so.0'
> # The name of the static archive.
> old_library=''
> # Linker flags that can not go in dependency_libs
> inherited_linker_flags=''
> # Libraries that this one depends upon.
> dependency_libs=' /usr/lib64/libpam.la -ldl'
> # Names of additional weak libraries provided by this library
> weak_library_names=''
> # Version information for libpam_misc.
> current=82
> age=82
> revision=0
> # Is this an allready installed library?
> installed=yes
> # Should we warn about portability when linking against -modules?
> shouldnotlink=no
> # Files to dlopen/dlpreopen
> dlopen=''
> dlpreopen=''
> # Directory that this library needs to be installed in:
> libdir='/lib64'
> Now I look at this I suppose the last line should be
> libdir='/usr/lib64'
> libpam_misc.la has been moved from /lib to /usr/lib, because of the book
> instructions on Linux-PAM-1.1.5
> mv -v /lib/libpam{,c,_misc}.la /usr/lib &&
> sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la
> And I guess everything would have been allright if the path assigned to
> libdir was prefixed with a leading whitespace.
> Am I right on this?
> 2012/2/3 Andrew Benton <b3nton at gmail.com>
>> On Fri, 3 Feb 2012 14:05:30 +0100
>> Ronnie van Aarle <ronnie.van.aarle at gmail.com> wrote:
>> > Hello
>> >
>> > I'm attempted installing shadow-, however, running make results
>> in
>> >
>> > gcc: error: /lib64/libpam_misc.so: No such file or directory
>> > gcc: error: /lib64/libpam.so: No such file or directory.
>> > etc etc.
>> >
>> > The last step from Linux-PAM is:
>> >
>> > if [ -L /lib/libpam.so ]; then
>> >    for LINK in libpam{,c,_misc}.so; do
>> >        ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &&
>> >        rm -v /lib/${LINK}
>> >    done
>> > fi
>> >
>> > So these files are in another path, /usr/lib. I suppose
>> Where?
>> ls {/usr,}/lib/libpam_misc.so*
>> > I should
>> >
>> > sed -i -e '|/lib64/libpam_misc.so|/usr/lib64/libpam_misc.so' -e \
>> >          -e '|/lib64/libpam.so|/usr/lib64/libpam.so|' <somefile>
>> >
>> > To modify the shadow build scripts in order to point to the right path.
>> > However, I don't know what file, and I'm also not sure how this sed
>> syntax
>> > should be.
>> Looking at the shadow-, it seems that it's libtool
>> that's getting the path from libpam_misc.la. Please post the output from:
>> cat {/usr,}/lib/libpam_misc.la
>> Andy
>> --
>> http://linuxfromscratch.org/mailman/listinfo/blfs-support
>> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
>> Unsubscribe: See the above information page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20120204/c425d19c/attachment.html>

More information about the blfs-support mailing list