mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Jihong <yangjihong@bytedance.com>
To: Leo Yan <leo.yan@arm.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] perf dwarf-aux: Fix build fail when HAVE_DWARF_GETLOCATIONS_SUPPORT undefined
Date: Wed, 7 Aug 2024 11:19:12 +0800	[thread overview]
Message-ID: <47e26358-86c3-485d-9de4-1b492ba5641e@bytedance.com> (raw)
In-Reply-To: <a3699fc9-059f-4192-b522-918952c4b264@arm.com>

Hello,

On 8/7/24 05:34, Leo Yan wrote:
> On 8/6/2024 12:48 PM, Yang Jihong wrote:
>> commit 3796eba7c137 move #else block of #ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT
>> code from dwarf-aux.c to dwarf-aux.h, in which die_get_var_range() used ENOTSUP
>> macro, but dwarf-aux.h was not self-contained and did not include file errno.h.
>>
>> As a result, the build failed when HAVE_DWARF_GETLOCATIONS_SUPPORT macro was not
>> defined, and the error log is as follows:
>>
>>    In file included from util/disasm.h:8,
>>                     from util/annotate.h:16,
>>                     from builtin-top.c:23:
>>    util/dwarf-aux.h: In function 'die_get_var_range':
>>    util/dwarf-aux.h:184:10: error: 'ENOTSUP' undeclared (first use in this function)
>>      184 |  return -ENOTSUP;
>>          |          ^~~~~~~
>>    util/dwarf-aux.h:184:10: note: each undeclared identifier is reported only once for each function it appears
>>
>> Fixes: 3796eba7c137 ("perf dwarf-aux: Move #else block of #ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT code to the header file")
>> Signed-off-by: Yang Jihong <yangjihong@bytedance.com>
>> ---
>>   tools/perf/util/dwarf-aux.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
>> index 24446412b869..d2903894538e 100644
>> --- a/tools/perf/util/dwarf-aux.h
>> +++ b/tools/perf/util/dwarf-aux.h
>> @@ -5,6 +5,7 @@
>>    * dwarf-aux.h : libdw auxiliary interfaces
>>    */
>>
>> +#include <errno.h>
>>   #include <dwarf.h>
> 
> Please alphabet ordering. With it:
> 
> Reviewed-by: Leo Yan <leo.yan@arm.com>
> 
Okay, will change in next version.

Thanks,
Yang

  reply	other threads:[~2024-08-07  3:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 11:47 [PATCH v2 0/3] perf: build: Minor fixes for build failures Yang Jihong
2024-08-06 11:47 ` [PATCH v2 1/3] perf: build: Fix static compilation error when libdw is not installed Yang Jihong
2024-08-06 21:00   ` Leo Yan
2024-08-07  3:16     ` Yang Jihong
2024-08-06 11:48 ` [PATCH v2 2/3] perf: build: Fix build feature-dwarf_getlocations fail for old libdw Yang Jihong
2024-08-06 21:28   ` Leo Yan
2024-08-07  3:18     ` Yang Jihong
2024-08-06 11:48 ` [PATCH v2 3/3] perf dwarf-aux: Fix build fail when HAVE_DWARF_GETLOCATIONS_SUPPORT undefined Yang Jihong
2024-08-06 21:34   ` Leo Yan
2024-08-07  3:19     ` Yang Jihong [this message]
2024-08-06 17:58 ` [PATCH v2 0/3] perf: build: Minor fixes for build failures Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47e26358-86c3-485d-9de4-1b492ba5641e@bytedance.com \
    --to=yangjihong@bytedance.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®