qemu-devel
[Top][All Lists]
Advanced

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

[Bug 1861468] Re: always fail to build qemu statically


From: Peter Maydell
Subject: [Bug 1861468] Re: always fail to build qemu statically
Date: Fri, 31 Jan 2020 10:25:22 -0000

QEMU is not really intended to be built statically except for the
'linux-user' emulators. The configure script will allow you to build the
system emulator binaries and the tools statically, but that is more on a
"if it happens to work for you, great" basis, rather than a supported
one.

In general: you need to have static library versions of all the
development packages like libsdl2, libglib, libgtk, etc etc -- it sounds
like you have only the dynamic libraries available, in which case
statically linking them will not work, and configure will either note
that it couldn't use the package (as happened with SDL) or just not be
able to link at the end. You will have better luck also if you use
configure --disable... options to reduce the use of optional stuff like
libiSCSI which you probably don't need. Then you can avoid having to
find static versions of those libraries.


** Changed in: qemu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1861468

Title:
  always fail to build qemu statically

Status in QEMU:
  Invalid

Bug description:
  I want to build qemu statically so as to use qemu on Android platform(Though 
Limbo emulator is available on github,it's even slower than qemu in UserLAnd(an 
Android APP that provides proot container for Linux dists)).
  When I finished building qemu normally on my phone(Ubuntu devel in proot 
environment),I started to build qemu statically.I removed the old source code 
dir and unpack the qemu source code. I had built many libraries like libSDL2 
and libiSCSI for qemu,and of course these libraries were able to be detected by 
qemu configure program.But when I ran the command:

   ❯ ./configure --static --prefix=/home/admin/qemu/build 
--target-list=aarch64-softmmu,x86_64-softmmu,i386-softmmu,mips64-softmmu,ppc64-softmmu
 --enable-sdl                                                                   
                      ERROR: User requested feature sdl                         
                              
  configure was not able to find it.                                            
  
  Install SDL2 devel

  I had to give up the SDL feature.
  I disabled the SDL feature and ran configure again.The configure didn't 
report error,but besides SDL ,many other libraries like libUSB,libpng were 
missing.I ran 'make -j8 &&make install'.All seemed perfect.But when it comes to 
the final process--linking executables,the ld program went wrong.It said it 
could not find the libraries like -lgtk3 -ldrm -lsystemd,etc.
  I was confused.I had already had a test building which successfully finished.
  Could you give me a possible way to solve the problem?

  Platform information:
  Ubuntu devel 20.04 ARM64 with GCC 9.2.1
  QEMU version:I have tested almost all versions from 2.11 to 4.2.0.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1861468/+subscriptions



reply via email to

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