Page 1 of 1

[SOLVED] Question on how libGL.so is symlinked - or is it?

PostPosted: May 29th, '13, 19:21
by hansmicheelsen
I have a question on how libGL.so is symlinked.
When I do a "ll /lib64/libGL.so*" I get
Code: Select all
lrwxrwxrwx 1 root root     14 maj 27 18:56 /lib64/libGL.so -> libGL.so.1.2.0*
lrwxrwxrwx 1 root root     14 maj 24 19:10 /lib64/libGL.so.1 -> libGL.so.1.2.0*
-rwxr-xr-x 1 root root 526560 maj 24 12:52 /lib64/libGL.so.1.2.0*

So apparently libGL.so.1 is symlinked to /lib64/libGL.so.1.2.0.
But when I do a "ldd /bin/glxgears" I get (mong others):
Code: Select all
 libGL.so.1 => /usr/lib64/fglrx/libGL.so.1 (0x00007fd694722000)


So according to this libGL.so is (sym?)linked to /usr/lib64/fglrx/libGL.so.1 or is it hardlinked or mounted?
Can anyone explain to me what happens here. Its kind of interesting

Re: Question on how libGL.so is symlinked - or is it?

PostPosted: May 30th, '13, 10:45
by ITA84
Not on Mageia right now, but normally shared libraries are searched for by looking up the paths listed in the /etc/ld.so.conf and /etc/ld.so.conf.d/* files, so you should have a look there.

Re: Question on how libGL.so is symlinked - or is it?

PostPosted: May 30th, '13, 11:54
by hansmicheelsen
Ok, I see. And /etc/ld.so.conf.d/GL.conf is symlinked through /etc/alternatives/gl_conf to /etc/ld.so.conf.d/GL/ati.conf, which contains directions to ldconfig on how to dynamically link at run-time.
If I do "/sbin/ldconfig -p" I get:
Code: Select all
        libGL.so.1 (libc6,x86-64) => /usr/lib64/fglrx/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib/fglrx/libGL.so.1
        libGL.so.1 (libc6) => /lib/libGL.so.1
        libGL.so (libc6,x86-64) => /usr/lib64/fglrx/libGL.so
        libGL.so (libc6,x86-64) => /lib64/libGL.so
        libGL.so (libc6) => /usr/lib/fglrx/libGL.so

which meens that /usr/lib64/fglrx/libGL.so preceeds /lib64/libGL.so.1

And therefore it works!!!! Impressing.
Thank you very much, ITA84.
I love to learn new stuff :ugeek: