[PATCH] Update to a cleaner build path on macOS 27. ParavirtualizationGraphics.framework API has changed significantly.

DB Holder posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260826203700.39057-1-dude@angrygoose.dev
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
meson.build | 8 ++++++++
1 file changed, 8 insertions(+)
[PATCH] Update to a cleaner build path on macOS 27. ParavirtualizationGraphics.framework API has changed significantly.
Posted by DB Holder 1 month ago

 API marked obsolete in xcrun --show-sdk-path + /System/Library/Frameworks/ParavirtualizedGraphics.framework/Headers/PGDevice.h

Signed-off-by: DB Holder <dude@angrygoose.dev>
---
 meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meson.build b/meson.build
index 6dcfdceb50..a6b11cb009 100644
--- a/meson.build
+++ b/meson.build
@@ -852,6 +852,14 @@ elif host_os == 'darwin'
   host_dsosuf = '.dylib'
   pvg = dependency('appleframeworks', modules: ['ParavirtualizedGraphics', 'Metal'],
                    required: get_option('pvg'))
+  if pvg.found() and not objc.has_type('PGTask_t',
+                          prefix: '#import <ParavirtualizedGraphics/ParavirtualizedGraphics.h>',
+                          dependencies: pvg)
+    if get_option('pvg').enabled()
+      error('ParavirtualizedGraphics framework found, but the API lacks PGTask_t')
+    endif
+    pvg = not_found
+  endif
 elif host_os == 'sunos'
   socket = [cc.find_library('socket'),
             cc.find_library('nsl'),
-- 
2.54.0 (Apple Git-157)
Re: [PATCH] Update to a cleaner build path on macOS 27. ParavirtualizationGraphics.framework API has changed significantly.
Posted by Mohamed Mediouni 1 month ago

> On 26. Aug 2026, at 22:37, DB Holder <dude@angrygoose.dev> wrote:
> 
> 
> API marked obsolete in xcrun --show-sdk-path + /System/Library/Frameworks/ParavirtualizedGraphics.framework/Headers/PGDevice.h
> 
> Signed-off-by: DB Holder <dude@angrygoose.dev>
> ---
> meson.build | 8 ++++++++
> 1 file changed, 8 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index 6dcfdceb50..a6b11cb009 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -852,6 +852,14 @@ elif host_os == 'darwin'
>   host_dsosuf = '.dylib'
>   pvg = dependency('appleframeworks', modules: ['ParavirtualizedGraphics', 'Metal'],
>                    required: get_option('pvg'))
> +  if pvg.found() and not objc.has_type('PGTask_t',
> +                          prefix: '#import <ParavirtualizedGraphics/ParavirtualizedGraphics.h>',
> +                          dependencies: pvg)
> +    if get_option('pvg').enabled()
> +      error('ParavirtualizedGraphics framework found, but the API lacks PGTask_t')
> +    endif
> +    pvg = not_found
> +  endif

Hi,

There's a newer path (RFC already sent since a while) that works on macOS 27.
The older path already had the IOSurface mapper side gone since macOS 15.4 so this
is not exactly new. It’s just marked as deprecated now since x86_64 macOS support is
formally gone.


> elif host_os == 'sunos'
>   socket = [cc.find_library('socket'),
>             cc.find_library('nsl'),
> -- 
> 2.54.0 (Apple Git-157)
> 
> 
> 
>