[waffle] ldd libwaffle

Jordan Justen jljusten at gmail.com
Wed Jan 8 16:10:29 PST 2014


On Wed, Jan 8, 2014 at 3:31 PM, Chad Versace
<chad.versace at linux.intel.com> wrote:
> +waffle at lists.freedesktop.org
>
> On Wed, Jan 08, 2014 at 11:35:49AM -0800, Jordan Justen wrote:
>> Chad,
>>
>> What do you see when you use ldd on libwaffle?
>>
>> Since it dlopens libraries, I thought we might not see many libraries
>> in ldd, but I see:
>>
>> $ ldd /usr/lib/x86_64-linux-gnu/libwaffle-1.so.0
>>     linux-vdso.so.1 (0x00007fff1b3fe000)
>>     libEGL.so.1 => /usr/lib/x86_64-linux-gnu/libEGL.so.1 (0x00007f36c9d46000)
>>     libgbm.so.1 => /usr/lib/x86_64-linux-gnu/libgbm.so.1 (0x00007f36c9b3f000)
>>     libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f36c98e0000)
>>     libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f36c96ce000)
>>     libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f36c94c1000)
>>     libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f36c92be000)
>>     libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f36c90bc000)
>>     libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f36c8d81000)
>>     libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f36c8b62000)
>>     libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f36c895e000)
>>     libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f36c8742000)
>>     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f36c8395000)
>>     libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f36c8190000)
>>     libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f36c7f89000)
>>     libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f36c7d7f000)
>>     libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f36c7b7b000)
>>     libwayland-server.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007f36c796b000)
>>     libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f36c775e000)
>>     libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f36c7538000)
>>     libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f36c7325000)
>>     libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f36c7122000)
>>     libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f36c6f1c000)
>>     libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f36c6d04000)
>>     libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f36c6afe000)
>>     libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f36c6800000)
>>     librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f36c65f7000)
>>     /lib64/ld-linux-x86-64.so.2 (0x00007f36ca196000)
>>     libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f36c63ef000)
>>     libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f36c61eb000)
>>     libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f36c5fe5000)
>
>
> You see 31 libs, I see 33. The additional libs in my output are libpcre
> and libgcc_s, most likely pulled in transitively.
>
> $ ldd /usr/lib64/libwaffle-1.so.0.3.90
>         linux-vdso.so.1 =>  (0x00007fff9d1fe000)
>         libEGL.so.1 => /lib64/libEGL.so.1 (0x00007f2343ede000)
>         libgbm.so.1 => /lib64/libgbm.so.1 (0x00007f2343cd6000)
>         libGL.so.1 => /lib64/libGL.so.1 (0x00007f2343a78000)
>         libudev.so.1 => /lib64/libudev.so.1 (0x00007f2343866000)
>         libwayland-client.so.0 => /lib64/libwayland-client.so.0 (0x00007f2343658000)
>         libwayland-egl.so.1 => /lib64/libwayland-egl.so.1 (0x00007f2343456000)
>         libX11-xcb.so.1 => /lib64/libX11-xcb.so.1 (0x00007f2343254000)
>         libX11.so.6 => /lib64/libX11.so.6 (0x00007f2342f18000)
>         libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f2342cfa000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x00007f2342af6000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f23428d9000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007f2342518000)
>         libxcb-dri2.so.0 => /lib64/libxcb-dri2.so.0 (0x00007f2342313000)
>         libxcb-xfixes.so.0 => /lib64/libxcb-xfixes.so.0 (0x00007f234210b000)
>         libxcb-render.so.0 => /lib64/libxcb-render.so.0 (0x00007f2341f02000)
>         libxcb-shape.so.0 => /lib64/libxcb-shape.so.0 (0x00007f2341cfe000)
>         libwayland-server.so.0 => /lib64/libwayland-server.so.0 (0x00007f2341aed000)
>         libglapi.so.0 => /lib64/libglapi.so.0 (0x00007f23418c7000)
>         libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f23416bb000)
>         libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f2341497000)
>         libXext.so.6 => /lib64/libXext.so.6 (0x00007f2341285000)
>         libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007f2341081000)
>         libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f2340e7b000)
>         libxcb-glx.so.0 => /lib64/libxcb-glx.so.0 (0x00007f2340c64000)
>         libXxf86vm.so.1 => /lib64/libXxf86vm.so.1 (0x00007f2340a5e000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007f234075b000)
>         librt.so.1 => /lib64/librt.so.1 (0x00007f2340553000)
>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f234033d000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003bd2400000)
>         libffi.so.6 => /lib64/libffi.so.6 (0x00007f2340134000)
>         libXau.so.6 => /lib64/libXau.so.6 (0x00007f233ff30000)
>         libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f233fccb000)
>
> Waffle directly links against the window system libraries, such as
> libwayland-client, libX11, libxcb. I'd like Waffle to dlopen them, and
> I even began working on it once upon a time, but that work never
> completed. It just never became high priority for me.
>
> Waffle does not, and *should* not, link to any libGL* libraries, because
> Waffle shouldn't depend on any particular GL version installed onto the
> system.
>
> It doesn't link to any libGLES, but it unfortunately does link to libGL.
> I consider that a bug.  It links to libGL because it contains the GLX
> symbols, and I was too lazy at the time to dlsym() the few GLX symbols
> that Waffle uses. That should really get fixed.

I'm trying to figure out what to list as the install dependencies for
libwaffle-1 on debian. I had hoped to not directly depend on many
packages besides libc (and maybe a few more similar 'always installed'
dependencies).

For example, it would be nice to be able to install wflinfo with gbm
support without pulling in X. (Relatedly: apparently libgbm links to
wayland...)

Anyway, it looks like for now I'll just have libwaffle-1 depend on X,
gbm, wayland, etc...

-Jordan


More information about the waffle mailing list