qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Compiling static qemu


From: Peter Maydell
Subject: Re: [Qemu-discuss] Compiling static qemu
Date: Mon, 11 Mar 2019 17:58:18 +0000

On Mon, 11 Mar 2019 at 17:22, Paulo Matos <address@hidden> wrote:
>
> Hello,
>
> I am trying to compile static qemu 3.1.0 on an ubuntu18.04 container:
>  ./configure --static --disable-kvm --disable-xen --disable-spice
> --target-list='i386-linux-user aarch64-linux-user mips-linux-user
> mipsel-linux-user mips64el-linux-user s390x-linux-user
> ppc64le-linux-user riscv64-linux-user' --prefix=/home/pmatos/installs
>
> I got this (several of them):
> (.text+0x267): warning: Using 'getpwuid' in statically linked
> applications requires at runtime the shared libraries from the glibc
> version used for linking
>
> I understand what this means but I googled online to see if there was a
> way to work around this and found this mailing list thread from 2011:
> https://lists.nongnu.org/archive/html/qemu-devel/2011-11/msg02878.html
>
> This seems to imply that if I didn't build the softmmu targets, I
> wouldn't get the warning, and yet I do.

No, the email is just saying that if you don't build the softmmu
targets the build will succeed. The warning is deliberately not a
build failure.

The warning is entirely harmless and you can ignore it.
(It's caused because of an issue in the glib library which we
use: glib uses the same sourcefile for some functions which
are not OK to use from a statically linked binary and for
some functions which are. Since the linker pulls in code from
static libraries either for everything in a sourcefile or
nothing, it sees the uses of getpwuid and friends and warns;
it doesn't realize that our code never calls those functions.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]