Marc-André Lureau <marcandre.lur...@gmail.com> writes:

> Hi
>
> On Wed, Jun 5, 2024 at 5:35 PM Alex Bennée <alex.ben...@linaro.org> wrote:
>
>  As the latest features for virtio-gpu need a pretty recent version of
>  libvirglrenderer. When it is not available on the system we can use a
>  meson wrapper and provide it when --download is specified in
>  configure.
>
>  We have to take some additional care as currently QEMU will hang
>  libvirglrenderer fails to exec the render server. As the error isn't
>  back propagated we make sure we at least test we have a path to an
>  executable before tweaking the environment.
>
>  Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
>  Cc: Manos Pitsidianakis <manos.pitsidiana...@linaro.org>
>  Cc: Dmitry Osipenko <dmitry.osipe...@collabora.com>
>  Cc: Akihiko Odaki <akihiko.od...@daynix.com>
>  ---
>   meson.build                    |  7 ++++++-
>   hw/display/virtio-gpu-virgl.c  | 24 ++++++++++++++++++++++++
>   subprojects/virglrenderer.wrap |  6 ++++++
>   3 files changed, 36 insertions(+), 1 deletion(-)
>   create mode 100644 subprojects/virglrenderer.wrap
>
>  diff --git a/meson.build b/meson.build
>  index 1d7346b703..e4e270df78 100644
>  --- a/meson.build
>  +++ b/meson.build
>  @@ -1203,7 +1203,8 @@ have_vhost_user_gpu = have_tools and host_os == 
> 'linux' and pixman.found()
>   if not get_option('virglrenderer').auto() or have_system or 
> have_vhost_user_gpu
>     virgl = dependency('virglrenderer',
>                        method: 'pkg-config',
>  -                     required: get_option('virglrenderer'))
>  +                     required: get_option('virglrenderer'),
>  +                     default_options: ['default_library=static', 
> 'render-server=true', 'venus=true'])
>
> So the subproject won't be used unless virgl-devel is missing on the system. 
> Is it really so useful? maybe, I am just used to
> installing my bleeding edge libraries with stow..

While I've been messing with the VirtIO GPU stuff I've had a special
build dir with the latest version of the various components and suitable
PKG_CONFIG_PATH and LD_LIBRARY_PATH hacks to use them. It did however
keep breaking when there was a re-configure and I'd forgotten to set the
env variables.

Judging by the number of questions I keep seeing from people about
getting virtio-gpu working it does seem a bit wobly (and thats before
you start talking about the extra libs rutabaga requires).

Bundling the library with a wrapper (which I think it only does when it
can't find a new enough system one) seems a lot simpler.

So yes this is a build from source convenience that mostly helps
developers and early adopters but we can get rid of it once our baseline
distros have caught up with the latest libvirglrenderer. 


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to