Skip to contentSkip to conversation

Building QEMU natively from ARM CPU statically

Qemu-devel [email protected] 2 participants 3 messages Jan 7, 2018

lore
Share & tools
lore
#0 lore raw

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 ---------

# QEMU configure log Sun Jan 7 10:05:50 +04 2018
# Configured with: './configure' '--prefix=/usr' '--libdir=/usr/lib' '--sysconfdir=/etc' '--localstatedir=/var' '--docdir=/usr/doc/qemu-2.11.0' '--cc=gcc' '--host-cc=gcc' '--cpu=arm' '--enable-gtk' '--enable-system' '--enable-kvm' '--disable-debug-info' '--enable-virtfs' '--enable-sdl' '--enable-jemalloc' '--disable-docs' '--static' '--disable-vnc' '--target-list=mips-linux-user'
#
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Werror -Wstring-plus-int -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc: error: unrecognized command line option ‘-Wstring-plus-int’
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Werror -Winitializer-overrides -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc: error: unrecognized command line option ‘-Winitializer-overrides’
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Werror -Wexpansion-to-defined -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc: error: unrecognized command line option ‘-Wexpansion-to-defined’
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Werror -Wendif-labels -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Werror -Wshift-negative-value -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc: error: unrecognized command line option ‘-Wshift-negative-value’
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Werror -Wmissing-include-dirs -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Werror -Wempty-body -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Werror -Wnested-externs -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Werror -Wformat-security -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Werror -Wformat-y2k -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Werror -Winit-self -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Werror -Wignored-qualifiers -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Werror -Wold-style-declaration -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Werror -Wold-style-definition -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Werror -Wtype-limits -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -Werror -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -Werror -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -Werror -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -Werror -fno-gcse -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static config-temp/qemu-conf.c:4:2: error: #error No bug in this compiler.
#error No bug in this compiler.
^
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -Werror -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -Werror -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -lz
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -llzo2 /usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -llzo2
collect2: error: ld returned 1 exit status
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -lsnappy /usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lsnappy
collect2: error: ld returned 1 exit status
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -lbz2
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -lxenstore -lxenctrl -lxenguest config-temp/qemu-conf.c:1:21: fatal error: xenctrl.h: No such file or directory
compilation terminated.
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -lgnutls -lz -lp11-kit -lgmp -lhogweed -lgmp -lnettle -lidn -lp11-kit -lz /usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgnutls
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lp11-kit
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgmp
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lhogweed
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgmp
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lnettle
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lp11-kit
collect2: error: ld returned 1 exit status
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -lgcrypt -lgpg-error -lgpg-error /usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgcrypt
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgpg-error
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgpg-error
collect2: error: ld returned 1 exit status
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -lgcrypt -lgpg-error -lgpg-error /usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgcrypt
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgpg-error
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -lgpg-error
collect2: error: ld returned 1 exit status
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c
gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -D_REENTRANT -I/usr/include/SDL2 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -static -Wl,-rpath,/usr/lib -Wl,--enable-new-dtags -pthread -lSDL2 -ldbus-1 -ldl -lm -Wl,--no-undefined -pthread -lSDL2 /usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -ldbus-1
/usr/lib/gcc/arm-slackware-linux-gnueabi/5.3.1/../../../libSDL2.a(SDL_dynapi.c.o): In function `SDL_InitDynamicAPI':
SDL_dynapi.c:(.text+0x1cb8): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status

--------- 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

Also, I tried building a shared version (without --static) of qemu-2.11.0 and it works fine.

So, do you have an idea about how to fix this ?

Cheers

#1 lore raw
Quoted 9 lines · On 7 January 2018 at 06:55, <[email protected]> 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.

Quoted 6 lines

--------- 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.)

Quoted 1 line

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.

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.

thanks
-- PMM

#2 lore raw
Quoted 54 lines · Peter Maydell
Quoted 16 lines · On 7 January 2018 at 06:55, <[email protected]> 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

Review

Quoted 2 lines
(quoted diff) +0 -2
-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.)

Quoted 1 line

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.

Quoted 8 lines

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.

Quoted 17 lines

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

Quoted 5 lines

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.