[PATCH] perf tools: Fix NO_NEWT=1 python build error
From: Robert Richter
Date: Tue Mar 29 2011 - 14:03:18 EST
On 18.03.11 10:19:59, Stephane Eranian wrote:
> Looks like some define is missing during the generation of the python support.
> If you don't have newt then it fails to compile:
>
> $ make
> Makefile:430: newt not found, disables TUI support. Please install
> newt-devel or libnewt-dev
> PERF_VERSION = 2.6.38
> Makefile:430: newt not found, disables TUI support. Please install
> newt-devel or libnewt-dev
> ...
> GEN perf-archive
> GEN python/perf.so
> In file included from util/evsel.h:10,
> from util/python.c:6:
> util/hist.h:105: fatal error: newt.h: No such file or directory
> compilation terminated.
> error: command 'gcc' failed with exit status 1
I encountered the same problem. See my fix below.
-Robert