Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp701489lqp; Thu, 21 Mar 2024 12:51:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWQVdcz2j34NXwZmN3b1b1TaEf3N3nr4JKQHShqAlXkxVBmBxWFWBcLFiVGfPqS7zFuA7hbelc3mpHZjOBRDEPRrfCmZFeRvgzJ9CQSeg== X-Google-Smtp-Source: AGHT+IH4kqoUQstpRV7cMQ56RGY+mU1WHzp9NUaZ7/8fXRTEI9GOHWbLjeMgt+l4+txw5JDMYuIS X-Received: by 2002:a17:90b:46c8:b0:29b:b3fa:b7a5 with SMTP id jx8-20020a17090b46c800b0029bb3fab7a5mr374740pjb.7.1711050671150; Thu, 21 Mar 2024 12:51:11 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i7-20020a17090acf8700b0029b7af4b476si464606pju.28.2024.03.21.12.51.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 12:51:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110612-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=MywJxB2E; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-110612-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110612-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CD7CA2830AF for ; Thu, 21 Mar 2024 19:51:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A04BA134428; Thu, 21 Mar 2024 19:51:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MywJxB2E" Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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 7527B12BF16 for ; Thu, 21 Mar 2024 19:51:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711050664; cv=none; b=f5vkeYTIK/TP5WdVIjaC+4VlAAzPafzKYydCG3uJlOdvwfUnDSly7B7FIFJtcC/lH5BdWB2a9p3KexXOpfdcCLbKYQrlYsfFolIRtK2zR//TnNyngbfkCDFFttMbtqKLDPzemlEo5BdbCqxEo+r00dRXvla5wyFnQZxFv4npyn4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711050664; c=relaxed/simple; bh=iixGjUfXCfJMUnrcexrZ0eyfEWhjuM3K/uWarfVEAVk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CZ9HpnjrXAD8NzQcdwqnD4xiWUuG04Dd5EEZOChN/98a40zz9PzCFotJq0WveD5bNInDJCJ5p7RraNKw0gVwqv3tDqsDTQx55lokiNw8jIuHRlgWp/tbDMB6iWI31M1NpyQkfPKnSvVMf7EOT/8/zh/eJ9+dw57cWdDxpxQgb3A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MywJxB2E; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7cc0e831e11so19706139f.1 for ; Thu, 21 Mar 2024 12:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711050662; x=1711655462; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iixGjUfXCfJMUnrcexrZ0eyfEWhjuM3K/uWarfVEAVk=; b=MywJxB2Ev/EvIGUXTp6CDZKJBaV1dTAPU/uYJ7z6rh+gGTet72+HrZ3UfP2hIUeh2c eyCUcyzj7g25EkXl2p7dMtf5YWfQk6oi3ls9GS68vybOO6htWUjgXTey/z9pZ6HxSCie T1pPbmVH7KzE6IbthrC3vrkyaORnRLdtaPmmYv5ThOEs6+x8ypRmtRKAe2DfZZvrO/ux KFJrZitNhzCWl41+lw+4gT+lufzmEVFzn8B37wQZ5MFegdtzp34gykcMzWohbJdwbP1e BwEcS5sO+nrf5W2aRZJ6rxd0E53rP5VzvBxgDk43WVMyQnVzIZKnCtvQpN6XoFbeTQXL e6kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711050662; x=1711655462; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iixGjUfXCfJMUnrcexrZ0eyfEWhjuM3K/uWarfVEAVk=; b=J/7Das4EbIlGx8YRaKWDubu4IUcrqcvDWZ3k42qMsW140odJdH+zEcMJPM0ZeXwBqR g+ssmlKKdHHo4KQUQ0+3v0xZ65g11gX/2P+HXB8tIcBo4EMfwyBrlBjvEpHCIHccjpyQ YfX44CpoXXYS1AN60/cq4vbplKBwO0ECiQCU0W2Yyd/H9bDFWH3GKT7Kq8U9bcS5zlk0 xZpQBLuMxOyBXAs7n3ZmEUSek/wOB6bHBqyyvPfUAfgrvUgnhCn66e7ZabfONgGlA7rr cCugML32kK+ThrBAtNeLo3E4yBIgNVmU2BpQAFuaDDV/3nBjEeEhm+vvxi/2I7V/2rzQ 6xzQ== X-Forwarded-Encrypted: i=1; AJvYcCXO8s6D8EnFg9t+1PiyIpKef/MmAkIqhHOo7E3BTbnOm+M0TSILUuRpuylSz+tTJrCQtiS8F8wkOYypgR6I3qx3Is2vRYTYwJ438ZAM X-Gm-Message-State: AOJu0YxF8Movg2Tk6B9EYqm0LbwB5+A1ZPjkDgza4psZh3FscqDGYrTe mVU9yiEqx6mgy9dTCp0fYBZvBH5Mg/UvaKS//avdhahRu65ykYSDtDLbMfLXMARE49VuM4Noo8G vsQqLtWgYZjFl/j8vt8kkfu+LZAQ= X-Received: by 2002:a92:d450:0:b0:366:b0bd:3a1a with SMTP id r16-20020a92d450000000b00366b0bd3a1amr555954ilm.1.1711050662557; Thu, 21 Mar 2024 12:51:02 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240315091434.10622-1-dmitrii.bundin.a@gmail.com> In-Reply-To: From: Dmitrii Bundin Date: Thu, 21 Mar 2024 22:50:51 +0300 Message-ID: Subject: Re: [PATCH] tools/resolve_btfids: Include linux/types.h To: Khazhy Kumykov Cc: Alexei Starovoitov , LKML , Daniel Xu , Viktor Malik , Alexei Starovoitov , Andrii Nakryiko , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 18, 2024 at 7:56=E2=80=AFPM Khazhy Kumykov wrote: > I'm also seeing this, on clang. I think the error is more related to the libc version. I updated the libc6 to 2.35 and noticed that the header is included indirectly through . The relevant sample of the include hierarchy for with libc6 v2.35 looks as follows: /usr/include/x86_64-linux-gnu/sys/stat.h . /usr/include/x86_64-linux-gnu/bits/stat.h .. /usr/include/x86_64-linux-gnu/bits/struct_stat.h . /usr/include/x86_64-linux-gnu/bits/statx.h .. /linux/tools/include/uapi/linux/stat.h ... /linux/tools/include/linux/types.h The is included on the latest line of the sample. Starting the version 2.28 there's an inclusion of which was not presented in 2.27. When building the resolve_btfids with the libc6 version 2.27 is not included through . The include hierarchy for with libc6 v2.27 looks as follows: /usr/include/x86_64-linux-gnu/sys/stat.h . /usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/fcntl.h To avoid being dependent on the inclusion of at some other place it looks reasonable to include it explicitly to bring all the necessary declarations before their usage. What do you think?