[Mesa-dev] [PATCH 1/1] Fix runtime error with uClibc

Bernd Kuhls bernd.kuhls at t-online.de
Sun Mar 15 04:27:36 PDT 2015

Patch inspired by

Starting an app using mesa3d 10.5.x, Kodi for example, fails:

/usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'.
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

Here is some background information about the fminf/fmaxf situation in uClibc:

Please backport this patch to the 10.5 branch.

Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
 src/glsl/nir/nir_constant_expressions.py |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
index 22bc4f0..139c25a 100644
--- a/src/glsl/nir/nir_constant_expressions.py
+++ b/src/glsl/nir/nir_constant_expressions.py
@@ -50,6 +50,18 @@ static double copysign(double x, double y)
+#ifdef __UCLIBC__
+float fmaxf(float a, float b)
+	return (a > b) ? a : b;
+float fminf(float a, float b)
+	return (a < b) ? a : b;
  * Evaluate one component of packSnorm4x8.

More information about the mesa-dev mailing list