From: Mr Dash Four <mr.dash.four@googlemail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] cannot build qemu with "--static" configure option
Date: Wed, 23 Nov 2011 14:39:04 +0000 [thread overview]
Message-ID: <4ECD0588.4050906@googlemail.com> (raw)
In-Reply-To: <CAFEAcA_8ZZKcbdYX-vA6OLgtGCvE-3RJ93Z_TaQofUNjK2caMw@mail.gmail.com>
>> ./configure --target-list="x86_64-softmmu arm-softmmu x86_64-linux-user
>> arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen
>> --disable-spice --disable-werror --static
>>
>> then "make V=1". It fails with the following error:
>>
>
> You're trying to build the -softmmu targets with --static here too
> (which means we try to compile a bunch of things that were never intended
> to be run as static executables that way).
>
I see, noted!
> You're probably better off doing two separate configure and build
> runs, one with just the -linux-user targets and --static, and the other
> with just the -softmmu targets (and no --static).
>
In other words:
1. ./configure --target-list="x86_64-linux-user arm-linux-user
armeb-linux-user" --disable-kvm --disable-strip --disable-xen
--disable-spice --disable-werror --static && make V=1
2. ./configure --target-list="x86_64-softmmu arm-softmmu
x86_64-linux-user arm-linux-user armeb-linux-user" --disable-kvm
--disable-strip --disable-xen --disable-spice --disable-werror && make V=1
> Having said that, building arm-softmmu with --static works for me:
> which version of QEMU are you trying to build? (we might have fixed
> this in the 1.0 release candidate, so that's worth testing.)
>
OK, this is the problem I am facing: I have quad core machine with
Fedora Core on it. I am using debootstrap (Fedora's own package!) to
build chrooted environment for arm using binfmt_misc's unique
capabilities to point to a statically-built qemu-arm to be used when
debootstrap executes various arm-based binaries in the chrooted environment.
Now, in *all* Fedora-supplied QEMU packages there are no
statically-built executables, just qemu-[arch] and qemu-[arch]-system -
both of which are dynamically linked. That is of no use to me whatsoever
because when deboostrap chroots to the arm-based root the libraries qemu
needs in order to run won't be there!
So, what I am trying to do is build static qemu - "qemu-arm-static",
which is "self-contained" and by placing it in my arm-based chroot and
configuring binfmt_misc (via /proc/sys) to point to it, this would allow
debootstrap to do its work without problems.
It is worth noting that Debian have such statically-linked qemu package
already (the package is called qemu-user-static if I am not mistaken),
but when I use Debian's own qemu-arm-static for my host arch - x86_64, I
get a very weird errors during debootstrap, so I am trying to build a
"native" (i.e. Fedora-based) qemu static to see if I get the same error
in order to isolate the problem.
I have tried to build/implement this by tweaking the source rpm (the
.spec file in particular) which comes with the latest QEMU version
distributed by Fedora (0.15-2 if I am not mistaken), but there are so
many ugly hacks in there, that I soon abandoned this idea and thought it
would be easier if I just unpack the source archive, apply the
Fedora-supplied patches and manually execute my custom ./configure and
then "make" so that I end up with qem-arm-static (or similarly-named
executable file) and use this instead.
The problem I am having, as evident from my initial post, is that ld is
going mad about "missing" libraries, even though the build succeeds if I
remove the "--static" option. I will try what you have suggested to see
if it works, but I wanted to know whether I am doing something
fundamentally wrong here... I appreciate your input Peter!
prev parent reply other threads:[~2011-11-23 14:39 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 12:58 [Qemu-devel] cannot build qemu with "--static" configure option Mr Dash Four
2011-11-23 14:10 ` Paolo Bonzini
2011-11-23 14:15 ` Mr Dash Four
2011-11-23 15:24 ` Paolo Bonzini
2011-11-23 15:41 ` Mr Dash Four
2011-11-23 18:00 ` Paolo Bonzini
2011-11-23 18:28 ` Peter Maydell
2011-11-23 18:33 ` Mr Dash Four
2011-11-23 18:36 ` Peter Maydell
2011-11-23 18:42 ` Mr Dash Four
2011-11-23 18:47 ` Peter Maydell
2011-11-23 19:02 ` Mr Dash Four
2011-11-23 19:16 ` Peter Maydell
2011-11-23 19:22 ` Mr Dash Four
2011-11-23 19:33 ` Peter Maydell
2011-11-23 19:50 ` Mr Dash Four
2011-11-23 19:53 ` Max Filippov
2011-11-23 19:57 ` Mr Dash Four
2011-11-23 19:59 ` Peter Maydell
2011-11-23 20:08 ` Max Filippov
2011-11-23 20:18 ` Max Filippov
2011-11-23 20:28 ` Mr Dash Four
2011-11-23 23:02 ` Mr Dash Four
2011-11-23 23:15 ` Max Filippov
2011-11-23 23:22 ` Peter Maydell
2011-11-23 23:33 ` Mr Dash Four
2011-11-24 8:48 ` Max Filippov
2011-11-24 12:15 ` Mr Dash Four
2011-11-24 12:25 ` Paolo Bonzini
2011-11-24 12:45 ` Mr Dash Four
2011-11-23 20:27 ` Mr Dash Four
2011-11-23 20:39 ` Mr Dash Four
2011-11-23 20:51 ` Max Filippov
2011-11-23 21:00 ` Mr Dash Four
2011-11-23 21:40 ` Max Filippov
2011-11-23 22:12 ` Peter Maydell
2011-11-23 22:13 ` Peter Maydell
2011-11-23 20:13 ` Mr Dash Four
2011-11-24 12:26 ` Alon Levy
2011-11-24 12:57 ` Peter Maydell
2011-11-23 18:34 ` Mr Dash Four
2011-11-23 14:18 ` Peter Maydell
2011-11-23 14:39 ` Mr Dash Four [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECD0588.4050906@googlemail.com \
--to=mr.dash.four@googlemail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.