Bug 6798 - shlibs failing to add dependencies for some .so files
Summary: shlibs failing to add dependencies for some .so files
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium+ normal
Target Milestone: 1.7 M4
Assignee: Khem Raj
QA Contact: Mihail Stanciu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-04 18:39 UTC by Khem Raj
Modified: 2015-04-28 14:19 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2014-10-04 18:39:22 UTC
I am seeing a change in dependency list for libegl-gallium in master w.r.t 1.6 and see
that on master libllvm3.3-llvm-3.3 has gone missing but the .so is
there in DT_NEEDED section of egl_gallium.so.


i586-rdk-linux/mesa/2_10.1.3-r0/packages-split/libegl-gallium/usr/lib/egl$
readelf -d egl_gallium.so


Dynamic section at offset 0x699394 contains 38 entries:

  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libEGL.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgbm.so.1]
 0x00000001 (NEEDED)                     Shared library: [libudev.so.1]
 0x00000001 (NEEDED)                     Shared library: [librt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libglapi.so.0]
 0x00000001 (NEEDED)                     Shared library: [libdrm_nouveau.so.2]
 0x00000001 (NEEDED)                     Shared library: [libdrm_radeon.so.1]
 0x00000001 (NEEDED)                     Shared library: [libdrm.so.2]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000001 (NEEDED)                     Shared library: [libLLVM-3.3.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x0000000e (SONAME)                     Library soname: [egl_gallium.so]



 The special thing about libllvm3.3-llvm-3.3 is that
it has libraries which end with .so and is a symlink
the one in /usr/lib is a symlink to real .so with is in /usr/lib/llvm3.3

PV = 3.3
PR = r0
RPROVIDES =
RDEPENDS = glibc (>= 2.20) libgcc (>= 4.9.1) libstdc++ (>= 4.9.1)
llvm3.3 zlib (>= 1.2.8)
RRECOMMENDS =
PKGSIZE = 18250362
FILES = /usr/lib/libLLVM-3.3.so /usr/lib/llvm3.3/.debug/libLLVM-3.3.so
/usr/lib/llvm3.3/libLLVM-3.3.so
FILELIST = /usr/lib/libLLVM-3.3.so /usr/lib/llvm3.3/libLLVM-3.3.so


Daisy

"libegl-gallium" -> "libc6";
"libegl-gallium" -> "libdrm-nouveau2";
"libegl-gallium" -> "libdrm-radeon1";
"libegl-gallium" -> "libdrm2";
"libegl-gallium" -> "libegl-mesa";
"libegl-gallium" -> "libgbm1";
"libegl-gallium" -> "libgcc1";
"libegl-gallium" -> "libglapi0";
"libegl-gallium" -> "libllvm3.3-llvm-3.3"; <================
"libegl-gallium" -> "libstdc++6";
"libegl-gallium" -> "libudev1";
"libegl-gallium" -> "libz1";


master


"libegl-gallium" -> "libc6";
"libegl-gallium" -> "libdrm-nouveau2";
"libegl-gallium" -> "libdrm-radeon1";
"libegl-gallium" -> "libdrm2";
"libegl-gallium" -> "libegl-mesa";
"libegl-gallium" -> "libgbm1";
"libegl-gallium" -> "libgcc1";
"libegl-gallium" -> "libglapi0";
"libegl-gallium" -> "libstdc++6";
"libegl-gallium" -> "libudev1";
"libegl-gallium" -> "libz1";


To reproduce it you need to add meta-oe to layermix and then

MACHINE=qemux86 bitbake mesa

Let me know if more info it needed.
Comment 1 Khem Raj 2014-10-09 00:49:04 UTC
What I see is this

DEBUG: calculating shlib provides for libllvm3.3-llvm-3.3
DEBUG: registering libllvm3.3-llvm-3.3-3.3 as shlib provider for libLLVM-3.3.so
DEBUG: LIBNAMES: pkg libllvm3.3-llvm-3.3 sonames [('libLLVM-3.3.so', '/usr/lib/llvm3.3', '3.3')]

Actually there is a symlink to libLLVM-3.3.so in /usr/lib which points to libLLVM-3.3.so in /usr/lib/llvm3.3

Both .so file as well as symlink is packaged into libllvm3.3-llvm-3.3

and when I look at package logs of mesa it says

NOTE: Couldn't find shared library provider for libLLVM-3.3.so, used by files: /home/ubuntu/work/dizzy/build-qemux86/tmp/work/i586-rdk-linux/mesa/2_10.1.3-r0/packages-split/libegl-gallium/usr/lib/egl/egl_gallium.so

is it because its looking for libLLVM-3.3.so in /lib and /usr/lib only ?
Comment 2 Khem Raj 2014-10-09 00:52:11 UTC
its happening after

commit 48b9ecd5335f63fb2bcc47c4b23d067122734fe9
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Mon Jul 7 18:40:55 2014 +0100

    package.bbclass: Rewrite shlib_provider handling to include RPATH
    
    Change the do_package shlibs code to account for RPATHS. This means that
    for library dependency purposes, only libraries in system paths or in
    any declared RPATH will be seen. This is important to resolve problems
    people have been having where similarly named libraries in "private"
    paths were conflicting, e.g. with gstreamer.
    
    For now this code assumes the default search path is libdir and
    base_libdir and places ASSUME_SHLIBS in libdir so they are searched by
    default.
    
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 3 Khem Raj 2014-10-09 05:41:02 UTC
A potential fix is posted for review

http://lists.openembedded.org/pipermail/openembedded-core/2014-October/097802.html
Comment 5 Ionut Chisanovici 2014-10-15 11:59:29 UTC
Hi guys,

I tried to verify this issue but couldn't find anything in the ~/work/poky/build/tmp/work/i586-poky-linux/mesa/2_10.1.3-r0/packages-split/libegl-gallium folder

~/work/poky/build/tmp/work/i586-poky-linux/mesa/2_10.1.3-r0/packages-split/libegl-gallium$ ll
drwxr-xr-x  2 ionut ionut 4096 Oct 15 13:15 .
drwxr-xr-x 33 ionut ionut 4096 Oct 15 13:15 ..

There is no usr/lib/ folder.

The build I made had:
MACHINE ?= "qemux86"
meta-openembedded/meta-oe layer in bblayer.conf
Latest masters for both poky and meta-oe.

bitbake mesa

Should I test this in another way ?

Cheers,
Ionut C
Comment 6 Ionut Chisanovici 2014-10-20 14:39:25 UTC
Reopened as I need more infos on how to test this.

Thanks,
Ionut C
Comment 7 Ionut Chisanovici 2014-10-20 14:40:10 UTC
.
Comment 8 Khem Raj 2014-10-20 15:42:31 UTC
(In reply to comment #5)
> Hi guys,
> 
> I tried to verify this issue but couldn't find anything in the
> ~/work/poky/build/tmp/work/i586-poky-linux/mesa/2_10.1.3-r0/packages-split/
> libegl-gallium folder
> 
> ~/work/poky/build/tmp/work/i586-poky-linux/mesa/2_10.1.3-r0/packages-split/
> libegl-gallium$ ll
> drwxr-xr-x  2 ionut ionut 4096 Oct 15 13:15 .
> drwxr-xr-x 33 ionut ionut 4096 Oct 15 13:15 ..
> 
> There is no usr/lib/ folder.
> 
> The build I made had:
> MACHINE ?= "qemux86"
> meta-openembedded/meta-oe layer in bblayer.conf
> Latest masters for both poky and meta-oe.
> 
> bitbake mesa
> 
> Should I test this in another way ?

In the description its pretty clear I guess what the problem is and how it can be verified.

Please check the build history before and after this fix and especially for libegl-gallium you will see libllvm3.3-llvm-3.3 will appear in dependencies after the patch where as it will be missing before the patch.


> 
> Cheers,
> Ionut C
Comment 9 Saul Wold 2014-10-20 22:52:26 UTC
Bug is resolved
Comment 10 Mihail Stanciu 2015-04-28 14:19:32 UTC
Verified on master: ae736dbdd140975ba43f06e635b461dbf36a117e