FS#67818 - [virtualgl] change library path to avoid messing up lib search order
Attached to Project:
Community Packages
Opened by Oliver Mangold (omangold) - Thursday, 03 September 2020, 10:33 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
Opened by Oliver Mangold (omangold) - Thursday, 03 September 2020, 10:33 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
|
Details
Description:
vglrun adds the vgl libdir to LD_LIBRARY_PATH. If this is /usr/lib, as is the case for the arch package, this will change the search order for libraries, moving /usr/lib before the dirs given in /etc/ld.so.conf.d. I think this is a (potential) source for various kinds of trouble. Actually I have reason to override some system libraries on my installation by adding extra entries in /etc/ld.so.conf.d. An easy fix is to change the vgl libdir to something else, which contains *only* the vgl libs, e.g. /usr/lib/virtualgl. See patch below. Additional info: * package version(s): 2.6.4-1 Fix: --- PKGBUILD.orig 2020-09-03 12:19:23.201260540 +0200 +++ PKGBUILD 2020-09-03 12:19:33.277890889 +0200 @@ -32,7 +32,7 @@ -DCMAKE_INSTALL_PREFIX=/usr \ -DTJPEG_INCLUDE_DIR=/usr/include \ -DTJPEG_LIBRARY=/usr/lib/libturbojpeg.so \ - -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib/virtualgl \ -DCMAKE_INSTALL_BINDIR=/usr/bin \ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${pkgname} \ -DVGL_FAKEXCB=1 |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/virtualgl/issues/1
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/virtualgl/issues/1
Could you discuss this with upstream (via GitHub issue and link it here) and/or illustrate to me how the current dir can become a problem in regard to order?
But as LD_LIBRARY_PATH takes priority over /etc/ld.so.conf.d, adding /usr/lib there will mess it up, but it would not if it were a different directory. Apparently virtualgl is prepared to deal with the situation of having its libs installed elsewhere and uses LD_LIBRARY_PATH exactly for the purpose so that they can still be found then:
--- /usr/bin/.vglrun.vars64 ---
...
# If the faker libraries are packaged in a non-system directory, then this
# script adds that directory to VGL_LIBRARY_PATH, which is later added to
# LD_LIBRARY_PATH so that LD_PRELOAD can find the libraries.
VGL_LIBDIR=/usr/lib
...
---