Public bug reported: 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. ** Affects: qemu Importance: Undecided Status: New -- 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: New 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