qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: shiftag@nanotek.info
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Building QEMU natively from ARM CPU statically
Date: Sun, 07 Jan 2018 14:52:25 +0000	[thread overview]
Message-ID: <e59e94af916704f36b0d37c9227efcbf@webmail.nanotek.info> (raw)
In-Reply-To: <CAFEAcA-r0OEtPHYH27CcB=S7h4SppLUD04C8FuQ1vJfRrAV=Cw@mail.gmail.com>

January 7, 2018 6:30 PM, "Peter Maydell" <peter.maydell@linaro.org> wrote:

> On 7 January 2018 at 06:55, <shiftag@nanotek.info> wrote:
> 
>> Hi,
>> 
>> I'm trying to build QEMU statically from ARM CPU (without cross-compiling). But at "configure" step
>> I have the following issue :
>> 
>> ERROR: User requested feature sdl
>> configure was not able to find it.
>> Install SDL devel
>> However, from config.log, it seems that issue is not related to SDL.
>> 
>> --------- long paste ---------
>> 
>> I'm compiling version 2.11.0 so the SDL patch has already been applied. Also, some libraries errors
>> are strange as I can find them on my system, see :
>> 
>> $ pkg-config --cflags --libs p11-kit-1 gnutls hogweed nettle dbus-1
>> -I/usr/include/p11-kit-1 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -lp11-kit -lgnutls
>> -lhogweed -lnettle -ldbus-1
> 
> You forgot --static on the pkg-config command line.
> But in any case pkg-config is just reporting info from
> a data file, which doesn't necessarily correspond to
> what library .a and .so files are actually on the system.
> (It's your distro's packaging and dependency info that's
> responsible for making sure that all the dependent
> library files are actually installed.)
> 
>> Also, I tried building a shared version (without --static) of qemu-2.11.0 and it works fine.
> 
> Problems with trying to build a statically linked
> QEMU usually mean:
> 
> * QEMU needs and links against static library X
> * static library X depends on static library Y
> * but either you don't have the static version of Y
> installed (a bug in your distro's library packaging
> or dependencies, possibly)
> * or the pkg-config information that your distro ships
> with library X does not correctly declare that it
> depends on Y and so Y doesn't go on the list of
> libraries QEMU links with
> 
> In this case all the "could not find -lfoo" errors
> suggests that it's the "you don't have the static
> library installed" case, and you should be able to fix
> this by installing the right static libs from your distro.
> 
> In general, we provide --static for the benefit mostly
> of the user-mode emulation binaries, which have a very
> small list of library dependencies. Building the system
> emulation binaries with --static is rather chancier.
> 
> The underlying reason for this kind of problem is that
> very few people try to statically link anything, and so
> bugs in distro packaging of statically linked libraries
> very rarely get reported or fixed. Sometimes distros
> don't provide static versions of some libraries at all.
> As usual, if you wander away from the beaten path you
> can run into thornbushes.
> 

Ok got it. I will check for static librairies.

> I notice that your configure arguments are rather
> odd, which might be why you're running into trouble.
> 
> (1) you pass --cpu=arm -- this is almost never a good
> idea. Let configure autodetect the host CPU for you.
> 
> (2) you pass --target-list=mips-linux-user, which suggest
> you just want to build the mips user mode emulator, but
> then you also pass a lot of arguments which are only
> relevant for system emulation:
> --enable-system
> --enable-kvm
> --enable-gtk
> --enable-virtfs
> --enable-sdl
> --disable-vnc
> 
> Some of these are going to cause configure to try to
> probe for things that mips-linux-user won't even use,
> and then complain that it can't find them. If all you
> want is mips-linux-user, drop all those other arguments.
> 

Thank you Peter. I think I can figure out myself how to solve
this issue.

Cheers.

      parent reply	other threads:[~2018-01-07 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-07  6:55 [Qemu-devel] Building QEMU natively from ARM CPU statically shiftag
2018-01-07 14:29 ` Peter Maydell
2018-01-07 14:52 ` shiftag [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=e59e94af916704f36b0d37c9227efcbf@webmail.nanotek.info \
    --to=shiftag@nanotek.info \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).