Wind River Support Network

HomeDefectsLIN5-17866
Fixed

LIN5-17866 : /etc/ld.so.cache is empty for 64bit targets. (ldconfig is not looking in /lib64 and /usr/lib64)

Created: Jan 20, 2014    Updated: Dec 19, 2017
Resolved Date: May 6, 2014
Found In Version: 5.0.1.10
Fix Version: 5.0.1.15
Severity: Standard
Applicable for: Wind River Linux 5
Component/s: Build & Config

Description

As part of the "do_rootfs" step of an image build, ldconfig is run to update the /etc/ld.so.cache file.
This works good for a 32-bit build, but for a 64bit it produces an almost empty file.
This is because ldconfig is only looking in /lib and /usr/lib, but for 64bit builds the libraries are in /lib64 and /usr/lib64.

This causes problems for example when libraries or application uses dlopen.
libc is one such case that will fail in some cases when it cannot find a shared library.

For majority of programs this will not be noticed, but never the less it does cause problems.

( The code that calls ldconfig is in oe-core/meta/classes/image.bbclass)

Workaround

After booting the target a 'ldconfig' will correctly create the cache.

Steps to Reproduce

Build a 32bit image and look at the size of /etc/ld.so.cache (also see in the do_rootfs bitbake log file) to see that it indeed is looking good.
Do the same for a 64bit build and see that the file is more or less empty.
(Seen comparing inte-xeon-core to a p4080 32bit build, but also just comparing inte-xeon-core 32 <> 64bit)

Ex: 
configure --enable-board=intel-xeon-core --enable-kernel=standard --enable-rootfs=glibc_small
configure --enable-board=intel-xeon-core-32 --enable-kernel=standard --enable-rootfs=glibc_small

Other Downloads


Live chat
Online