qemu-discuss
[Top][All Lists]
Advanced

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

Re: QEMU compile error on macOS


From: Peter Maydell
Subject: Re: QEMU compile error on macOS
Date: Sun, 2 May 2021 12:47:56 +0100

On Sun, 2 May 2021 at 05:02, Brett Dong <brett.browning.dong@gmail.com> wrote:
>
> Hi all,
>
> I downloaded QEMU 6.0.0 source code and tried to compile but got the 
> following error:
>
> FAILED: libcommon.fa.p/disas_arm-a64.cc.o
> clang++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone 
> -I../dtc/libfdt -I../slirp -I../slirp/src -Iqapi -Itrace -Iui -Iui/shader 
> -I/opt/homebrew/Cellar/pixman/0.40.0/include/pixman-1 
> -I/opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 
> -I/opt/homebrew/Cellar/jpeg/9d/include 
> -I/opt/homebrew/Cellar/gnutls/3.6.15/include 
> -I/opt/homebrew/Cellar/nettle/3.7.2/include 
> -I/opt/homebrew/Cellar/libtasn1/4.16.0_1/include 
> -I/opt/homebrew/Cellar/libidn2/2.3.0/include 
> -I/opt/homebrew/Cellar/p11-kit/0.23.22/include/p11-kit-1 
> -I/opt/homebrew/Cellar/libffi/3.3_3/include 
> -I/opt/homebrew/Cellar/glib/2.68.1/include 
> -I/opt/homebrew/Cellar/glib/2.68.1/include/glib-2.0 
> -I/opt/homebrew/Cellar/glib/2.68.1/lib/glib-2.0/include 
> -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre/8.44/include 
> -I/opt/homebrew/Cellar/glib/2.68.1/include/gio-unix-2.0 
> -I/opt/homebrew/Cellar/zstd/1.4.9_1/include 
> -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 
> -I/opt/homebrew/Cellar/usbredir/0.8.0/include -Xclang -fcolor-diagnostics 
> -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -iquote . 
> -iquote /Users/brett/Downloads/qemu-6.0.0 -iquote 
> /Users/brett/Downloads/qemu-6.0.0/include -iquote 
> /Users/brett/Downloads/qemu-6.0.0/disas/libvixl -iquote 
> /Users/brett/Downloads/qemu-6.0.0/tcg/aarch64 -iquote 
> /Users/brett/Downloads/qemu-6.0.0/accel/tcg -D__STDC_LIMIT_MACROS 
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DOS_OBJECT_USE_OBJC=0 
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wundef 
> -Wwrite-strings -fno-strict-aliasing -fno-common -fwrapv -Wtype-limits 
> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body 
> -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides 
> -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int 
> -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -Wno-psabi 
> -fstack-protector-strong -isysroot 
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DSTRUCT_IOVEC_DEFINED 
> -MD -MQ libcommon.fa.p/disas_arm-a64.cc.o -MF 
> libcommon.fa.p/disas_arm-a64.cc.o.d -o libcommon.fa.p/disas_arm-a64.cc.o -c 
> ../disas/arm-a64.cc
> In file included from ../disas/arm-a64.cc:25:
> In file included from 
> /Users/brett/Downloads/qemu-6.0.0/disas/libvixl/vixl/a64/disasm-a64.h:31:
> In file included from 
> /Users/brett/Downloads/qemu-6.0.0/disas/libvixl/vixl/utils.h:31:
> In file included from 
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:308:
> In file included from 
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309:
> In file included from 
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:417:
> In file included from 
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
> ../version:1:1: error: expected unqualified-id
> 6.0.0
> ^

This is fault of the most recent MacOS SDK (11.3), which has done a
pretty daft thing
and expects "#include <version>" to work, which it won't for any project which
(a) has a file named "VERSION" and (b) puts its source directory on
the include path.

There is a proposed fix/workaround here:
https://patchew.org/QEMU/CA+pCdY09+OQfXq3YmRNuQE59ACOq7Py2q4hqOwgq4PnepCXhTA@mail.gmail.com/

but it's not yet clear if that is the right fix.

thanks
-- PMM



reply via email to

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