[MacPorts] #71857: qemu @9.2.0_0 +cocoa+curses+spice+spice_protocol+ssh+target_arm+target_i386+target_x86_64+usb+vnc: error: call to undeclared function 'hv_vm_config_get_default_ipa_size'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
MacPorts
noreply at macports.org
Wed Feb 5 23:59:50 UTC 2025
#71857: qemu @9.2.0_0
+cocoa+curses+spice+spice_protocol+ssh+target_arm+target_i386+target_x86_64+usb+vnc:
error: call to undeclared function 'hv_vm_config_get_default_ipa_size'; ISO
C99 and later do not support implicit function declarations [-Wimplicit-
function-declaration]
----------------------+----------------------------
Reporter: lafpark | Owner: raimue
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords: monterey arm64
Port: qemu |
----------------------+----------------------------
Comment (by raimue):
This observation seems correct to me. The problem occurs in
target/arm/hvf/hvf.c that is only compiled on arm64 for
Hypervisor.framework.
Upstream regularly drops support for older macOS releases and consequently
removes any #ifdef guards in the code. The current qemu version officially
only supports macOS >= 13. We were lucky that the build worked at all on
macOS 12 x86_64.
The upstream commit introducing the problem for macOS 12 seems to be this
one:
https://github.com/qemu/qemu/commit/2c760670af5f013d99d50f627275a482fd491e3f
As a workaround, we might still be able to build without support for
Hypervisor.framework with `--disable-hvf` as a configure option on macOS
12 arm64 as a workaround. However, that would result in a QEMU that has no
hardware acceleration and will be of limited use.
Alternatively, this completely untested patch could help (if there are not
more places like this one), but I have no macOS12 arm64 machine to try
this:
{{{#!diff
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 0afd96018..f7b4b4392 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -972,6 +972,8 @@ void hvf_arch_vcpu_destroy(CPUState *cpu)
hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range)
{
+#if defined(MAC_OS_VERSION_13_0) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_13_0
hv_return_t ret;
hv_vm_config_t config = hv_vm_config_create();
@@ -982,6 +984,9 @@ hv_return_t hvf_arch_vm_create(MachineState *ms,
uint32_t pa_range)
chosen_ipa_bit_size = pa_range;
ret = hv_vm_create(config);
+#else
+ ret = hv_vm_create(HV_VM_DEFAULT);
+#endif
cleanup:
os_release(config);
}}}
--
Ticket URL: <https://trac.macports.org/ticket/71857#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list