Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 866425 - media-libs/mesa-amber-21.3.9 install broken
Summary: media-libs/mesa-amber-21.3.9 install broken
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
Depends on:
Reported: 2022-08-24 22:20 UTC by acmondor
Modified: 2023-01-15 23:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

Patch for missing __driDriverGetExtensions_i915c symbol (driDriverGetExtensions_i915c.patch,1.94 KB, patch)
2022-08-24 22:20 UTC, acmondor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description acmondor 2022-08-24 22:20:11 UTC
Created attachment 800902 [details, diff]
Patch for missing __driDriverGetExtensions_i915c symbol

I've been trying to get media-libs/mesa-amber working on an older laptop and ran into a few issues. First of all, it seems the only way to get a system to actually use the installed libraries of the media-libs/mesa-amber package is with a couple environment variables:


The first one, __GLX_VENDOR_LIBRARY_NAME, doesn't seem to have any official documentation other than the libglvnd code that actually uses it[1] and various
forum posts[2].


The second, MESA_LOADER_DRIVER_OVERRIDE, is documented on the mesa website[1].


For my laptop I'm using the following:


The above are set via a new file called /etc/env.d/99mesa-amber-env.

The first, __GLX_VENDOR_LIBRARY_NAME, does force the system to use libGLX from the amber package (eg /usr/lib/ However, I had to patch media-libs/mesa-amber to get the second one, MESA_LOADER_DRIVER_OVERRIDE, to work. A patch is required because the existing media-libs/mesa-amber ebuild renames /usr/lib/dri/ to /usr/lib/dri/, which breaks the file and symbol naming convention expected by the mesa driver loader code.

When MESA_LOADER_DRIVER_OVERRIDE="i915c" is used without my patch, the driver cannot be loaded. By adding the additional environment variable LIBGL_DEBUG="verbose" the following info is reported:

  MESA-LOADER: dlopen(/usr/lib/dri/
  MESA-LOADER: driver does not expose __driDriverGetExtensions_i915c(): /usr/lib/dri/ undefined symbol: __driDriverGetExtensions_i915c
  MESA-LOADER: dlopen(/usr/lib/dri/

What that says is that mesa is expecting to find a symbol in the driver file that matches its name, __driDriverGetExtensions_i915c, and when it doesn't it aborts the loading of that file and defaults to I managed to address this by creating a patch which adds that missing symbol, __driDriverGetExtensions_i915c, see attached.

The patch just clones the code for the _driDriverGetExtensions_i915 symbol. The patch would have been simpler had I just renamed _driDriverGetExtensions_i915 to _driDriverGetExtensions_i915c, but I wasn't sure if there would be any implications to that.

Might it make sense to create an ebuild to includes the above mentioned work arounds?
Comment 1 Matt Turner gentoo-dev 2022-08-25 00:55:14 UTC
Interesting, thanks for testing. You appear to be the first person to have tried it :)
Comment 2 jannis 2023-01-15 23:23:21 UTC
I was bit by this as well. Thanks for investigating and fixing!

In the end, I returned to llvmpipe since the i915 only supports OpenGL 1.3 and some software just doesn't work with that :/