• Mihai Moldovan's avatar
    nxagent: implement RPATH/RUNPATH override for libX11. · 26ab7b8a
    Mihai Moldovan authored
    As discussed in ArcticaProject/nx-libs#610, we need a way to load
    libNX_X11 as a fake version of libX11 into nxagent's address space.
    
    For doing so, we have to link against libX11 at build-time and specify
    a(n) RPATH/RUNPATH to our libX11 -> libNX_X11 compat symlinks.
    
    This commit is essentially doing a cross between options 3 and 4
    discussed in the provided GH issue.
    
    We link libX11 early (before specifying -Lcompat_symlinks_dir), so that
    the linker finds the "real" libX11 version with the libX11 SONAME. This
    leads to our binary depending upon both libX11 and libNX_X11 SONAMEs. We
    already always added RPATH/RUNPATH, but these values are not passed down
    to dependent libraries.
    
    What happens at run-time is that the loader searches for a libX11
    SONAME, takes RPATH/RUNPATH into account and loads our libNX_X11 library
    instead via the compat symlinks. This satisfies the libX11 SONAME and
    dependent libraries will *not* load the system libX11 version again.
    
    Debian's dpkg-shlibdeps isn't quite happy about this mismatching SONAME
    situation, so instruct to look the other way while we're minding our
    business.
    
    Fixes: ArcticaProject/nx-libs#610
    26ab7b8a
Name
Last commit
Last update
..
patches Loading commit data...
patches-pending-evaluation Loading commit data...
patches-refused Loading commit data...
source Loading commit data...
README.source Loading commit data...
changelog Loading commit data...
compat Loading commit data...
compat.sh Loading commit data...
control Loading commit data...
copyright Loading commit data...
copyright.in Loading commit data...
libnx-x11-6.install Loading commit data...
libnx-x11-6.symbols Loading commit data...
libnx-x11-6.triggers Loading commit data...
libnx-x11-dev.install Loading commit data...
libxcomp-dev.install Loading commit data...
libxcomp-dev.links Loading commit data...
libxcomp3.doc-base Loading commit data...
libxcomp3.docs Loading commit data...
libxcomp3.install Loading commit data...
libxcomp3.triggers Loading commit data...
libxcompshad-dev.install Loading commit data...
libxcompshad-dev.links Loading commit data...
libxcompshad3.install Loading commit data...
libxcompshad3.triggers Loading commit data...
nx-x11-common.dirs Loading commit data...
nx-x11-common.install Loading commit data...
nx-x11-common.links Loading commit data...
nx-x11proto-composite-dev.install Loading commit data...
nx-x11proto-core-dev.install Loading commit data...
nx-x11proto-damage-dev.install Loading commit data...
nx-x11proto-randr-dev.install Loading commit data...
nx-x11proto-render-dev.install Loading commit data...
nx-x11proto-scrnsaver-dev.install Loading commit data...
nx-x11proto-xext-dev.install Loading commit data...
nx-x11proto-xfixes-dev.install Loading commit data...
nx-x11proto-xinerama-dev.install Loading commit data...
nxagent.doc-base Loading commit data...
nxagent.docs Loading commit data...
nxagent.install Loading commit data...
nxagent.postinst Loading commit data...
nxagent.postrm Loading commit data...
nxagent.preinst Loading commit data...
nxproxy.doc-base Loading commit data...
nxproxy.docs Loading commit data...
nxproxy.install Loading commit data...
rules Loading commit data...
watch Loading commit data...