<div dir="ltr">I don't really get what you mean by "<span style="font-family:arial,sans-serif;font-size:13px">Before installation my program run with libraries put in the rpath which is mesa libGL.so (as it is in a standard folder).".</span><div>
<font face="arial, sans-serif">To me that sounds as if you have an application and that it will be run before it gets even installed... Out of my head I could only think of one situation when that would happen and that is directly after an application has been built to run unit tests. If this is the case, then I think this is what you actually want. For unit tests I highly recommend to always use Mesa's software rendering as this ensures that your application can run unit tests even on build machines with varying graphics hardware.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">If I'm wrong with my guess please clarify. ;-)</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 4, 2013 at 8:41 AM, kajo keji <span dir="ltr"><<a href="mailto:kajokeji.2013@gmail.com" target="_blank">kajokeji.2013@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thank you again <span name="Michael Schaller">Michael </span>for your long answer. It becomes clearer for me.<br>
It remains one difficult point about how to handle this with cmake (that uses rpath).<br>
Before installation my program run with libraries put in the rpath which
is mesa libGL.so (as it is in a standard folder)<br></div>NB: after installation, all become well as the rpath is removed.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/12/3 Michael Schaller <span dir="ltr"><<a href="mailto:misch@google.com" target="_blank">misch@google.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Usually programs link against a less specific library name unless they have to be more specific.<div>So most programs that use OpenGL are linked against libGL.so.1 and not against libGL.so.1.# or something even more (vendor-)specific.</div>
<div><br></div><div>Usually this hierarchy of less specific library names to more specific library names is done via symlinks.</div><div>On my Ubuntu x86_64 installation it looks like this:</div><div><div>$ ls -l /usr/lib/x86_64-linux-gnu/mesa/libGL.so*</div>
<div>lrwxrwxrwx 1 root root 12 Nov 18 09:56 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2</div><div>-rw-r--r-- 1 root root 390352 Nov 18 09:57 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2</div></div><div>
<br></div><div><div>$ ls -la /usr/lib/nvidia-current/libGL.so*</div><div>lrwxrwxrwx 1 root root 10 Nov 8 18:51 /usr/lib/nvidia-current/libGL.so -> libGL.so.1</div><div>lrwxrwxrwx 1 root root 15 Nov 8 18:51 /usr/lib/nvidia-current/libGL.so.1 -> libGL.so.331.20</div>
<div>-rw-r--r-- 1 root root 1144680 Nov 8 18:52 /usr/lib/nvidia-current/libGL.so.321.20</div></div><div><br></div><div>You can find out which library a program would load with the help of ldd:</div><div><div>$ ldd /usr/bin/glxgears | grep libGL</div>
<div><span style="white-space:pre-wrap"> </span>libGL.so.1 => /usr/lib/nvidia-current/libGL.so.1</div></div><div><br></div><div>It also looks to me that libGL.so isn't used usually. Mesa doesn't ship one on my installation. So I wouldn't look too much on libGL.so but rather check that libGL.so.1 is correctly set.</div>
<div>Other than that I can't give much advice as the LD configuration is distribution specific and is heavily influenced by symlinks, /etc/ld.so.conf and /etc/ld.so.conf.d/. These can be altered with every installation and graphics drivers tend to meddle with them. Also usually one doesn't touch these symlinks or the LD config unless he/she knows what they are doing and if there are manual changes in place it can be that they could be overwritten by package updates... </div>
<div>That said if you would remove/reinstall the fglrx or nvidia package then most likely it would reconfigure this to a sane state for you. ;-)</div></div><div><div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Tue, Dec 3, 2013 at 10:07 AM, kajo keji <span dir="ltr"><<a href="mailto:kajokeji.2013@gmail.com" target="_blank">kajokeji.2013@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thank you Michael for your answer<br>As for you, my libGL.so.1 link to the proprietary lib :<br> libGL.so.1 (libc6,x86-64) => /usr/lib/fglrx/libGL.so.1<br>
libGL.so.1 (libc6) => /usr/lib32/fglrx/libGL.so.1<div><br>
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so<br> libGL.so (libc6,x86-64) => /usr/lib/fglrx/libGL.so<br><br></div></div>So libGL.so.1 seems to be used instead of libGL.so, here is the magic for me. I am a bit lost about how shared library names are handled...<br>
</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/3 Michael Schaller <span dir="ltr"><<a href="mailto:misch@google.com" target="_blank">misch@google.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Kajo, it depends on your LD config.<div>On my Ubuntu x86_64 with binary NVIDIA driver it looks like this:</div><div><br></div><div><div>$ ldconfig -p | grep libGL.so.1</div><div><span style="white-space:pre-wrap"> </span>libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-current/libGL.so.1</div>
<div><span style="white-space:pre-wrap"> </span>libGL.so.1 (libc6) => /usr/lib32/nvidia-current/libGL.so.1</div><div><br></div><div><div>$ cat /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf</div><div>/usr/lib/nvidia-current</div>
<div>/usr/lib32/nvidia-current</div></div><div><br></div><div>As you can see with /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf in place Mesa's libGL.so.1 is completely disabled.</div><div><br></div><div><br></div><div class="gmail_extra">
<div class="gmail_quote"><div><div>On Tue, Dec 3, 2013 at 9:03 AM, kajo keji <span dir="ltr"><<a href="mailto:kajokeji.2013@gmail.com" target="_blank">kajokeji.2013@gmail.com</a>></span> wrote:<br></div>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
<div dir="ltr"><div><div><div>Thank you for your answer Maarten.<br></div><div>You right !! After some clean up of my links and sudo ldconfig, everything are good. I just don't know how program select the good library at runtime as in my ld cache the mesa's comes first (ldconfig -p) :<br>
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so<br> libGL.so (libc6,x86-64) => /usr/lib/fglrx/libGL.so<br>
</div></div></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/2 Maarten Lankhorst <span dir="ltr"><<a href="mailto:maarten.lankhorst@canonical.com" target="_blank">maarten.lankhorst@canonical.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">op <a href="tel:02-12-13%2014" value="+492121314" target="_blank">02-12-13 14</a>:29, kajo keji schreef:<br>
<div>> I suppose that is the aim of x86_64-linux-gnu_gl_conf alternative to manage<br>
> the link towards mesa, fglrx or nvidia lib, isn't it ?<br>
> The same for i386-linux-gnu_gl_conf.<br>
</div>The abi is fixed and libGL.so is only used for linking. It doesn't matter that applications link against mesa, they will still use the correct library at runtime.<br>
<span><font color="#888888"><br>
~Maarten<br>
</font></span></blockquote></div><br></div>
</div></div><br></div></div><span><font color="#888888">--<br>
Ubuntu-x mailing list<br>
<a href="mailto:Ubuntu-x@lists.ubuntu.com" target="_blank">Ubuntu-x@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-x" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-x</a><br>
<br></font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>