All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Yang Jihong <yangjihong@bytedance.com>,
	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: Tue, 6 Aug 2024 22:34:06 +0100	[thread overview]
Message-ID: <a3699fc9-059f-4192-b522-918952c4b264@arm.com> (raw)
In-Reply-To: <20240806114801.1652417-4-yangjihong@bytedance.com>

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>

>  #include <elfutils/libdw.h>
>  #include <elfutils/libdwfl.h>
> --
> 2.25.1
> 
> 

  reply	other threads:[~2024-08-06 21:34 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 [this message]
2024-08-07  3:19     ` Yang Jihong
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=a3699fc9-059f-4192-b522-918952c4b264@arm.com \
    --to=leo.yan@arm.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=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 \
    --cc=yangjihong@bytedance.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.