Can't compile QEMU 2.5.0 on Arch Linux ARM
Greetings
I am attempting to compile QEMU for Arch Liux ARM using the build files from here:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/qemu
I am targeting the ARMv7hf architecture. Unfortunately, I am getting an error during the build process. I created a log file from makepkg's stdout and stderr streams. This is the portion I think is relevant. If anyone needs the entire log (it's around 800 lines), I can put it in a subsequent email:
==> Making package: qemu 2.5.0-1 (Sat Feb 20 08:28:35 SAST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found qemu-2.5.0.tar.bz2
-> Found qemu.sysusers
-> Found qemu-ga.service
-> Found 65-kvm.rules
==> Validating source files with md5sums...
qemu-2.5.0.tar.bz2 ... Passed
qemu.sysusers ... Passed
qemu-ga.service ... Passed
65-kvm.rules ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting qemu-2.5.0.tar.bz2 with bsdtar
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
Install prefix /usr BIOS directory /usr/share/qemu binary directory /usr/bin
library directory /usr/lib
module directory /usr/lib/qemu
libexec directory /usr/lib/qemu
include directory /usr/include
config directory /etc
local state directory /var
Manual directory /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/share/qemu-devel/QEMU/src/qemu-2.5.0 C compiler cc Host C compiler cc C++ compiler c++ Objective-C compiler clang ARFLAGS rv CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC QEMU_CFLAGS -I/usr/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -DHAS_LIBSSH2_SFTP_FSYNC -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 -Wendif-labels -Wmissing-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 -I/usr/include/libpng16 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/spice-1 -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libusb-1.0 LDFLAGS -Wl,--warn-common -g -Wl,-O1,--sort-common,--as-needed,-z,relro make make install install python /usr/bin/python2 -B smbd /usr/bin/smbd module support yes host CPU arm host big endian no target list aarch64-softmmu alpha-softmmu arm-softmmu cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu microblazeel-softmmu microblaze-softmmu mips64el-softmmu mips64-softmmu mipsel-softmmu mips-softmmu moxie-softmmu or32-softmmu ppc64-softmmu ppcemb-softmmu ppc-softmmu s390x-softmmu sh4eb-softmmu sh4-softmmu sparc64-softmmu sparc-softmmu tricore-softmmu unicore32-softmmu x86_64-softmmu xtensaeb-softmmu xtensa-softmmu aarch64-linux-user alpha-linux-user armeb-linux-user arm-linux-user cris-linux-user i386-linux-user m68k-linux-user microblazeel-linux-user microblaze-linux-user mips64el-linux-user mips64-linux-user mipsel-linux-user mips-linux-user mipsn32el-linux-user mipsn32-linux-user or32-linux-user ppc64abi32-linux-user ppc64le-linux-user ppc64-linux-user ppc-linux-user s390x-linux-user sh4eb-linux-user sh4-linux-user sparc32plus-linux-user sparc64-linux-user sparc-linux-user tilegx-linux-user unicore32-linux-user x86_64-linux-user tcg debug enabled no gprof enabled no sparse enabled no strip binaries yes profiler no static build no pixman system SDL support yes GTK support no GTK GL support no GNUTLS support yes GNUTLS hash yes libgcrypt no nettle yes (3.2) libtasn1 yes VTE support no curses support yes virgl support no curl support yes mingw32 support no Audio drivers pa alsa sdl Block whitelist (rw) Block whitelist (ro) VirtFS support yes VNC support yes VNC SASL support yes VNC JPEG support yes VNC PNG support yes xen support no brlapi support no bluez support yes Documentation yes PIE no vde support yes netmap support no Linux AIO support yes ATTR/XATTR support yes Install blobs yes KVM support yes RDMA support no TCG interpreter no fdt support yes preadv support yes fdatasync yes madvise yes posix_madvise yes sigev_thread_id yes uuid support yes libcap-ng support yes vhost-net support yes vhost-scsi support yes Trace backends nop spice support yes (0.12.10/0.12.6) rbd support yes xfsctl support yes smartcard support yes libusb yes usb net redir yes OpenGL support yes libiscsi support yes libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support yes
coroutine backend ucontext
coroutine pool yes
GlusterFS support yes
Archipelago support no
gcov gcov gcov enabled no TPM support yes libssh2 support yes TPM passthrough no QOM debugging yes vhdx yes lzo support yes snappy support yes bzip2 support yes
NUMA host support no
tcmalloc support no
jemalloc support no/bin/sh /home/share/qemu-devel/QEMU/src/qemu-2.5.0/scripts/make_device_config.sh default-configs/aarch64-softmmu.mak aarch64-softmmu-config-devices.mak.d aarch64-softmmu/config-devices.mak > aarch64-softmmu/config-devices.mak.tmp
<snip>
cc -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/tcg -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/tcg/arm -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/linux-headers -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/linux-headers -I. -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0 -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/include -Ihw/display -Ihw/display -I/usr/include/pixman-1 -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/dtc/libfdt -DHAS_LIBSSH2_SFTP_FSYNC -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 -Wendif-labels -Wmissing-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 -I/usr/include/libpng16 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/spice-1 -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libusb-1.0 -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/tests -MMD -MP -MT hw/display/milkymist-tmu2.o -MF hw/display/milkymist-tmu2.d -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -c -o hw/display/milkymist-tmu2.o hw/display/milkymist-tmu2.c cc -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/tcg -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/tcg/arm -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/linux-headers -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/linux-headers -I. -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0 -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/include -Ihw/display -Ihw/display -I/usr/include/pixman-1 -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/dtc/libfdt -DHAS_LIBSSH2_SFTP_FSYNC -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 -Wendif-labels -Wmissing-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 -I/usr/include/libpng16 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/spice-1 -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libusb-1.0 -I/home/share/qemu-devel/QEMU/src/qemu-2.5.0/tests -MMD -MP -MT hw/display/qxl.o -MF hw/display/qxl.d -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -c -o hw/display/qxl.o hw/display/qxl.c {standard input}: Assembler messages:
{standard input}:2410: Error: bad instruction `lock'
{standard input}:2410: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:2518: Error: bad instruction `lock'
{standard input}:2518: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:3045: Error: bad instruction `lock'
{standard input}:3045: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:3370: Error: bad instruction `lock'
{standard input}:3370: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:7470: Error: bad instruction `lock'
{standard input}:7470: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:9097: Error: bad instruction `lock'
{standard input}:9097: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:9412: Error: bad instruction `lock'
{standard input}:9412: Error: bad instruction `addl $0,0(%rsp)'/home/share/qemu-devel/QEMU/src/qemu-2.5.0/rules.mak:57: recipe for target 'hw/display/qxl.o' failed
make: *** [hw/display/qxl.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
Can anyone help me figure out why QEMU isn't compiling? Help will be greatly appreciated
Kind regards
Quoted 9 lines · Xavier de Rauville
Greetings
I am attempting to compile QEMU for Arch Liux ARM using the build files from here:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/qemuI am targeting the ARMv7hf architecture. Unfortunately, I am getting an error during the build process. I created a log file from makepkg's stdout and stderr streams.
I do build QEMU for 32-bit ARM (on Ubuntu), so this is likely one of:
* your compile environment is broken somehow
* something particular to the QXL/spice code that's being built (which my build config may well not be exercising)
Quoted 20 lines
-c -o
hw/display/qxl.ohw/display/qxl.c
{standard input}: Assembler messages:
{standard input}:2410: Error: bad instruction `lock'
{standard input}:2410: Error: bad instructionaddl $0,0(%rsp)' {standard input}:2518: Error: bad instructionlock'
{standard input}:2518: Error: bad instructionaddl $0,0(%rsp)' {standard input}:3045: Error: bad instructionlock'
{standard input}:3045: Error: bad instructionaddl $0,0(%rsp)' {standard input}:3370: Error: bad instructionlock'
{standard input}:3370: Error: bad instructionaddl $0,0(%rsp)' {standard input}:7470: Error: bad instructionlock'
{standard input}:7470: Error: bad instructionaddl $0,0(%rsp)' {standard input}:9097: Error: bad instructionlock'
{standard input}:9097: Error: bad instructionaddl $0,0(%rsp)' {standard input}:9412: Error: bad instructionlock'
{standard input}:9412: Error: bad instruction `addl $0,0(%rsp)'/home/share/qemu-devel/QEMU/src/qemu-2.5.0/rules.mak:57: recipe for target 'hw/display/qxl.o' failed
make: *** [hw/display/qxl.o] Error 1
==> ERROR: A failure occurred inbuild().
Quoted 1 line
Aborting...
This should really not happen because it implies that we somehow ended up with x86 inline assembly.
Some things to test:
(1) if you configure QEMU with --disable-spice, does it build
OK, or does it just fail later on on some other source file?
(2) does this fail with the current git master?
(3) can you get the compiler to produce the preprocessed
source for us and put it somewhere? (you can rerun the specific failing compiler command and add -save-temps, then it will output a .i file which is the preprocessed output.) That should help to track down exactly what is resulting in these x86 insns getting into the output.
thanks
-- PMM
Quoted 10 lines
Quoted 9 lines
{standard input}:9097: Error: bad instruction `lock'
{standard input}:9097: Error: bad instructionaddl $0,0(%rsp)' {standard input}:9412: Error: bad instructionlock'
{standard input}:9412: Error: bad instruction `addl $0,0(%rsp)'/home/share/qemu-devel/QEMU/src/qemu-2.5.0/rules.mak:57: recipe for target 'hw/display/qxl.o' failed
make: *** [hw/display/qxl.o] Error 1
==> ERROR: A failure occurred inbuild().
Aborting...
Quoted 6 lines
This should really not happen because it implies that we somehow ended up with x86 inline assembly.
Some things to test:
(1) if you configure QEMU with --disable-spice, does it build OK, or does it just fail later on on some other source file?
Thank you for the assistance Peter
I have managed to try your suggestion and made some progress. After I added "--disable-spice", the code compiled without any error. This implies that Spice was causing my problem.
While this may indicate a problem with the spice portion of QEMU's code, I am more convinced that I didn't compile Spice properly and that this is what is causing me problems. I might test this or I might simply not bother with Spice.
Kind regards
Xavier de Rauville
Sent from my BlackBerry Passport.