[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230311065753.3012826-7-irogers@google.com>
Date: Fri, 10 Mar 2023 22:57:46 -0800
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>,
Roberto Sassu <roberto.sassu@...wei.com>,
Quentin Monnet <quentin@...valent.com>,
Andres Freund <andres@...razel.de>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Pavithra Gurushankar <gpavithrasha@...il.com>,
Yang Jihong <yangjihong1@...wei.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Leo Yan <leo.yan@...aro.org>,
"Martin Liška" <mliska@...e.cz>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
llvm@...ts.linux.dev
Cc: Stephane Eranian <eranian@...gle.com>,
Ian Rogers <irogers@...gle.com>
Subject: [PATCH v1 06/13] perf build: Error if jevents won't work and
NO_JEVENTS=1 isn't set
Rather than disabling jevents if a sufficient python isn't present
error in the build. This avoids the build progressing but the binary
being degraded. The build can still succeed by specifying NO_JEVENTS=1
to the build and this is conveyed in the error message.
Signed-off-by: Ian Rogers <irogers@...gle.com>
---
tools/perf/Makefile.config | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 5691e2ffb1b9..2557654d8e29 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -872,14 +872,12 @@ endif
ifneq ($(NO_JEVENTS),1)
NO_JEVENTS := 0
ifndef PYTHON
- $(warning No python interpreter disabling jevent generation)
- NO_JEVENTS := 1
+ $(error ERROR: No python interpreter needed for jevents generation. Install python or build with NO_JEVENTS=1.)
else
# jevents.py uses f-strings present in Python 3.6 released in Dec. 2016.
JEVENTS_PYTHON_GOOD := $(shell $(PYTHON) -c 'import sys;print("1" if(sys.version_info.major >= 3 and sys.version_info.minor >= 6) else "0")' 2> /dev/null)
ifneq ($(JEVENTS_PYTHON_GOOD), 1)
- $(warning Python interpreter too old (older than 3.6) disabling jevent generation)
- NO_JEVENTS := 1
+ $(error ERROR: Python interpreter needed for jevents generation too old (older than 3.6). Install a newer python or build with NO_JEVENTS=1.)
endif
endif
endif
--
2.40.0.rc1.284.g88254d51c5-goog
Powered by blists - more mailing lists