Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp186887lqh; Wed, 27 Mar 2024 20:49:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJ706v5O1VAmpSykw3lF+uU+XA+ZmHYjqYgeai3LDWyHH4p/iJFEcFBEyGF+NyjQbTGJlbB5BgEIFDN4EHf4ir6VUCGMTmSCvpxtl1Qg== X-Google-Smtp-Source: AGHT+IEbkDzPd7CA4PZqkJKNSP/dYu+dmNHhECiwZIWMgLoEy2DTJn8v/lc6PA1S1fA3/ce1xEps X-Received: by 2002:a05:6214:76e:b0:696:b183:d737 with SMTP id f14-20020a056214076e00b00696b183d737mr1767727qvz.28.1711597797559; Wed, 27 Mar 2024 20:49:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711597797; cv=pass; d=google.com; s=arc-20160816; b=qMQ3k7h72rLV9nY94Ac+3JjmfZZ9dm8zd8N11sRS/33Xau7Q9A/GPC28zF5GNHHdZu Zf1lazIT5L1DuKRXH+LEz/hUFii5G6+IOpt0P8RotygPhlVWXRknLahNzGPY3rL2jBMR UxuqNJdnWq6ZA7IcHFOHU0t3UTOSCb7nK4a22ssOX1F/qMG0xam92J7qFrShgkirfdqF i90cm8OPfDk97d6dUUT5/MSIlmeMi4EkkBH8X64z8aM197KILcbOxTsJN+UNlKPHc+UF XUQF08pgnGWqdKwzu5ZDWJohRryn0OuPnrslgmrObc3YQl/HSnwirEq6Xb/ePKjC4Eq+ tGWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:to:subject:cc; bh=TLfj+WBnzlPBgG7WXhP+C8dWTkYbW160pLvRcaFpxDQ=; fh=1R3pGkqhNEyR/m5RRVLiL7R/Gwg3Rjg7CIf+SFSbb1Q=; b=SUcJ2DvvsaaRh8asIDS+c7QkhPm6YcsCIypA1HJvOfZIH6ppPYE4q9ZMBdtiYCR7YM J4QTs1s8+NS3WYwTwuanzOq1GLaEODroY8ZzC48EL2sCDih5aelhn6j9D/mzD1bSdtWl XjAGDYFKQZnRed0GGzHNaz7yjOCio2a9c6+I6fvTHLK/Fq3Vr8aLDy92rvKw00Dc2TWf MvuKyGRaohGMJhxLqra6+ubCuGfiVznVQMnudbvnM1VBwBRjaXRpNEMZoouf1rINw7Ts 9M0pfhWYBOejfVwKiEBSEqavy7oXQy7I4z14aypSu6CgfFONpGDQqPCXag/GuAJBcsKW R6GA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-122387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fb4-20020ad44f04000000b00696831463b4si573744qvb.187.2024.03.27.20.49.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 20:49:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-122387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 47A641C23A93 for ; Thu, 28 Mar 2024 03:49:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3968336120; Thu, 28 Mar 2024 03:49:50 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4871A33CA for ; Thu, 28 Mar 2024 03:49:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711597789; cv=none; b=N6KvUG8HrngkNnv+rlVE5uUfSqGC2lrUjXfYj5PBqLxo+ZK+6OlfcIv16W5vn6RcN5UESjdgSj/+cYGUx/19sav5gniCbEGz2NUfWliGivdHCMfYYu2bjSjzLTTWMMGRKY5MoAGvPozZbqNlzzY5/F7zSmt7xA0813qeGMzZgu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711597789; c=relaxed/simple; bh=mAUx1yEeNe+9kjQokdI6BzA8oADEU6BgtTzq3V14yns=; h=CC:Subject:To:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=t/mCSatHzlQ6SsY57RLtRoijbRuBeE2FgerTwrruQnXYhruvWJYXJ31nqHYlw3CU6GYFQVEIIVdCP4GswAWWadmVGvONS5zRq0lPodlNwZHgjDF+eADZ30Rkd8dMxpEoB//srUe2D4W1A+jBi4mNaRGmopAyJjGmMZzKpSWBM9I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4V4qHY1519zNmXF; Thu, 28 Mar 2024 11:47:37 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id C1DF918005C; Thu, 28 Mar 2024 11:49:38 +0800 (CST) Received: from [10.67.121.177] (10.67.121.177) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 28 Mar 2024 11:49:38 +0800 CC: , , Subject: Re: [PATCH -next] tools headers: Make linux/btf_ids.h self-contained To: Gaosheng Cui , , , , , References: <20240325011059.1001518-1-cuigaosheng1@huawei.com> From: Yicong Yang Message-ID: <53c2df6c-0422-732c-02d1-e803889e8781@huawei.com> Date: Thu, 28 Mar 2024 11:49:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240325011059.1001518-1-cuigaosheng1@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemd200014.china.huawei.com (7.221.188.8) Hi, On 2024/3/25 9:10, Gaosheng Cui wrote: > Add the missing #include . > > Fix the following compile error: > In file included from main.c:73: > tools/include/linux/btf_ids.h:7:9: error: unknown type name ‘u32’ > 7 | u32 cnt; > | ^~~ > tools/include/linux/btf_ids.h:8:9: error: unknown type name ‘u32’ > 8 | u32 ids[]; > | ^~~ > I also met this on 6.9-rc1 and this patch could solve the issue. I suspect this is introduced by 9707ac4fe2f5 ("tools/resolve_btfids: Refactor set sorting with types from btf_ids.h")? Since we didn't contain this header before and compiling was fine, could we only include this header in tools/bpf/resolve_btfids/main.c where error happens (tested fine)? There's a same fix in [1] and the glibc/compiler version was blamed there. I compiled on Ubuntu 18.04.1 with gcc 10.2.0 and glibc 2.27. [1] https://lore.kernel.org/all/20240315091434.10622-1-dmitrii.bundin.a@gmail.com/#t > Signed-off-by: Gaosheng Cui > --- > tools/include/linux/btf_ids.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/include/linux/btf_ids.h b/tools/include/linux/btf_ids.h > index 72535f00572f..7969607efe0d 100644 > --- a/tools/include/linux/btf_ids.h > +++ b/tools/include/linux/btf_ids.h > @@ -3,6 +3,8 @@ > #ifndef _LINUX_BTF_IDS_H > #define _LINUX_BTF_IDS_H > > +#include > + > struct btf_id_set { > u32 cnt; > u32 ids[]; >