From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E328E2F2607 for ; Tue, 24 Mar 2026 18:02:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774375371; cv=none; b=udbi+deVsNV5b44A3j0l/hgSM7DXH2ALsndjOAWHYSSK6pPQqMtiUOXoJItk0Odjt3hofWX2Utbj/uvWQmS3p7O9UseXzyvbQ4xCZ3SuxgFzCc6m2WJJOIJjGKRB8k4+CaPxb9GuM489YY8TCqliLTB6d3N8bXTd00NjH9EMJBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774375371; c=relaxed/simple; bh=R7ZX0LE7XGFFQWMOtrASqhk0culrI4MvTKiFsqDKfPc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Q6ePdU3eI4V6nH7eH1/ZMk8Ok+yUzArspXJHpveUrq80/tMrL/01tODu19Q14CM4ZFUd78gFxoAhGgBXSL8VRiK1cTTp+kUwCgkkJ6sIP9GpbaN8ePyB7IkWdFUttzNkFcHn3wgjvO+WNYXBb4QVNaGYw+qz6SGbS8cYt4l69SI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XK4dDdnn; arc=none smtp.client-ip=209.85.161.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XK4dDdnn" Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-67de15e8452so87891eaf.0 for ; Tue, 24 Mar 2026 11:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1774375368; x=1774980168; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=s1RhgEBpZwcw2mC7/SNEryH9p0tgwRBwIrIydZS7iB0=; b=XK4dDdnnnynFzpW4GTweZadTIkILnq2olNCeq3ZltwpBnrxPcz4eUiv4thtOCeYDns dm2iUwosQc7ZvN7kUPL71ZCwnXME1tJXFQ0dNa8GDHgjJlfqIkvpGRIT+DqYTFfqGitb TUtbdAmygKrUVurPl09sOskVIziJsyBOwebHA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774375368; x=1774980168; h=content-transfer-encoding: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; bh=s1RhgEBpZwcw2mC7/SNEryH9p0tgwRBwIrIydZS7iB0=; b=des2jTGRs8t8cOLIqN/fN0Pij7rd82TIaH9/E8YoUtewbft5izHQ3ZE7XQIi3ndkyM wqC7ROU2DwEA3gdDGiYniJC1UwWKDQRFN/KS7LxaXvXPTOof/O0iltLrya6kLsCaJO/h NTZV2PMPee035GoOhQz18DoVGMOP+LlZC+CAMTOo3Q0US/J3TPhbgmJC5Ddg2kpk5FDj 2GEbxsi8G3IwUHFaoTpIllxyTQf+Tgz8wqUI09jpLsWnM0XTFuGcY7VMCJuKwifS+3RM +XOLVRR6//vmdz0ZSqh6wsHIiuGtdk+q31YH7gA+JHKvSRIE4IfUiRnrz7NiMiOZlk+G 9HxQ== X-Forwarded-Encrypted: i=1; AJvYcCVzZhjuw3H6QwFBjwih1Dx5pwFfNWnXdET63wZPyaBgrjUGcNq0mzZK8yUkUcFQ35DM6owNsBBKuJNUtFA=@vger.kernel.org X-Gm-Message-State: AOJu0YzOEk/RAQxZBqDSPAAtTg3wr0dcSGldPZBAEPS0+FFdhBLz+kh2 4AnjZvW9pnXH0MPjgqrbscQu69IbqU5sUSJmFKPyTPQpSmfSfR3HKTCk+BIigBtOBU0= X-Gm-Gg: ATEYQzys0/pQZGrM4rT1bvFv9XWs6AmRAD3GspAgOrhYvVVzubziTi/96Cd60x9Xv5P TWt2D6UFhgSPHeJNJaq3hFzWZoA0ZfLewd9fCGoYEvmyaFsV+320KTR4ru26y+/QL5zBFI/Hy4r dAkqQOZTxqOR87S0X8kJ0oIK9u266BEysQEx0OpSZjC9ff2oleULqcrpniImhp/+K8fAnAMmaTX 5VJjNCI+x5L44BEtInaao+Reb+xsAk+KubqCiZJZCv+F1JC6gqu16E43o9p11oEW0caZlQHOQkc gvUip8AnohFXQnDZC2Nuw2clDf8wFQ3zL8oVEqnawW8FXQ4tQFLHsvIUdU0lyH9nFrVMRoH4Jys aIiYIm36sCQQACrfYHJENeuUiY5MkR2TQG0I50xoawRVHfTh1KCL+ONb4DEdvvPzF5JJ6mIAxqm 1TgD9dxbpmk0iCxDFUjZh2v5uj6m6tDqh7ICdQzzNps87o0w== X-Received: by 2002:a05:6820:1691:b0:67b:e7d4:84f3 with SMTP id 006d021491bc7-67dff56cdbfmr368540eaf.21.1774375367627; Tue, 24 Mar 2026 11:02:47 -0700 (PDT) Received: from [192.168.1.14] ([38.175.187.108]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-67c252fe793sm8840845eaf.8.2026.03.24.11.02.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Mar 2026 11:02:46 -0700 (PDT) Message-ID: <091f264f-21f1-464d-913a-1500643728c7@linuxfoundation.org> Date: Tue, 24 Mar 2026 12:02:45 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] KVM: selftests: Guard execinfo.h inclusion for non-glibc builds To: Hisam Mehboob , pbonzini@redhat.com, seanjc@google.com Cc: kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Aqib Faruqui , Shuah Khan , shuah@kernel.org References: <20260319000842.1213426-2-hisamshar@gmail.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20260319000842.1213426-2-hisamshar@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/18/26 18:08, Hisam Mehboob wrote: > The backtrace() function and execinfo.h are GNU extensions available > in glibc but not in non-glibc C libraries such as musl. Building KVM > selftests with musl-gcc fails with: > > lib/assert.c:9:10: fatal error: execinfo.h: No such file or directory > > Guard the inclusion of execinfo.h under #ifdef __GLIBC__, and wrap > all backtrace() usage under the same guard with a fallback message > for non-glibc builds indicating that stack traces are not available. > > Unlike the approach of adding a weak stub for backtrace(), this > explicitly handles the non-glibc case rather than silently providing > an empty implementation. > > Link: https://lore.kernel.org/kvm/20250829142556.72577-7-aqibaf@amazon.com/ > > Suggested-by: Aqib Faruqui > Signed-off-by: Hisam Mehboob > --- > tools/testing/selftests/kvm/lib/assert.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tools/testing/selftests/kvm/lib/assert.c b/tools/testing/selftests/kvm/lib/assert.c > index b49690658c60..3442b80c37c1 100644 > --- a/tools/testing/selftests/kvm/lib/assert.c > +++ b/tools/testing/selftests/kvm/lib/assert.c > @@ -6,7 +6,9 @@ > */ > #include "test_util.h" > > +#ifdef __GLIBC__ > #include > +#endif Is __GLIBC__ defined in musl-gcc? Looks like that is the case with the error? Check a couple of things first: did you run "make headers" and do you have the correct packages installed on your system? thanks, -- Shuah