silence misleading warnings about failure to load the other architecture's gameoverlayrenderer.so
Vaguely similar to #32 (closed), Steam users reporting issues are often misled by the warnings produced by gameoverlayrenderer.so
. Every 64-bit process we run will spam this:
ERROR: ld.so: object '/.../ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
and we get the same with s/32/64/ for 32-bit processes.
This is unimportant and only cosmetic, but it looks important, so it distracts users who are reporting more serious issues, slowing down triaging and debugging.
Because we control the filesystem namespace inside the container, we could rewrite LD_PRELOAD
, special-casing the gameoverlayrenderer.so
, to make it something more like this:
LD_PRELOAD='/overrides/platform-${PLATFORM}/gameoverlayrenderer.so'`
and make the 64-bit gameoverlayrenderer.so
appear in /overrides/platform-x86_64
.
Because ${PLATFORM}
varies by distro and version, we would need to put the 32-bit gameoverlayrenderer
in /overrides/platform-i686/gameoverlayrenderer.so
, and make /overrides/platform-i386
, platform-i486
and platform-i586
all be symlinks to platform-i686
. This would silence the warnings, making genuine issues more visible.
Or, we could use /overrides/lib/${PLATFORM}-linux-gnu
, like we currently do for VDPAU drivers.
This would need to be tested carefully, especially with Proton, because it interacts with #22 (closed). We might have to split the rewriting so responsibility is shared between pressure-vessel-wrap
and either pressure-vessel-launch
or pressure-vessel-launcher
. For example, pressure-vessel-launcher
might take an option something like this:
pressure-vessel-launcher \
--rewrite-preload=/.../ubuntu12_32/gameoverlayrenderer.so='/overrides/platform-${PLATFORM}/gameoverlayrenderer.so' \
--rewrite-preload=/.../ubuntu12_64/gameoverlayrenderer.so='/overrides/platform-${PLATFORM}/gameoverlayrenderer.so' \
...
(or a fd with instructions for what to rewrite, or something) and then automatically suppress duplicate LD_PRELOAD
entries that appear after rewriting?
/cc @denittis