linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 1/6] perf tools: Warn about missing libelf
Date: Wed, 31 Oct 2012 12:48:58 -0200	[thread overview]
Message-ID: <1351694943-7188-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1351694943-7188-1-git-send-email-acme@infradead.org>

From: Namhyung Kim <namhyung@kernel.org>

When perf detects no libelf during the build, it'll use internal mini
elf parser instead of libelf.  But as it only supports minimal
functionalities, it also disables support to 'probe' builtin command.

Currently it didn't warned to user.  Fix it.

$ sudo apt-get remove libelf-dev
$ make
    CHK -fstack-protector-all
    CHK -Wstack-protector
    CHK -Wvolatile-register-var
    CHK bionic
    CHK libelf
    CHK glibc
Makefile:491: No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev
    CHK libunwind
    CHK libaudit

$ make NO_LIBELF=1
    CHK -fstack-protector-all
    CHK -Wstack-protector
    CHK -Wvolatile-register-var
    CHK bionic
    CHK libaudit

Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-8ww8zc4hhpxabfskxs3u5ede@git.kernel.org
[ committer note: The package needed is elfutils-libelf-devel, not elfutils-devel ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7e25f59..b1801e0 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -490,6 +490,8 @@ ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
 		LIBC_SUPPORT := 1
 	endif
 	ifeq ($(LIBC_SUPPORT),1)
+		msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev);
+
 		NO_LIBELF := 1
 		NO_DWARF := 1
 		NO_DEMANGLE := 1
-- 
1.7.9.2.358.g22243


  reply	other threads:[~2012-10-31 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31 14:48 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2012-10-31 14:48 ` Arnaldo Carvalho de Melo [this message]
2012-10-31 14:48 ` [PATCH 2/6] perf tools: Add info about cross compiling for Android ARM Arnaldo Carvalho de Melo
2012-10-31 14:49 ` [PATCH 3/6] perf tools: Speed up the perf build time by simplifying the perf --version string generation Arnaldo Carvalho de Melo
2012-10-31 14:49 ` [PATCH 4/6] perf tools: Further speed up the perf build Arnaldo Carvalho de Melo
2012-10-31 14:49 ` [PATCH 5/6] perf tools: Handle --version string generation on machines without git Arnaldo Carvalho de Melo
2012-10-31 14:49 ` [PATCH 6/6] perf annotate: Handle XBEGIN like a jump Arnaldo Carvalho de Melo

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=1351694943-7188-2-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).