On 2016-05-10 13:41:14 +0200, Christian Seiler wrote:
> Am 2016-05-10 13:24, schrieb Vincent Lefevre:
> > After compiling a program with "gcc -m32", running this program
> > yields:
> >
> > ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be
> > preloaded (cannot open shared object file): ignored.
> >
> > on stderr. This is an annoying error message, which can also break
> > scripts that check error output.
>
> Yes, so the problem is that gtk3-nocsd sets LD_PRELOAD=libgtk3-noscd.so.0.
> That means that ld.so tries to preload the library - and there's currently
> now way of telling ld.so to not print an error and simply ignore and entry
> in LD_PRELOAD if it can't load it. (And you only have the amd64 version
> installed.)
This would have been the best solution (I never need the library
for 32-bit programs, I just want to avoid the error message).
> (For this reason the library is installed as mode 4644, to make ld.so
> preload it even if the binary is setuid/setgid/has fscaps, otherwise you'd
> get the same message everytime you type 'ping' or 'su'. See the lintian
> overrides of the package.)
Couldn't this be a security issue in case there is a potential bug in
gtk3-nocsd, just to avoid an error message? Perhaps in the long term,
ld.so should provide a way to avoid error messages due to non-matching
permissions or ELF class.
> gtk3-nocsd is Multi-Arch-aware though: you can install the libgtk3-nocsd0
> package on i386 (in addition to the native arch one that's already
> installed on your system) and the message will disappear. (gtk3-nocsd is
> Arch: all, libgtk3-nocsd0 is Arch: any and M-A: same.)
OK, I suppose that's fine for me because libgtk3-nocsd0 is small and
just depends on libc6 (it would have been different if it brought lots
of dependencies).
Now, this would mean that one has to enable i386, which is normally
not necessary for "gcc -m32" if one just uses the C library because
the C library is currently special (one just needs libc6-dev-i386
and libc6-i386, on which packages like gcc-5-multilib depend).
> Unfortunately, I have no good solution how to improve that:
>
> > gtk3-nocsd should be as transparent as possible.
>
> I agree fully - but I don't really see a good way how to solve it.
>
> 1. There's no Depends/Recommends: pkg:all-enabled-archs in APT
Anyway this would not be ideal, since the arch is not necessarily
enabled (see above) or it could be enabled later.
> 2. There's no way of telling ld.so "yeah, it's fine if this LD_PRELOAD
> fails, just try it and if it doesn't work silently ignore it"
>
> I could of course add a postinst debconf prompt to gtk3-nocsd so that if
> multiple architectures are installed, but gtk3-nocsd isn't, the user gets
> a message and is asked to install libgtk3-nocsd0 for the other archs.
> Would that be something you'd be OK with?
Perhaps better than nothing.
> Do you have any other ideas?
I suppose that FatELF could have been a solution, but this has been
abandoned.
Perhaps provide a 32-bit library for the amd64 package? But one should
still make sure that packages in both arch are coinstallable.
If there is no good solution, some note should be added to the
/usr/share/doc/gtk3-nocsd/README.Debian file, hoping that if the
user gets the error message, he would look at this file.
--
Vincent Lefèvre <
vin...@vinc17.net> - Web: <
https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <
https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)