Ubuntu 14.04.1 x86 uses wrong library search path order

Bug #1369658 reported by Mark MacVicar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

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.

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1369658/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

I may be wrong on this assignment, but /etc/ld.so.conf.d/i386-linux-gnu.conf is handled by libc6 according to apt-file and Mark suggests that the order of this file is the source of the issue?

affects: ubuntu → eglibc (Ubuntu)
Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

alternatively it might more likely be libegl1-mesa.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.