Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed on M4 macbook #36

Open
MrCyjaneK opened this issue Jan 3, 2025 · 1 comment
Open

Build failed on M4 macbook #36

MrCyjaneK opened this issue Jan 3, 2025 · 1 comment

Comments

@MrCyjaneK
Copy link

~ linsk build
time=2025-01-03T10:53:06.834+01:00 level=INFO msg="Starting to download file" caller=storage from=https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/aarch64/alpine-virt-3.18.3-aarch64.iso to=/Users/user/.linsk/alpine-3.18.3-aarch64.img
time=2025-01-03T10:53:09.456+01:00 level=INFO msg="Successfully downloaded file" caller=storage from=https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/aarch64/alpine-virt-3.18.3-aarch64.iso to=/Users/user/.linsk/alpine-3.18.3-aarch64.img out-size="65 MB"
time=2025-01-03T10:53:09.457+01:00 level=INFO msg="Starting to download file" caller=storage from=https://github.com/qemu/qemu/raw/86305e864191123dcf87c3af639fddfc59352ac6/pc-bios/edk2-aarch64-code.fd.bz2 to=/Users/user/.linsk/edk2-aarch64-code.fd
time=2025-01-03T10:53:10.448+01:00 level=INFO msg="Successfully downloaded file" caller=storage from=https://github.com/qemu/qemu/raw/86305e864191123dcf87c3af639fddfc59352ac6/pc-bios/edk2-aarch64-code.fd.bz2 to=/Users/user/.linsk/edk2-aarch64-code.fd out-size="67 MB"
time=2025-01-03T10:53:10.449+01:00 level=INFO msg="Building VM image" caller=storage tags=3.18.3-aarch64 overwriting=false dst=/Users/user/.linsk/3.18.3-aarch64-linsk1.qcow2
time=2025-01-03T10:53:10.458+01:00 level=WARN msg="Using unrestricted VM networking" caller=storage subcaller=imgbuilder subcaller=vm
time=2025-01-03T10:53:10.461+01:00 level=INFO msg="Booting the VM" caller=storage subcaller=imgbuilder subcaller=vm
time=2025-01-03T10:53:10.481+01:00 level=WARN msg="Canceling the VM context" caller=storage subcaller=imgbuilder subcaller=vm
time=2025-01-03T10:53:10.481+01:00 level=ERROR msg="Failed to start the VM" error="cancel on exit: interrupt cmd: no such process (qemu stderr log: 'Unexpected error in object_property_find_err() at ../qom/object.c:1350:\\nqemu-system-aarch64: Property 'host-arm-cpu.sme' not found')"

I've installed it using go install method, qemu version 9.2.0.

I was able to overcome this issue be applying the following patch, which also required me to increase timeouts in certain cases:

diff --git a/vm/cfg.go b/vm/cfg.go
index 2910eb2..94d081b 100644
--- a/vm/cfg.go
+++ b/vm/cfg.go
@@ -66,7 +66,7 @@ func configureBaseVMCmd(logger *slog.Logger, cfg Config) (string, []qemucli.Arg,
 	}
 
 	if osspecifics.IsMacOS() {
-		args = append(args, qemucli.MustNewStringArg("cpu", "host"))
+		args = append(args, qemucli.MustNewStringArg("cpu", "cortex-a57"))
 	}
 
 	var accel []qemucli.KeyValueArgItem
@AlexSSD7
Copy link
Owner

AlexSSD7 commented Jan 3, 2025

Thanks for bringing this up and for documenting the workaround, though please note that I am able to do much since it is a bug in QEMU, not in Linsk.

(QEMU issue here: https://gitlab.com/qemu-project/qemu/-/issues/2721)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants