This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Append system library paths to environment for testprograms
On Mon, 02 Apr 2012 04:53:21 -0400 (EDT)
David Miller <davem@davemloft.net> wrote:
> From: Siddhesh Poyarekar <siddhesh@redhat.com>
> Date: Mon, 2 Apr 2012 14:20:26 +0530
>
> > I tried overriding slibdir too, but that doesn't seem sufficient.
> > --prefix=/usr seems to be the only thing that works (tested just
> > now), not even /usr/local (the default setting).
>
> Can you determine specifically why /usr works? It's not like
> libgcc_s.so lives in /lib64 or /usr/lib64
One difference is that when you configure with --prefix=/usr, configure
sets slibdir=/lib64 for 64-bit systems:
from configure.in:
case "$prefix" in
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
# Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
# and libc_cv_localedir.
test -n "$libc_cv_slibdir" || \
case $machine in
sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
libc_cv_slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
and you also end up having libdir as /usr/lib64, thus giving the test
cases access to everything they want and more. But I think the key
difference in the way the sysconfdir is written out. With /usr as
prefix, sysconfdir is written out as /etc, which gives access
to /etc/ld.so.cache. Other prefixes end up with ${prefix}/etc and hence
do not have access to the ld.so.cache.
--
Siddhesh