334.16: if install libEGL.so,x.y.z, stop build mesa libs

Hi

if install libEGL.so.x.y.z provides from nvidia-334.16 and try rebuild mesa-10.0.3, stop build

http://sl1pkn07.no-ip.com/paste/view/c5a780ee

but if have installed libEGL.so from mesa (distro package), build OK

steps:

install distro mesa-10.0.3 (make sure have build with EGL support)
install nvidia-334.16 and make sure have install libEGL.so.x.y.z from nvidia package
try build mesa-10.0.3 with this options http://sl1pkn07.no-ip.com/paste/view/fad5abee (fail in make install step)

greetings

any notice of this?

Don’t build anything against propritary libs.
Use a clean chroot.

but why? only fail with EGL, with GLES from nvidia and EGL from mesa build OK

Because do so, it’s a dirty work.

Probably want to set e.g.:

export LD_LIBRARY_PATH="$SOURCE_DIRECTORY:$LD_LIBRARY_PATH"
export CFLAGS="-L$SOURCE_DIRECTORY $CFLAGS"

nope, same error (libtool linked)

This doesn’t answer the question, but hopefully interesting:

libtool: install: warning: relinking `egl_gallium.la'

Should be OK to compile mesa with these options (as I do):

--with-gallium-drivers=swrast --with-dri-drivers=swrast

with those options am I building (http://sl1pkn07.no-ip.com/paste/view/fad5abee)

mesa 10.1 has been released, and still fail build if libEGL.so.x.y.z is installed/used from nvidia (334.21)

(in same point)

greetings

This sounds like a bug in the Mesa build system. If it requires vendor-specific extensions in libEGL.so, then it should be linking against its own libEGL.so and not the one installed in the system.

With nvidia’s /usr/lib/libEGL.so.337.25, gst-plugins-bad 1.2.4 fails to compile:

./.libs/libgstegl-1.0.so: undefined reference to `eglDestroyImageKHR'

A solution is, after compiling mesa:

sed -e "s:lEGL:lEGLMesa:" -i /usr/lib/pkgconfig/egl.pc &&
ln -sf libEGL.so.1.0.0 /usr/lib/libEGLMesa.so &&
ldconfig

It’s probably a good idea to do the same for GL:

sed -e "s:lGL:lGLMesa:" -i /usr/lib/pkgconfig/gl.pc &&
ln -sf libGL.so.1.2.0 /usr/lib/libGLMesa.so &&
ldconfig

Edit: Argh, then ldconfig relinks e.g. libEGL.so.1 → libEGLMesa.so and messes it up! Seems like ldconfig is being very over-eager - anyone got a better idea?

I found a way to compile with mesa’s libs:

Setup, similar to Arch’s mesa:

m="/usr/lib/mesa" &&
mkdir -p "$m" &&

ln -sf /usr/lib/libGL.so.1.2.0 "$m"/libGL.so.1.2.0 &&
ln -sf libGL.so.1.2.0 "$m"/libGL.so.1 &&
ln -sf libGL.so.1 "$m"/libGL.so &&

ln -sf /usr/lib/libEGL.so.1.0.0 "$m"/libEGL.so.1.0.0 &&
ln -sf libEGL.so.1.0.0 "$m"/libEGL.so.1 &&
ln -sf libEGL.so.1 "$m"/libEGL.so &&

ln -sf /usr/lib/libGLESv1_CM.so.1.1.0 "$m"/libGLESv1_CM.so.1.1.0 &&
ln -sf libGLESv1_CM.so.1.1.0 "$m"/libGLESv1_CM.so.1 &&
ln -sf libGLESv1_CM.so.1 "$m"/libGLESv1_CM.so &&

ln -sf /usr/lib/libGLESv2.so.2.0.0 "$m"/libGLESv2.so.2.0.0 &&
ln -sf libGLESv2.so.2.0.0 "$m"/libGLESv2.so.2 &&
ln -sf libGLESv2.so.2 "$m"/libGLESv2.so &&

ldconfig

Then, immediately before compiling gst-plugins-bad:

export LD_LIBRARY_PATH="/usr/lib/mesa"