Bug#466790: libGL.so.1.2 hardcodes /usr/lib/dri which breaks in ia32-libs
Michel Dänzer <firstname.lastname@example.org> writes:
> On Fre, 2011-02-11 at 00:30 +0100, Javier Serrano Polo wrote:
>> I've been using this for lenny:
>> diff -Nru mesa-7.0.3.orig/configs/debian-dri-default mesa-7.0.3/configs/debian-d
>> --- mesa-7.0.3.orig/configs/debian-dri-default 2010-07-08 20:32:49.000000000 +0200
>> +++ mesa-7.0.3/configs/debian-dri-default 2010-07-08 20:33:17.000000000 +0200
>> @@ -15,8 +15,9 @@
>> LIB_DIR = lib/glx
>> +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
>> DRI_DRIVER_INSTALL_DIR = $(INSTALL_DIR)/lib/dri
>> -DRI_DRIVER_SEARCH_DIR = /usr/lib/dri
>> +DRI_DRIVER_SEARCH_DIR = /usr/lib/$(DEB_HOST_GNU_TYPE)/dri:/usr/lib/dri
>> DRI_DIRS = mach64 mga r128 r200 r300 radeon s3v savage tdfx trident
>> You may want to use /usr/lib$(BITS)/dri:/usr/lib/dri instead.
> Yeah, AFAICT DEB_HOST_GNU_TYPE wouldn't help on amd64 at least.
Why? The 32bit libGL then looks in /usr/lib/i486-linux-gnu/dri on amd64.
That is where the files belong under multiarch.
> I'd also recommend keeping /usr/lib/dri first in the path, so native
> apps can succeed on the first lookup.
But then the non native arch would also always look there first and find
the wrong plugins and fail to load them. Hopefully they then would keep
searching and find the right plugin as second try but that requires
extra logic in the source. Better to search the specific dir first and
then fallback to the common dir. It is not like the extra stat() will
slow things down noticeably.