[Mesa-dev] [RFC] libGL.so.1.2.0 new name
ikalvachev at gmail.com
Fri Oct 5 16:42:39 PDT 2012
By mistake I replied to Brain only,
so I'll try with another mail...
On 10/4/12, Brian Paul <brianp at vmware.com> wrote:
> On 10/02/2012 05:00 PM, Ivan Kalvachev wrote:
>> I would like to make a request.
>> Would you kindly change the name of libGL.so.1.2.0 to libGL_mesa.so*
>> and make all required aliases of libGL.so* as symlinks to it.
>> The advantages.
>> 1. Binary drivers won't overwrite the mesa library when they install
>> their own version. It would make unified way for all distributions to
>> handle the conflict.
>> 2. It would allow applications to explicitly use libGL_mesa, even when
>> other (nvidia,fglrx) drivers are installed. It is useful in cases
>> where multiple cards are present. At least the Fglrx driver routes
>> mesa X commands to the proper libglx library.
>> 3. It may even allow the creation on libGL.so* that works as wrapper,
>> similar to e.g. libXvMCW.so . But that is for the future, not now.
>> 4. Avoid an obscure bug.
>> The concrete reason for this request is a strange bug I found while
>> testing for another bug in the fglrx beta.
>> Up until now Mesa3D used to install the library libGL.so.1.2, but in
>> the new versions, it is libGL.so.1.2.0 .
>> This little change is present in the git master as well as the
>> upcoming 9.0 branch.
>> The problem appears when the distro scripts override libGL.so.1.2 . If
>> `ldconfig` is run it re-creates symlinks libGL.so and libGL.so.1 so
>> that they point to the mesa library (libGL.so.1.2.0) , while
>> libGL.so.1.2 is pointing to the override (e.g. fglrx-ligGL.so.1.2) .
>> With this setup, the different applications would be using different
>> library, depending on what library name they have used at link time.
>> The funny thing is that for me `glxinfo` showed the fglrx, while
>> `glxgears` used mesa swrast.
>> I have already reported this problem to AMD and they will eventually
>> fix it on their installer. 99 other distros remain.
>> I could probably understand the sentiment that Mesa should be the one
>> and only true OpenGL library on the system, but the sad true is that
>> other (proprietary) OpenGL implementations are not going away anytime
>> soon. Insisting on this, only makes the life harder for packagers and
>> Your options are:
>> 1. Don't do anything. Break all kind of distributions in a hard to
>> debug way. Their problem.
>> 2. Revert to the old libGL.so.1.2 scheme.
>> 3. Use libGL_mesa.so* and make libGL.so.1.2 link to it. Use full path
>> to preserve existing distro hacks.
>> Please don't ask me to send you patch... I can't hack autoconf unless
>> my life depends on it (and maybe even then... better not to try).
> If you look at the list archives from about a month ago, there's a
> draft of an updated Linux OpenGL ABI specification. There was a
> proposal to rename the various OpenGL libraries. You might want to
> read that.
A concerned user already pointed it to me.
I must remind you that no matter what the proposed specification are,
they won't be implemented for 9.0 release. I want something that works
now, not something that will be implemented in 1-2 years.
I guess that there is just nobody who cares about the details and
everybody are too busy adding the important bits.
Now, the proper solution would be not replacing libGL.so in the first
place. It should be possible as the libGL.so in itself is a wrapper
and according to
it should work with any kind of backend OpenGL.
But it does not.
NVidia and ATI/AMD overwrite this wrapper with their own. And neither
wrapper is fully compatible with the other wrappers.
I would be happy if somebody could explain to me why?
Anyway, the my proposal is flawed too. `ldconfig` seems too smart. It
seems to get the library name from inside the library and creates the
symlinks. So no matter how I rename the library it will overwrite the
symlinks. I witnessed how `ldconfig` creates symlink to one or the
other library depending in what order it scans them.
If there is a rename, the library should be compiled&linked with the new name.
Maybe you can go back to pre 3.1 naming with libMesaGL.so ?
Does anybody remember what were the problems that warranted the change?
The ideal solution would be if you kindly ask NVidia and Fglrx to
cooperate with you and you all use the same libGL.so.
Until then, please... make so you can coexist on the same plane with
the binary drivers without resorting to individual/distribution hacks.
No need to work together, just not overwriting each-others stuff.
p.s. BTW, does the new ABI proposal address in any way the
master-slave OpenGL relations like the one needed for Optimus Hybrid
graphics to work? Because all I see is decoupling glx from opengl, so
glx could be replaced by egl.
In that regard... how does EGL handle multiple cards?
More information about the mesa-dev