Hello, I would like an opinion on the patch I've attached.
In the past in my company, we have always had the Mesa libGL, nVidia libGL, and ATI libGL installed in /usr/lib, /usr/lib/nvidia, and /usr/lib/ati respectively. We would then simply change /etc/ld.so.conf(.d) to give the appropriate libGL preference.
The advantage of this approach is that it would never mess with Debian packaging during upgrades, etc.
In the last couple of years this has stopped working, and I've finally narrowed it down to ldconfig's behaviour with the ABI tag that Mesa includes in libGL:
libGL.so.1 (libc6, OS ABI: Linux 2.4.20) => /usr/lib/libGL.so.1 libGL.so.1 (libc6) => /usr/lib/nvidia/libGL.so.1The ABI tag breaks the sort order with the library that doesn't have such a tag. The above example has /usr/lib/nvidia in the first line of /etc/ld.so.conf. The attached patch works around the issue, and I don't think there are any side effects.
Does it make sense to include the ABI tag going forward? While it may be a ldconfig bug, the current situation breaks a useful function, while providing very little. Kernels <2.4.20 are rather scarce.
If I'm missing something important, please let me know. Thanks! --Pat
--- mesa-7.6.1.orig/src/mesa/glapi/gl_x86-64_asm.py 2010-02-11 19:49:02.000000000 +0000 +++ mesa-7.6.1/src/mesa/glapi/gl_x86-64_asm.py 2010-02-11 20:04:06.000000000 +0000 @@ -180,19 +180,6 @@ def printRealFooter(self): print '' - print '#if defined(GLX_USE_TLS) && defined(__linux__)' - print ' .section ".note.ABI-tag", "a"' - print ' .p2align 2' - print ' .long 1f - 0f /* name length */' - print ' .long 3f - 2f /* data length */' - print ' .long 1 /* note length */' - print '0: .asciz "GNU" /* vendor name */' - print '1: .p2align 2' - print '2: .long 0 /* note data: the ABI tag */' - print ' .long 2,4,20 /* Minimum kernel version w/TLS */' - print '3: .p2align 2 /* pad out section */' - print '#endif /* GLX_USE_TLS */' - print '' print '#if defined (__ELF__) && defined (__linux__)' print ' .section .note.GNU-stack,"",%progbits' print '#endif' --- mesa-7.6.1.orig/src/mesa/glapi/gl_x86_asm.py 2010-02-11 19:49:02.000000000 +0000 +++ mesa-7.6.1/src/mesa/glapi/gl_x86_asm.py 2010-02-11 20:03:54.000000000 +0000 @@ -190,19 +190,6 @@ print '\t\tALIGNTEXT16' print 'GLNAME(gl_dispatch_functions_end):' print '' - print '#if defined(GLX_USE_TLS) && defined(__linux__)' - print ' .section ".note.ABI-tag", "a"' - print ' .p2align 2' - print ' .long 1f - 0f /* name length */' - print ' .long 3f - 2f /* data length */' - print ' .long 1 /* note length */' - print '0: .asciz "GNU" /* vendor name */' - print '1: .p2align 2' - print '2: .long 0 /* note data: the ABI tag */' - print ' .long 2,4,20 /* Minimum kernel version w/TLS */' - print '3: .p2align 2 /* pad out section */' - print '#endif /* GLX_USE_TLS */' - print '' print '#if defined (__ELF__) && defined (__linux__)' print ' .section .note.GNU-stack,"",%progbits' print '#endif' --- mesa-7.6.1.orig/src/mesa/x86/glapi_x86.S 2009-12-22 02:31:19.000000000 +0000 +++ mesa-7.6.1/src/mesa/x86/glapi_x86.S 2010-02-11 20:03:06.000000000 +0000 @@ -1319,19 +1319,6 @@ ALIGNTEXT16 GLNAME(gl_dispatch_functions_end): -#if defined(GLX_USE_TLS) && defined(__linux__) - .section ".note.ABI-tag", "a" - .p2align 2 - .long 1f - 0f /* name length */ - .long 3f - 2f /* data length */ - .long 1 /* note length */ -0: .asciz "GNU" /* vendor name */ -1: .p2align 2 -2: .long 0 /* note data: the ABI tag */ - .long 2,4,20 /* Minimum kernel version w/TLS */ -3: .p2align 2 /* pad out section */ -#endif /* GLX_USE_TLS */ - #if defined (__ELF__) && defined (__linux__) .section .note.GNU-stack,"",%progbits #endif --- mesa-7.6.1.orig/src/mesa/x86-64/glapi_x86-64.S 2009-12-22 02:31:19.000000000 +0000 +++ mesa-7.6.1/src/mesa/x86-64/glapi_x86-64.S 2010-02-11 20:03:29.000000000 +0000 @@ -30243,19 +30243,6 @@ .globl GL_PREFIX(BlitFramebuffer) ; .set GL_PREFIX(BlitFramebuffer), GL_PREFIX(_dispatch_stub_780) .globl GL_PREFIX(FramebufferTextureLayer) ; .set GL_PREFIX(FramebufferTextureLayer), GL_PREFIX(FramebufferTextureLayerEXT) -#if defined(GLX_USE_TLS) && defined(__linux__) - .section ".note.ABI-tag", "a" - .p2align 2 - .long 1f - 0f /* name length */ - .long 3f - 2f /* data length */ - .long 1 /* note length */ -0: .asciz "GNU" /* vendor name */ -1: .p2align 2 -2: .long 0 /* note data: the ABI tag */ - .long 2,4,20 /* Minimum kernel version w/TLS */ -3: .p2align 2 /* pad out section */ -#endif /* GLX_USE_TLS */ - #if defined (__ELF__) && defined (__linux__) .section .note.GNU-stack,"",%progbits #endif
------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev