← Back to team overview

touch-packages team mailing list archive

[Bug 1369658] [NEW] Ubuntu 14.04.1 x86 uses wrong library search path order

 

You have been subscribed to a public bug:

Ubuntu 14.04.1 x86 uses wrong library search path order

I was trying to link an app against /usr/lib/i386-linux-gnu/libEGL.so.1, but at runtime it kept finding /usr/lib/i386-linux-gnu/mesa-egl/libEGL.so.1. This is fixable several ways (including using -rpath or LD_LIBRARY_PATH), but I thought there might be something odd with the default library search order. I noticed the the search order defined by /etc/ld.so.conf causes 
/usr/lib/i386-linux-gnu/mesa-egl to be searched before /usr/lib/i386-linux-gnu, because /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf is found before /etc/ld.so.conf.d/i686-linux-gnu.conf. 

Suggested solutions (caveat: I don't fully understand why something things are named i386-* vs i686-*. ):
1. rename /etc/ld.so.conf.d/i686-linux-gnu.conf to /etc/ld.so.conf.d/i386-linux-gnu.conf, it would work as I expect and the linker would search /usr/lib/i386-linux-gnu before /usr/lib/i386-linux-gnu/mesa-egl
2. move the search path for /usr/lib/i386-linux-gnu from /etc/ld.so.conf.d/i686-linux-gnu.conf into a new /etc/ld.so.conf.d/i386-linux-gnu.conf
3. rename /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf to /etc/ld.so.conf.d/i686-linux-gnu_EGL.conf


> more /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

> more /etc/ld.so.conf.d/*.conf
::::::::::::::
/etc/ld.so.conf.d/fakeroot-i386-linux-gnu.conf
::::::::::::::
/usr/lib/i386-linux-gnu/libfakeroot
::::::::::::::
/etc/ld.so.conf.d/i386-linux-gnu_EGL.conf
::::::::::::::
/usr/lib/i386-linux-gnu/mesa-egl
::::::::::::::
/etc/ld.so.conf.d/i386-linux-gnu_GL.conf
::::::::::::::
/usr/lib/i386-linux-gnu/mesa
::::::::::::::
/etc/ld.so.conf.d/i686-linux-gnu.conf
::::::::::::::
# Multiarch support
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/lib/i686-linux-gnu
/usr/lib/i686-linux-gnu
::::::::::::::

14.04 x86_64 doesn't have this issue because the conf file names all
start with x86_64* and are read in the expected order.

** Affects: eglibc (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bot-comment
-- 
Ubuntu 14.04.1 x86 uses wrong library search path order
https://bugs.launchpad.net/bugs/1369658
You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to eglibc in Ubuntu.