qemu-discuss
[Top][All Lists]
Advanced

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

Re: how to build qemu-xxx-static


From: Frans de Boer
Subject: Re: how to build qemu-xxx-static
Date: Fri, 27 Aug 2021 20:49:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0.1

On 8/27/21 12:22, Peter Maydell wrote:
On Fri, 27 Aug 2021 at 10:34, Frans de Boer <frans@fransdb.nl> wrote:
I try to build qemu-aarch64-static, but all I get are errors;
6.1.0    "big/little test failed"

6.0.0   "ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
      You probably need to set PKG_CONFIG_LIBDIR
      to point to the right pkg-config files for your
      build target"

Setting PKG_CONFIG_LIBDIR did not solve this issue

5.2.0 same result as above

I tried to compile this using - among others - the next command:

./configure --prefix=$(cd ../..; pwd)/qemu-user-static --s
tatic --disable-system --enable-linux-use

and various other commands. The errors remain the same.

I really need a static variant of qemu-aarch64 (and others), but can't compile it.
I would suggest as a configure command:
 /path/to/configure --target-list=aarch64-linux-user --static --disable-tools

You can add a --prefix= if you want; this just sets where
'make install' will put the binary. If you really want to build
all the linux-user targets and not just aarch64, you can use
--disable-system instead of the --target-list=... option.


The errors you're getting are I think basically "the first
time configure tried to compile and link a program, it failed".
So something is probably wrong with your compile environment
for static binaries.

configure should have written a config.log file in the build
directory -- have a look at the tail end of that to see
what failed (if nothing seems obvious, put it on the web
somewhere and give us a link to it).  Note that config.log
will contain a lot of expected failures (where configure is
testing for something and will happily cope with that something
not being present) as well as the one which caused it to
bail out.

-- PMM
Following your pointers, I noticed that it was all about missing static libraries/header files. The error messages where not helpful at all. config.log provided some pointers.

Now I can configure, compile and start some activity like starting a shell script, which runs tar and continue with a child bash script to start configure, only to end with:

/sources-base/gcc-11.2.0/libstdc++-v3/configure 'CXXFLAGS=-g -O2 -D_GNU_SOURCE' --prefix=/usr --host=aarch64-cross-linux --disable-multilib --disable-nls --disable-libstdcxx-pch
/sources-base/gcc-11.2.0/libstdc++-v3/configure: This script requires a shell more modern than all
/sources-base/gcc-11.2.0/libstdc++-v3/configure: the shells that I found on your system.
/sources-base/gcc-11.2.0/libstdc++-v3/configure: Please tell bug-autoconf@gnu.org about your system,
/sources-base/gcc-11.2.0/libstdc++-v3/configure: including any error possibly output before this
/sources-base/gcc-11.2.0/libstdc++-v3/configure: message. Then install a modern shell, or manually run
/sources-base/gcc-11.2.0/libstdc++-v3/configure: the script under such a shell if you do have one.
------------------------------------------------------
However, it is the newest bash script, but configure can't find it, so it seems (see attached file).

Just extra info: all files have been checked to be compatible with ARM aarch64.
Also, I am not sure, but when linking the static binary 'aarch64-linux-binfmt', I get a whole slew of message like below:

/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/glib-2.68.4/x86_64-suse-linux/../glib/gutils.c:639: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/glib-2.68.4/x86_64-suse-linux/../glib/gutils.c:645: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

I donĀ“t understand where the '/home/abuild/rpmbuild/BUILD/...' came from.

I have glib2 and glibc installed with static libraries.

Any clue?

Attachment: db.txt
Description: Text document


reply via email to

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