From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 4CEF31FF0E9 for ; Thu, 16 Jul 2026 09:40:38 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9F2E021438; Thu, 16 Jul 2026 09:40:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784187596; x=1784792396; darn=lists.proxmox.com; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=J+cZoTfAHd4HPY24YHji5ESJhXOITkM4+4A66f4/GdA=; b=EBKJXXusXjs2SuWgYiQ6wWNRIYsfTHR1tPFg6s1VvXJHk0L8i8vmbuROkWb7S0Os5F pUWNR7qoVzBy2AjRP0uvOZkLuGmmKz5V+zW8k3LePoo9zmRX2eaD3jCyZnEZpN7XWv1V PVz2OelRDPJIti2LG6dP2zNfQb0xyVXwiOna9FxgHGXLS1g9VcPRQyFOjSrh7lLm7K/s Fha3n7JaYA4kiF+Ft97seol/RP/eTCLpgMuGLJnQiSdq3/SLcWtXyP3seSYkxBRmJbhQ 9zaKHS92+S+LlwOh3qbNsXGvVSEc1Kpx5yBHfH2B1tRisWVKoWyHEEimz3VewXDpRT5i vwSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784187596; x=1784792396; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=J+cZoTfAHd4HPY24YHji5ESJhXOITkM4+4A66f4/GdA=; b=YSsULAGaf9czPXfZxCdRv1K+XLd21PNrzzvWkuN/VMymhOPxMWnfZg+fwaBEvh3K+q U3Q0luRTNLDoFp2SjBGjBojkFOM3Zs6GSaukcX/64wlYh9GHPBxRHXxrpDc6L1HPXBzP XxFju69nXMNdo1nCPWdZ4RLP/exWtzauFTk1CvQA7mqAQk2CrMCZadjCtkd677bYxbX8 5+LyH3teomO+8K+GgC0d/BPBBNsF7KtNbc2y08iqt0IFy4loiY0rUxIq87JVRQLpwVHs 1PBhTn+BtXHqAVA/VixN3bUffKlZ/qOvaw5WcL+2uMXaJgZkLdXm8c0MK36v6g0EM262 s2VQ== X-Forwarded-Encrypted: i=1; AHgh+RqVTcSROz7hrj1+Orary5fFIBEnJRTipC6iGXn0K5QJ3TvSCOfjyK/VX10yBNy98Zz6h6JUC+WKtLk=@lists.proxmox.com X-Gm-Message-State: AOJu0YwoJcwLViu+xDc6wmVdA85KNCYPoSvVGVGjHZk+EvpI51zgz0QA S0ODfxhWs5ikTR4ss7GopTdwihoR9g7qG2oUMEgfrMQC1fXG43BFkZu1 X-Gm-Gg: AfdE7ck42eN/ZHMGF+6kjxOf4wrKOOZHds+Zmjn/gsFXf039D5fH8a0nmyXc+HGRpV3 oiRP8/OmnxkxTDcIUEQufSK7Eu5dPzvFxvUETknDuJDkSTJPiC28QW4OcqlA5W8hPN3aUKTklxd IwQt7s9xD9TjdbCgYZncn3WbLnnmPPss9dV9VlHm3ObnF0u91EuWFCSWuSqTzouUG6lhWBS0oD7 YG5QLI+t5TOJaX27YxRKN41EZ/7s2YR/ngdHU4tZpK363MuvzaYwqZqPsBUqDmT3zmKrjC9ob03 0NfOerpdqw6qxFD9tr66NhU1J27sTwSIGe9V01Yu7R6Ir4xpd7JAeUITmRa9wuEJZ1ZPJwyEuKR RZoSERcg1kEb8d1dZoS2akMp0TtjjRhOXnD6WoTsGid3tybxLHq6FhvDGAzf0e6QuMoDdpXViIg vSzSWosYkGNOqOotYSqLP18w== X-Received: by 2002:a05:6a21:9d91:b0:3b3:241f:66c6 with SMTP id adf61e73a8af0-3c1108c1a5fmr20502091637.26.1784187596489; Thu, 16 Jul 2026 00:39:56 -0700 (PDT) Message-ID: Date: Thu, 16 Jul 2026 15:39:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: superseded: [PATCH qemu-server] qemuserver: make base path of libGL and libEGL libraries architecture aware To: Dominik Csapak , pve-devel@lists.proxmox.com References: <20260716032704.250445-1-wukaiyang@loongfans.cn> <8c161d95-f4f9-43fe-ad17-0b60ceb9cb8e@proxmox.com> Content-Language: en-US From: Kaiyang Wu In-Reply-To: <8c161d95-f4f9-43fe-ad17-0b60ceb9cb8e@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.000 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_ENVFROM_END_DIGIT 1 Envelope-from freemail username ends in digit FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: J3TRQHIT7YMR7NOAJK7HWW7IWPB7HFWC X-Message-ID-Hash: J3TRQHIT7YMR7NOAJK7HWW7IWPB7HFWC X-MailFrom: wukaiyang2003@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Kaiyang Wu X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: https://lore.proxmox.com/pve-devel/20260716073544.284241-1-wukaiyang@loongfans.cn/#t On 2026-07-16 14:43, Dominik Csapak wrote: > > > On 7/16/26 5:27 AM, Kaiyang Wu wrote: >> 'print_vga_device' assumed x86_64 library path to look for 'libGL.so.1' >> and 'libEGL.so.1', which leads to missing libraries error regardless of >> whether 'libgl1' and 'libegl1' were installed or not, on architectures >> other than x86_64. >> >> Make base path of the libraries architecture aware to correctly locate >> the libraries on non-x86_64 architectures. >> >> Signed-off-by: Kaiyang Wu >> --- >>   src/PVE/QemuServer.pm | 10 +++++++++- >>   1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm >> index 191ae549..1d740f81 100644 >> --- a/src/PVE/QemuServer.pm >> +++ b/src/PVE/QemuServer.pm >> @@ -1540,7 +1540,15 @@ sub print_vga_device { >>       } >>       if ($vga->{type} eq 'virtio-gl') { >> -        my $base = '/usr/lib/x86_64-linux-gnu/lib'; >> +        my $base; >> +        if ($arch eq 'x86_64') { >> +            $base = '/usr/lib/x86_64-linux-gnu/lib'; >> +        } elsif ($arch eq 'aarch64') { >> +            $base = '/usr/lib/aarch64-linux-gnu/lib'; >> +        } else { >> +            die "unsupported architecture $arch for '$vga->{type}'\n"; >> +        } >> + > > i think this is wrong because 'arch' is the guest architecture, not the > host one, but we need the library in the hosts context > > so doing > > my $host_arch = PVE::QemuServer::Helpers::get_host_arch(); > > and using that would be better IMO > > also, we could probably simply interpolate that: > > my $base = "/usr/lib/${host_arch}-lnux-gnu/lib"; > > > (if that does not work because the arch string is not equivalent > for the dirs, we could have a map: > > my $libs_map = { > 'x86_64' => '/usr/lib/x86_64-linux-gnu/lib', > ... > }; > > and then do: > > my $base = $libs_map->{$host_arch} // die "unsupported..." > > (note that the snippets are just examples and untested) > >>           die "missing libraries for '$vga->{type}' detected! Please >> install 'libgl1' and 'libegl1'\n" >>               if !-e "${base}EGL.so.1" || !-e "${base}GL.so.1"; > >