On Wed, May 21, 2025 at 04:34:24PM +0100, Peter Maydell wrote:
> On Tue, 20 May 2025 at 23:22, Ilya Leoshkevich <i...@linux.ibm.com> wrote:
> > However, wasn't it already broken in this regard?
> > With fccb744f41c69fec6fd92225fe907c6e69de5d44^ I get:
> >
> > [2/2] Linking target qemu-s390x
> > /usr/bin/ld: /usr/lib64/libglib-2.0.a(gutils.c.o): in function
> > `g_get_user_database_entry':
> > (.text+0xeb): warning: Using 'getpwnam_r' in statically linked
> > applications requires at runtime the shared libraries from the glibc
> > version used for linking
> > /usr/bin/ld: (.text+0x2be): warning: Using 'getpwuid' in statically
> > linked applications requires at runtime the shared libraries from the
> > glibc version used for linking
> > /usr/bin/ld: (.text+0x134): warning: Using 'getpwuid_r' in statically
> > linked applications requires at runtime the shared libraries from the
> > glibc version used for linking
> >
> > This comes from glib, but the ultimate result is still the same.
> 
> Those are in upstream glib, as you note. We can't fix those (unless we
> have the enthusiasm to write patches for upstream glib: last time
> we asked, they were not against the idea, but nobody on either side
> had the time available to try to write the necessary patches).
> But we can and should fix the cases in our own code.
> 
> > Also, what are the symptoms of the breakage? IIUC as long as execution
> > does not reach getaddrinfo(), which it in this case should not, because
> > it is used only on inet paths, there should not be any issues, right?
> 
> Correct -- if we don't call the function it's fine. But the easiest
> way to be sure we don't call the function is to not link it in :-)
> Otherwise future code changes could result in a call without our
> realizing it.
> 
> Also, mjt's packaging for Debian puts in some stubs for the
> offending getwpuid etc functions, which suppress the glib warnings
> (this is why he noticed this whereas none of the rest of us did):
> 
> https://sources.debian.org/patches/qemu/1:10.0.0%2Bds-2/static-linux-user-stubs.diff/

Oh interesting, I was conincidentally wondering if adding dummy
stubs might suppress this.

How about we pull that change upstream, and expand it to getaddrinfo
too ?  I like the stubs much more than artificially splitting up
the source files


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to