Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

07.03.2021: Updated instructions to apply patch cleanly

01.06.2021: Updated instructions for Xcode 12.4 and above

Building QEMU

  • Clone QEMU and checkout version 5.2.0
git clone https://github.com/qemu/qemu
cd qemu
git checkout v5.2.0
curl https://patchwork.kernel.org/series/418581/mbox/ | git am --exclude=MAINTAINERS
  • If you use Xcode 12.4 or above, you will need another patch to fix the QEMU build. Download xcode-12-4.patch from below and apply it using
git apply xcode-12-4.patch
  • Install the ARM version of the brew package manager. The (recommended) installation via Rosetta will cause problems when building QEMU. Even if brew screams at you at every launch that this is not a supported configuration I had no major problems so far. You can follow this guide (see the "Multiple Homebrews" section).
  • Install required packages for building:
brew install libffi gettext pkg-config autoconf automake pixman
  • Run the following commands to build qemu:
mkdir build
cd build
../configure --target-list=aarch64-softmmu --disable-gnutls
make -j8
sudo make install
  • For some reason, the qemu binary is modified during make install. You need to resign it with the correct entitlements, otherwise you will get an Unknown Error:
sudo codesign --entitlements /path/to/qemu/accel/hvf/entitlements.plist --force -s - `which qemu-system-aarch64`

Create Ubuntu VM

qemu-img create -f qcow2 disk.qcow2 10G
  • Create an empty file for persisting UEFI variables:
dd if=/dev/zero conv=sync bs=1m count=64 of=ovmf_vars.fd
  • Run qemu with the following command-line arguments:
qemu-system-aarch64 \
    -accel hvf \
    -m 2048 \
    -cpu cortex-a57 -M virt,highmem=off  \
    -drive file=/usr/local/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \
    -drive file=ovmf_vars.fd,if=pflash,format=raw \
    -serial telnet::4444,server,nowait \
    -drive if=none,file=disk.qcow2,format=qcow2,id=hd0 \
    -device virtio-blk-device,drive=hd0,serial="dummyserial" \
    -device virtio-net-device,netdev=net0 \
    -netdev user,id=net0 \
    -vga none -device ramfb \
    -cdrom /path/to/ubuntu.iso \
    -device usb-ehci -device usb-kbd -device usb-mouse -usb \
    -monitor stdio
  • You should be able to install Ubuntu as normal
  • If you want a desktop environment, you can install it using sudo apt-get install ubuntu-desktop

Create Windows VM

  • Download Windows for ARM from here
  • Create an empty file for persisting UEFI variables:
dd if=/dev/zero conv=sync bs=1m count=64 of=ovmf_vars.fd
  • For Windows, we need to replace the VirtIO block device with something that is supported natively by the OS. Otherwise, the command-line is almost unchanged
  • You may want to pass multiple cores to the VM using -smp X:
qemu-system-aarch64 \
    -accel hvf \
    -m 2048 -smp 2 \
    -cpu cortex-a72 -M virt,highmem=off  \
    -drive file=/usr/local/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \
    -drive file=ovmf_vars.fd,if=pflash,format=raw \
    -serial telnet::4444,server,nowait \
    -drive if=none,file=Windows10_InsiderPreview_Client_ARM64_en-us_20231.VHDX,format=vhdx,id=hd0,cache=writethrough \
    -device nvme,drive=hd0,serial="dummyserial" \
    -nic user,model=virtio \
    -vga none -device ramfb \
    -device usb-ehci -device usb-kbd -device usb-mouse -usb \
    -monitor stdio

Limitations

Networking on Windows

Windows does not support VirtIO network interfaces out of the box. To get it working, you need to install additional drivers. See this gist for a guide (be sure to use version 0.1.190 instead of 0.1.185)

Resolution

The resolution is set to 800x600 by default. To change it, hit Esc at the immediately after starting the VM, while you see the tianocore logo, to get into the OVMF config menu. Choose Device Manager -> OVMF Platform Configuration -> Change Preferred -> Select 1024x768 -> Commit Changes and Exit -> Esc -> Reset.

Tweaks

Port Forwarding

Proper NAT networking is currently not possible with QEMU due to the lack of tap devices in macOS Big Sur. If you just want to be able to connect to a port on the VM (e.g. for SSH or RDP), you can configure QEMU to forward a local port to the VM:

    -nic user,model=virtio,hostfwd=tcp:127.0.0.1:3389-0.0.0.0:3389 \

In this case the port for RDP is forwarded so that I can connect to the VM at localhost:3389. The same for Ubuntu/SSH:

    -netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-0.0.0.0:22 \

Disk Snapshots

Some users experience a random filesystem corruptions when booting Windows which can be avoided with the cache=writethrough for the hard drive. You can also perform disk snapshots to save the state of the hard disk at a certain point in time and restore it later. To do this, shut the VM down and create a new disk with your original image as the backing file:

qemu-img create -b Windows10_InsiderPreview_Client_ARM64_en-us_20231.VHDX -F vhdx -f qcow2 disk.qcow2

Now, adjust the -drive parameter so that QEMU boots from your new image:

    -drive if=none,file=disk.qcow2,format=qcow2,id=hd0,cache=writethrough \

If something goes wrong you can now delete disk.qcow2 and recreate it using the same commmand to back to the original state.

diff --git a/Makefile b/Makefile
index bcbbec71a1..8b75085fa5 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,7 @@ x := $(shell rm -rf meson-private meson-info meson-logs)
endif
# 1. ensure config-host.mak is up-to-date
-config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
+config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/QEMU_VERSION
@echo config-host.mak is out-of-date, running configure
@if test -f meson-private/coredata.dat; then \
./config.status --skip-meson; \
@@ -204,7 +204,7 @@ clean: recurse-clean
rm -f TAGS cscope.* *.pod *~ */*~
rm -f fsdev/*.pod scsi/*.pod
-VERSION = $(shell cat $(SRC_PATH)/VERSION)
+VERSION = $(shell cat $(SRC_PATH)/QEMU_VERSION)
dist: qemu-$(VERSION).tar.bz2
diff --git a/QEMU_VERSION b/QEMU_VERSION
new file mode 100644
index 0000000000..5214c0b8b9
--- /dev/null
+++ b/QEMU_VERSION
@@ -0,0 +1 @@
+5.2.0
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 5214c0b8b9..0000000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-5.2.0
diff --git a/meson.build b/meson.build
index 2dc66ae930..a8f8a02b3f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
project('qemu', ['c'], meson_version: '>=0.55.0',
default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'] +
(meson.version().version_compare('>=0.56.0') ? [ 'b_staticpic=false' ] : []),
- version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
+ version: run_command('head', meson.source_root() / 'QEMU_VERSION').stdout().strip())
not_found = dependency('', required: false)
if meson.version().version_compare('>=0.56.0')
@0xbadfca11

This comment has been minimized.

Copy link

@0xbadfca11 0xbadfca11 commented Dec 1, 2020

This change will not persist, you have to repeat the same steps after every boot.

Use storage to store UEFI variables.
https://web.archive.org/web/20190331000332/https://wiki.linaro.org/LEG/UEFIforQEMU#Using_persistent_UEFI_variables

@semaja2

This comment has been minimized.

Copy link

@semaja2 semaja2 commented Dec 1, 2020

I am having issues getting the HVF enabled during the configure for qemu, are you using terminal in Rosetta or have you installed Brew natively? Trying to work out what step is causing my issue

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Dec 1, 2020

@0xbadfca11 Cool, thanks! I updated the guide.

@semaja2 I installed brew natively and have experienced very little problems with that. Almost everything worked so far. It just screams at you every time you run it 😁 Let me know if a Rosetta installation causes build problem.

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Dec 1, 2020

@semaja2 did you try the --enable-hvf flag for configure?

@semaja2

This comment has been minimized.

Copy link

@semaja2 semaja2 commented Dec 1, 2020

@citruz thanks for the quick response, don't have machine in front of me at the moment to test, will have another go tomorrow and let you know

@semaja2

This comment has been minimized.

Copy link

@semaja2 semaja2 commented Dec 2, 2020

The --enable-hvf flag didn't help, but used native brew and it worked fine (after installing some packages I was missing)

However couldn't get the nic working in windows, followed the Japanese guide and appears to have some slightly different steps and that worked a treat

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Dec 2, 2020

Yeah sometimes it's amazing how small variations of the qemu command line cause stuff to break. I figured that for Windows, the correct way is -nic user,model=virtio while Ubuntu needs -device virtio-net-device, ....

@theBadAppl3

This comment has been minimized.

Copy link

@theBadAppl3 theBadAppl3 commented Dec 4, 2020

Thanks for this great work! But after I finished configure and make install, I can't find /hvf as /kvm and /xen in /qemu/accel.

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Dec 4, 2020

Did you apply the patch series correctly? (step 2)
In current qemu the hvf files are in /target/i386/hvf/ but the patch moves code from there into the new /accel/hvf directory.

@theBadAppl3

This comment has been minimized.

Copy link

@theBadAppl3 theBadAppl3 commented Dec 4, 2020

thx :) Let me try that again.

@theBadAppl3

This comment has been minimized.

Copy link

@theBadAppl3 theBadAppl3 commented Dec 4, 2020

Got patched and configure, make and make install done. But when I go to the final step "qemu-system-aarch64 -accel hvf ..." before actually installation: I got an Error from zsh said: "zsh: killed qemu-system-aarch64 -accel hvf -m 2048 -cpu cortex-a57 -M virt,highmem=off"
I checked but the machine was not in high loaded. Even I restart the Mac and do that again the qemu process got killed as well.

@theBadAppl3

This comment has been minimized.

Copy link

@theBadAppl3 theBadAppl3 commented Dec 4, 2020

Even trying "qemu-system-aarch64 --version" in Terminal.app shows me "zsh: killed qemu-system-aarch64 --version"

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Dec 4, 2020

Sounds like code signing issue. After the sudo make install, did you resign the binary as explained in the following step?

@theBadAppl3

This comment has been minimized.

Copy link

@theBadAppl3 theBadAppl3 commented Dec 4, 2020

Delete the /build and redo the configure, make and make install with codesign process. Then the system actually boot up! This is insane! Thank you for your amazing job!

@ms1995

This comment has been minimized.

Copy link

@ms1995 ms1995 commented Dec 29, 2020

At least on my system, ninja and glib are also needed for compilation. Both can be installed using Homebrew.

@crookedstorm

This comment has been minimized.

Copy link

@crookedstorm crookedstorm commented Jan 18, 2021

I also needed ninja and glib, but additionally, using v5 of the patch at least, I had to add exports for CFLAGS, CPPFLAGS, etc. like export CFLAGS="-I/opt/homebrew/include" for it to find gnutls/gnutls.h during the compile. I'm sure some people have that set up already, but in case that helps anyone else.

@mikegil

This comment has been minimized.

Copy link

@mikegil mikegil commented Jan 21, 2021

I know that it will be because I'm doing something dumb, but for the life of me I can figure it out...I get the following error everytime I try the make step:

ld: warning: ignoring file libqemuutil.a, building for macOS-arm64 but attempting to link with file built for macOS-arm64

It seems to be warning me that I am trying to build for macOS-arm64 (which I am) but I'm using files compiled for macOS-arm64 (which I am). This can't be a "real" error, so if you have any ideas what it's really complaining about I'd be grateful for hints.

@thedocbwarren

This comment has been minimized.

Copy link

@thedocbwarren thedocbwarren commented Jan 30, 2021

Patch is gone, any way for this to make it upstream for release?

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Jan 31, 2021

I updated the gist with the most recent version of the patchseries.

@thedocbwarren

This comment has been minimized.

Copy link

@thedocbwarren thedocbwarren commented Jan 31, 2021

Have an issue (happened to older patch:)

curl https://patchwork.kernel.org/series/418581/mbox/ | git am
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k  100  182k    0     0   393k      0 --:--:-- --:--:-- --:--:--  394k
Applying: hvf: Add hypervisor entitlement to output binaries
error: accel/hvf/entitlements.plist: already exists in index
error: patch failed: meson.build:2146
error: meson.build: patch does not apply
error: scripts/entitlement.sh: already exists in index
Patch failed at 0001 hvf: Add hypervisor entitlement to output binaries
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Using official (main) branch from github: https://github.com/qemu/qemu

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Feb 6, 2021

Oh it looks like the first patch of the series which adds the entitlements file has already been merged into master. Thus the error. You should be fine with skipping the first patch via git am --skip.

@SebDanielsson

This comment has been minimized.

Copy link

@SebDanielsson SebDanielsson commented Feb 6, 2021

Trying to do this on the latest v5.2.0 and applying v6 patches from Alexander Graf but I get the following error when trying to start:
qemu-system-aarch64: -accel hvf: invalid accelerator hvf

@thedocbwarren

This comment has been minimized.

Copy link

@thedocbwarren thedocbwarren commented Feb 9, 2021

may have more merged:

git am --skip
Applying: hvf: x86: Remove unused definitions
Applying: hvf: Move common code out
error: patch failed: accel/meson.build:1
error: accel/meson.build: patch does not apply
error: target/i386/hvf/hvf-cpus.c: does not exist in index
error: target/i386/hvf/hvf-cpus.h: does not exist in index
error: patch failed: target/i386/hvf/hvf-i386.h:18
error: target/i386/hvf/hvf-i386.h: patch does not apply
error: patch failed: target/i386/hvf/hvf.c:72
error: target/i386/hvf/hvf.c: patch does not apply
error: patch failed: target/i386/hvf/meson.build:1
error: target/i386/hvf/meson.build: patch does not apply
error: patch failed: target/i386/hvf/x86hvf.c:32
error: target/i386/hvf/x86hvf.c: patch does not apply
Patch failed at 0003 hvf: Move common code out

@thedocbwarren

This comment has been minimized.

Copy link

@thedocbwarren thedocbwarren commented Feb 11, 2021

Believe patch is no longer compatible with official source. Looks like a merge broke patch v6

@thedocbwarren

This comment has been minimized.

Copy link

@thedocbwarren thedocbwarren commented Feb 11, 2021

Trying to do this on the latest v5.2.0 and applying v6 patches from Alexander Graf but I get the following error when trying to start:
qemu-system-aarch64: -accel hvf: invalid accelerator hvf

Same when the patches fail. Can't currently patch the source as of now.

@yu3fms

This comment has been minimized.

Copy link

@yu3fms yu3fms commented Feb 12, 2021

Hallo, after some struggle got Alpine linux running on M1 with hvf acceleration.

  1. git cloned QEMU master branch
  2. installed brew for ARM following https://soffes.blog/homebrew-on-apple-silicon
  3. brew install libffi gettext pkg-config autoconf automake pixman libjpeg libpng libusb ninja glib
  4. now checkout at this head from qemu git: git checkout 56a11a9b7580b576a9db930667be07f1dd1564d5
  5. now apply patches like said in the guide: curl https://patchwork.kernel.org/series/418581/mbox/ | git am
  6. then configure with: ../configure --target-list=aarch64-softmmu --enable-hvf --disable-gnutls
    (without --disable-gnutls "make" will fail, I do not need it so got it disabled)

after this proceed as it is in the guide.

Thank you all very much and cheers!

@thedocbwarren

This comment has been minimized.

Copy link

@thedocbwarren thedocbwarren commented Feb 12, 2021

Hallo, after some struggle got Alpine linux running on M1 with hvf acceleration.

1. git cloned QEMU master branch

2. installed brew for ARM following https://soffes.blog/homebrew-on-apple-silicon

3. brew install libffi gettext pkg-config autoconf automake pixman libjpeg libpng libusb ninja glib

4. now checkout at this head from qemu git: git checkout 56a11a9b7580b576a9db930667be07f1dd1564d5

5. now apply patches like said in the guide: curl https://patchwork.kernel.org/series/418581/mbox/ | git am

6. then configure with: ../configure --target-list=aarch64-softmmu --enable-hvf --disable-gnutls
   (without --disable-gnutls "make" will fail, I do not need it so got it disabled)

after this proceed as it is in the guide.

Thank you all very much and cheers!

This works! Installed Ubuntu with success. I do notice some keyboard reset issues that probably will get worked out over time, however works super well!

@SebDanielsson

This comment has been minimized.

Copy link

@SebDanielsson SebDanielsson commented Feb 14, 2021

Does anyone have a good tutorial to enable spice/qxl video driver for this? Read somewhere that it enables you to run in retina resolutions.

@yangyueche

This comment has been minimized.

Copy link

@yangyueche yangyueche commented Mar 3, 2021

Thank you, this is great!
Can I run VirtualBox with this?

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Mar 7, 2021

The patchseries is still compatible with QEMU 5.2.0, except for a trivial conflict in MAINTAINERS. You can simple skip that file using git am --exclude=MAINTAINERS. I updated the instructions.

@ahmadfakhari

This comment has been minimized.

Copy link

@ahmadfakhari ahmadfakhari commented Mar 23, 2021

I am trying to install Ubuntu on a MacBook Pro Silicon (M1 CPU) but facing a problem running:

mkdir build
cd build
../configure --target-list=aarch64-softmmu
make -j8
sudo make install

It gives several errors, and finally:
qemu/include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found
#include <gnutls/gnutls.h>
^~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
make: *** [run-ninja] Error 1

I would appreciate your help to realise what is going on.

@mikegil

This comment has been minimized.

Copy link

@mikegil mikegil commented Mar 23, 2021

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Mar 23, 2021

I am trying to install Ubuntu on a MacBook Pro Silicon (M1 CPU) but facing a problem running:

mkdir build
cd build
../configure --target-list=aarch64-softmmu
make -j8
sudo make install

It gives several errors, and finally:
qemu/include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found
#include <gnutls/gnutls.h>
^~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
make: *** [run-ninja] Error 1

I would appreciate your help to realise what is going on.

@ahmadfakhari Try adding --disable-gnutls to the configure command.

@fishphhd

This comment has been minimized.

Copy link

@fishphhd fishphhd commented Mar 27, 2021

Thanks for your manual. I tried to start this with libvirt with this manual to start the qemu at boot time. But this takes the wrong accelerator.

Error: Error while defining a domain from ubuntu.xml
Error: internal error: Failed to start QEMU binary /usr/local/bin/qemu-system-aarch64 for probing: qemu-system-aarch64: invalid accelerator kvm
Could not allocate dynamic translator buffer

Any idea?

My question on stackoverflow.com

I used this xml to define with virsh (virsh define ubuntu.xml):

<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
    <name>ubuntu</name>
    <uuid>2005CB24-522A-4485-9B9A-E60A61D9F8CF</uuid>
    <memory unit='GB'>2</memory>
    <cpu mode='custom'>
        <model>Westmere</model>
    </cpu>
    <vcpu>2</vcpu>
    <features>
        <acpi/>
        <apic/>
    </features>
    <os>
        <type arch='aarch64' machine='cortex-a57'>hvf</type>
        <bootmenu enable='yes'/>
    </os>
    <clock offset='localtime'/>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>destroy</on_crash>
    <pm>
        <suspend-to-mem enabled='no'/>
        <suspend-to-disk enabled='no'/>
    </pm>
    <devices>
        <emulator>/usr/local/bin/qemu-system-aarch64</emulator>
        <controller type='usb' model='ehci'/>
        <disk type='file' device='disk'>
            <driver name='qemu' type='qcow2'/>
            <source file='/Users/user/VM/Ubuntu_20.04-LTS/disk.qcow2'/>
            <target dev='vda' bus='virtio'/>
        </disk>
        <!--disk type='file' device='cdrom'>
            <source file='/Users/user/VM/Ubuntu_20.04-LTS/ubuntu-20.04.2-live-server-arm64.iso'/>
            <target dev='sdb' bus='sata'/>
        </disk-->
        <console type='pty'>
            <target type='serial'/>
        </console>
        <input type='tablet' bus='usb'/>
        <input type='keyboard' bus='usb'/>
        <graphics type='vnc' port='5900' listen='127.0.0.1'/>
        <video>
            <model type='virtio' vram='16384'/>
        </video>
    </devices>
    <seclabel type='none'/>
    <qemu:commandline>
        <!--qemu:arg value='-machine'/>
        <qemu:arg value='type=q35,accel=hvf'/>
        <qemu:arg value='-netdev'/>
        <qemu:arg value='user,id=n1,hostfwd=tcp::2222-:22'/>
        <qemu:arg value='-device'/>
        <qemu:arg value='virtio-net-pci,netdev=n1,bus=pcie.0,addr=0x19'/-->
	<qemu:arg value='-accel hvf -m 2048 -cpu cortex-a57 -M virt,highmem=off'/>
	<qemu:arg value='-drive file=/usr/local/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on'/>
	<qemu:arg value='-drive file=ovmf_vars.fd,if=pflash,format=raw'/>
	<qemu:arg value='-serial telnet::4444,server,nowait'/>
	<qemu:arg value='-device virtio-blk-device,drive=hd0,serial="dummyserial"'/>
	<qemu:arg value='-device virtio-net-device,netdev=net0'/>
	<qemu:arg value='-netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-0.0.0.0:22'/>
	<qemu:arg value='-vga none -device ramfb'/>
	<qemu:arg value='-device usb-ehci -device usb-kbd -device usb-mouse -usb'/>
	<qemu:arg value='-nographic -serial mon:stdio'/>
    </qemu:commandline>
</domain>

@citruz

This comment has been minimized.

Copy link
Owner Author

@citruz citruz commented Mar 30, 2021

M1 support is added in the upcoming release of QEMU (6.0) - RC0 comes out today.

@mikegil are you sure about that? I don't see it in the source tree unfortunately https://github.com/qemu/qemu/tree/v6.0.0-rc1/accel/hvf

The changelog states that TCG (emulation) has been updated to work on Apple Silicon, but nothing about @agraf's patches for Hypervisor.framework on Arm.

@faaaaabi

This comment has been minimized.

Copy link

@faaaaabi faaaaabi commented Apr 2, 2021

I also did as explained and getting

qemu-system-aarch64: -accel hvf: invalid accelerator hvf

I also did the resigning as explained

@kripsy

This comment has been minimized.

Copy link

@kripsy kripsy commented Apr 10, 2021

I also did as explained and getting

qemu-system-aarch64: -accel hvf: invalid accelerator hvf

I also did the resigning as explained

i have same problem

@zoain-it

This comment has been minimized.

Copy link

@zoain-it zoain-it commented Apr 16, 2021

How I use sound

@SebDanielsson

This comment has been minimized.

Copy link

@SebDanielsson SebDanielsson commented Apr 29, 2021

With QEMU 6.0 now released, anyone got an idea which patches are now included and which are still missing? A list would be nice 👍

@Lunaticf

This comment has been minimized.

Copy link

@Lunaticf Lunaticf commented May 2, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t  mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
                                                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
  ^````

use the instruction...dont know why compile error
@zoain-it

This comment has been minimized.

Copy link

@zoain-it zoain-it commented May 3, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````

use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

@Lunaticf

This comment has been minimized.

Copy link

@Lunaticf Lunaticf commented May 3, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````
use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

thank you, install xcode is not working. I just want to install qemu on mac m1, tried so many solutions.

@zoain-it

This comment has been minimized.

Copy link

@zoain-it zoain-it commented May 3, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````
use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

thank you, install xcode is not working. I just want to install qemu on mac m1, tried so many solutions.

Just modify the name of the VERSION file under qemu, and he read the one include when compiling. So https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff

@Lunaticf

This comment has been minimized.

Copy link

@Lunaticf Lunaticf commented May 3, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````
use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

thank you, install xcode is not working. I just want to install qemu on mac m1, tried so many solutions.

Just modify the name of the VERSION file under qemu, and he read the one include when compiling. So https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff

change the �VERSION file to QEMU_VERSION still the same error....

@zoain-it

This comment has been minimized.

Copy link

@zoain-it zoain-it commented May 3, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````
use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

thank you, install xcode is not working. I just want to install qemu on mac m1, tried so many solutions.

Just modify the name of the VERSION file under qemu, and he read the one include when compiling. So https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff

change the �VERSION file to QEMU_VERSION still the same error....

Did you apply all the changes in that patch?

@Lunaticf

This comment has been minimized.

Copy link

@Lunaticf Lunaticf commented May 3, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````
use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

thank you, install xcode is not working. I just want to install qemu on mac m1, tried so many solutions.

Just modify the name of the VERSION file under qemu, and he read the one include when compiling. So https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff

change the �VERSION file to QEMU_VERSION still the same error....

Did you apply all the changes in that patch?

just did this above
curl https://patchwork.kernel.org/series/418581/mbox/ | git am --exclude=MAINTAINERS
make me crazy

@zoain-it

This comment has been minimized.

Copy link

@zoain-it zoain-it commented May 3, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````
use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

thank you, install xcode is not working. I just want to install qemu on mac m1, tried so many solutions.

Just modify the name of the VERSION file under qemu, and he read the one include when compiling. So https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff

change the �VERSION file to QEMU_VERSION still the same error....

Did you apply all the changes in that patch?

just did this above
curl https://patchwork.kernel.org/series/418581/mbox/ | git am --exclude=MAINTAINERS
make me crazy

On this basis, just merge https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff.

@wintifrosch

This comment has been minimized.

Copy link

@wintifrosch wintifrosch commented May 12, 2021

building qemu failed. full log on my dropbox

...
admin@Mac-mini-von-Admin qemu % mkdir build
cd build
../configure --target-list=aarch64-softmmu --disable-gnutls
make -j8
sudo make install
...
[830/2393] Compiling C++ object libcommon.fa.p/disas_libvixl_vixl_utils.cc.o
FAILED: libcommon.fa.p/disas_libvixl_vixl_utils.cc.o 
[830/2393] Compiling C++ object libcommon.fa.p/disas_libvixl_vixl_utils.cc.o
FAILED: libcommon.fa.p/disas_libvixl_vixl_utils.cc.o 
c++ -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/jpeg/9d/include -I/opt/homebrew/Cellar/libffi/3.3_3/include -I/opt/homebrew/Cellar/glib/2.68.2/include -I/opt/homebrew/Cellar/glib/2.68.2/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.68.2/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.2/include/gio-unix-2.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/admin/qemu/tcg/aarch64 -iquote . -iquote /Users/admin/qemu -iquote /Users/admin/qemu/accel/tcg -iquote /Users/admin/qemu/include -iquote /Users/admin/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_utils.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_utils.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_utils.cc.o -c ../disas/libvixl/vixl/utils.cc
In file included from ../disas/libvixl/vixl/utils.cc:27:
In file included from /Users/admin/qemu/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
5.2.0
^
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.
make: *** [run-ninja] Error 1
admin@Mac-mini-von-Admin build % 
@mateuszdrab

This comment has been minimized.

Copy link

@mateuszdrab mateuszdrab commented May 18, 2021

c++ -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -I../dtc/libfdt -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/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/libslirp/4.4.0_1/include/slirp -I/opt/homebrew/Cellar/libusb/1.0.24/include/libusb-1.0 -fcolor-diagnostics -Wall -Winvalid-pch -Wnon-virtual-dtor -std=gnu++11 -O2 -g -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 -iquote /Users/lunaticf/qemu/tcg/aarch64 -iquote . -iquote /Users/lunaticf/qemu -iquote /Users/lunaticf/qemu/accel/tcg -iquote /Users/lunaticf/qemu/include -iquote /Users/lunaticf/qemu/disas/libvixl -MD -MQ libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -MF libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o.d -o libcommon.fa.p/disas_libvixl_vixl_a64_decoder-a64.cc.o -c ../disas/libvixl/vixl/a64/decoder-a64.cc
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:418:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/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:310:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:28:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/utils.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:309:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
5.2.50
^
In file included from ../disas/libvixl/vixl/a64/decoder-a64.cc:29:
In file included from /Users/lunaticf/qemu/disas/libvixl/vixl/a64/decoder-a64.h:30:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/list:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:672:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:206:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:107:48: error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:55:3: note: '__mbstate_t' declared here
} __mbstate_t;
^````
use the instruction...dont know why compile error

https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3727099

thank you, install xcode is not working. I just want to install qemu on mac m1, tried so many solutions.

Just modify the name of the VERSION file under qemu, and he read the one include when compiling. So https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff

change the �VERSION file to QEMU_VERSION still the same error....

Did you apply all the changes in that patch?

just did this above
curl https://patchwork.kernel.org/series/418581/mbox/ | git am --exclude=MAINTAINERS
make me crazy

On this basis, just merge https://github.com/knazarov/homebrew-qemu-virgl/blob/master/Patches/qemu-version-v01.diff.

I merged this patch along with the two patches from https://arstechnica.com/civis/viewtopic.php?f=19&t=1473419 to compile a qemu capable of running x86 on m1 but I get stuck at the following error:

../target/i386/hvf/vmx.h:162:5: note: did you mean 'hv_vcpu_run'?

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Hypervisor.framework/Headers/hv_vcpu.h:238:1: note: 'hv_vcpu_run' declared here
hv_vcpu_run(hv_vcpu_t vcpu);
^
In file included from ../target/i386/hvf/x86_task.c:17:
../target/i386/hvf/vmx.h:165:34: error: unknown type name 'hv_vcpuid_t'; did you mean 'hv_vcpu_t'?
static inline void macvm_set_cr4(hv_vcpuid_t vcpu, uint64_t cr4)
^~~~~~~~~~~
hv_vcpu_t
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Hypervisor.framework/Headers/hv_vcpu_types.h:37:18: note: 'hv_vcpu_t' declared here
typedef uint64_t hv_vcpu_t;
^
In file included from ../target/i386/hvf/x86_task.c:17:
../target/i386/hvf/vmx.h:173:5: error: implicit declaration of function 'hv_vcpu_invalidate_tlb' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
hv_vcpu_invalidate_tlb(vcpu);
^
../target/i386/hvf/vmx.h:174:5: error: implicit declaration of function 'hv_vcpu_flush' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
hv_vcpu_flush(vcpu);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

That means the SDK version is different?

@ihsakashi

This comment has been minimized.

Copy link

@ihsakashi ihsakashi commented May 24, 2021

@fishphhd I've got a working Libvirt solution. In your case, you need to add -machine accel=hvf,highmem=off. I opened a repo, https://github.com/ihsakashi/VM . Refer to that.

@nrjdalal

This comment has been minimized.

Copy link

@nrjdalal nrjdalal commented Jun 6, 2021

Installation method above is using QEMU v5.2.0 and Patch Series v6. Also code is signed manually and needs patching for Xcode.

The method above bring a lot redundancy as of June 2021.

Best practice for QEMU installation as of now is given below.

QEMU Silicon Mac Installation

Changelog -

  • QEMU v5.2.0 -> v6.0.0
  • HVF Patch Series v6 -> v8
  • Removes redundant Xcode patching
  • Removes redundant code signing

The link above also provides one command installer.

@nrjdalal

This comment has been minimized.

Copy link

@nrjdalal nrjdalal commented Jun 6, 2021

Those of you, still having issues installing QEMU, can look into one click installer at the provided link. Be sure to uninstall any instances of QEMU that are installed using brew.

QEMU Silicon Mac Installation

@ywiyogo

This comment has been minimized.

Copy link

@ywiyogo ywiyogo commented Jul 18, 2021

I also did as explained and getting

qemu-system-aarch64: -accel hvf: invalid accelerator hvf

I also did the resigning as explained
@faaaaabi & @kripsy

You missed the section:

sudo codesign --entitlements /path/to/qemu/accel/hvf/entitlements.plist --force -s - `which qemu-system-aarch64`

If the command hangs, try to run which qemu-system-aarch64 first, and copy the path manually.

@KvizadSaderah

This comment has been minimized.

Copy link

@KvizadSaderah KvizadSaderah commented Aug 10, 2021

sudo codesign --entitlements /path/to/qemu/accel/hvf/entitlements.plist --force -s - `which qemu-system-aarch64`

If the command hangs, try to run which qemu-system-aarch64 first, and copy the path manually.

Hi! Even after

sudo codesign --entitlements /path/to/qemu/accel/hvf/entitlements.plist --force -s - `which qemu-system-aarch64`

it still give error qemu-system-aarch64: -accel hvf: invalid accelerator hvf

@kiranchavala

This comment has been minimized.

Copy link

@kiranchavala kiranchavala commented Aug 23, 2021

Facing the same issue, any updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment