public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/15006] New: Libraries in ld.so.cache ignored by ld-linux-armhf.so.3 on armv6l
@ 2013-01-09  0:50 lfs4pi at gmail dot com
  2013-01-09  0:51 ` [Bug dynamic-link/15006] " lfs4pi at gmail dot com
                   ` (32 more replies)
  0 siblings, 33 replies; 34+ messages in thread
From: lfs4pi at gmail dot com @ 2013-01-09  0:50 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15006

             Bug #: 15006
           Summary: Libraries in ld.so.cache ignored by
                    ld-linux-armhf.so.3 on armv6l
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
        AssignedTo: unassigned@sourceware.org
        ReportedBy: lfs4pi@gmail.com
    Classification: Unclassified


I build Linux From Scratch systems for the Raspberry Pi and completed a new
build where glibc 2.16 has been replaced by glibc 2.17.

The system runs great in general except for a peculiar behavior of the dynamic
runtime linker to ignore needed libraries, in non-standard locations, that are
clearly in ld.so.cache.

As an example I will try to execute a binary that depends on two libraries,
that I compiled myself, located in /opt/vc/lib:

[root@0] [/] cd /opt/vc/bin
[root@0] [/opt/vc/bin] ./vcgencmd measure_temp
./vcgencmd: error while loading shared libraries: libvcos.so: cannot open
shared object file: No such file or directory

Let's verify with ldd:

[root@0] [/opt/vc/bin] ldd vcgencmd
        libvcos.so => not found
        libvchiq_arm.so => not found
        libpthread.so.0 => /lib/libpthread.so.0 (0xb6f4f000)
        libdl.so.2 => /lib/libdl.so.2 (0xb6f44000)
        librt.so.1 => /lib/librt.so.1 (0xb6f35000)
        libc.so.6 => /lib/libc.so.6 (0xb6e03000)
        /lib/ld-linux-armhf.so.3 (0xb6f6e000)

But it's in the cache!
[root@0] [/opt/vc/bin] cat /etc/ld.so.conf
/opt/vc/lib
[root@0] [/opt/vc/bin] rm /etc/ld.so.cache
[root@0] [/opt/vc/bin] ldconfig -v | grep vcos
        libvcos.so -> libvcos.so
[root@0] [/opt/vc/bin] ldconfig -p | grep vcos
        libvcos.so (libc6) => /opt/vc/lib/libvcos.so

Using LD_LIBRARY_PATH, it works:
[root@0] [/opt/vc/bin] LD_LIBRARY_PATH=/opt/vc/lib ./vcgencmd measure_temp
temp=50.8'C

A debug output, where it at least seems to look at ld.so.cache:
[root@0] [/opt/vc/bin] LD_DEBUG=libs ./vcgencmd
       522:     find library=libvcos.so [0]; searching
       522:      search cache=/etc/ld.so.cache
       522:      search
path=/lib/tls/v6l/vfp:/lib/tls/v6l:/lib/tls/vfp:/lib/tls:/lib/v6l/vfp:/lib/v6l:/lib/vfp:/lib:/usr/lib/tls/v6l/vfp:/usr/lib/tls/v6l:/usr/lib/tls/vfp:/usr/lib/tls:/usr/lib/v6l/vfp:/usr/lib/v6l:/usr/lib/vfp:/usr/lib
           (system search path)
       522:       trying file=/lib/tls/v6l/vfp/libvcos.so
       522:       trying file=/lib/tls/v6l/libvcos.so
       522:       trying file=/lib/tls/vfp/libvcos.so
       522:       trying file=/lib/tls/libvcos.so
       522:       trying file=/lib/v6l/vfp/libvcos.so
       522:       trying file=/lib/v6l/libvcos.so
       522:       trying file=/lib/vfp/libvcos.so
       522:       trying file=/lib/libvcos.so
       522:       trying file=/usr/lib/tls/v6l/vfp/libvcos.so
       522:       trying file=/usr/lib/tls/v6l/libvcos.so
       522:       trying file=/usr/lib/tls/vfp/libvcos.so
       522:       trying file=/usr/lib/tls/libvcos.so
       522:       trying file=/usr/lib/v6l/vfp/libvcos.so
       522:       trying file=/usr/lib/v6l/libvcos.so
       522:       trying file=/usr/lib/vfp/libvcos.so
       522:       trying file=/usr/lib/libvcos.so
       522:    
./vcgencmd: error while loading shared libraries: libvcos.so: cannot open
shared object file: No such file or directory

I don't have the time and probably not the skills necessary for a lengthy gdb
session, but if I had to guess I'd point to the recent changes in
ports/sysdeps/unix/sysv/linux/arm as a possible clue.

Apart from ld-linux-armhf.so.3, there's also a ld-linux.so.3 compatibility
symlink. Not sure if that could play a part in this.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2014-06-13 18:54 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-09  0:50 [Bug dynamic-link/15006] New: Libraries in ld.so.cache ignored by ld-linux-armhf.so.3 on armv6l lfs4pi at gmail dot com
2013-01-09  0:51 ` [Bug dynamic-link/15006] " lfs4pi at gmail dot com
2013-01-09 13:55 ` steve.mcintyre at linaro dot org
2013-01-09 14:39 ` lfs4pi at gmail dot com
2013-01-09 14:49 ` steve.mcintyre at linaro dot org
2013-01-09 15:03 ` lfs4pi at gmail dot com
2013-01-09 15:46 ` steve.mcintyre at linaro dot org
2013-01-09 16:02 ` lfs4pi at gmail dot com
2013-01-09 16:04 ` lfs4pi at gmail dot com
2013-01-09 16:06 ` lfs4pi at gmail dot com
2013-01-10  0:33 ` jplum at archlinuxarm dot org
2013-01-10 11:22 ` steve.mcintyre at linaro dot org
2013-01-10 11:29 ` steve.mcintyre at linaro dot org
2013-01-10 12:37 ` lfs4pi at gmail dot com
2013-01-10 13:50 ` steve.mcintyre at linaro dot org
2013-01-10 14:41 ` jplum at archlinuxarm dot org
2013-01-11  4:01 ` kevin at archlinuxarm dot org
2013-01-11 18:23 ` steve.mcintyre at linaro dot org
2013-01-11 18:36 ` jplum at archlinuxarm dot org
2013-01-11 18:41 ` lfs4pi at gmail dot com
2013-01-11 22:16 ` lfs4pi at gmail dot com
2013-01-13 20:30 ` lfs4pi at gmail dot com
2013-01-23 18:25 ` steve.mcintyre at linaro dot org
2013-01-23 20:08 ` kevin at archlinuxarm dot org
2013-01-23 20:31 ` joseph at codesourcery dot com
2013-01-27 19:45 ` pbrobinson at gmail dot com
2013-01-28 20:02 ` carlos at systemhalted dot org
2013-01-29 16:57 ` fedux at lugmen dot org.ar
2013-02-06 19:52 ` carlos at redhat dot com
2013-02-07  5:14 ` carlos at redhat dot com
2013-02-08 17:33 ` carlos at redhat dot com
2014-02-16 19:41 ` jackie.rosen at hushmail dot com
2014-05-28 19:42 ` schwab at sourceware dot org
2014-06-13 18:54 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).