Re: [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config

From: Jiri Olsa
Date: Thu Jun 04 2020 - 04:34:27 EST


On Wed, Jun 03, 2020 at 10:01:27AM +0800, Tiezhu Yang wrote:

SNIP

> > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> > > index 12a8204..b699d21 100644
> > > --- a/tools/perf/Makefile.config
> > > +++ b/tools/perf/Makefile.config
> > > @@ -387,6 +387,12 @@ else
> > > NO_LIBBPF := 1
> > > NO_JVMTI := 1
> > > else
> > > + ifneq ($(shell ldconfig -p | grep libasan >/dev/null 2>&1; echo $$?), 0)
> > > + msg := $(error No libasan found, please install libasan);
> > > + endif
> > > + ifneq ($(shell ldconfig -p | grep libubsan >/dev/null 2>&1; echo $$?), 0)
> > > + msg := $(error No libubsan found, please install libubsan);
> > > + endif
> > hum, would it be better to have check for this in tools/build/features?
>
> Hi Jiri,
>
> Thanks for your suggestion.
>
> Do you mean that it is better to add this check at the end of file
> tools/build/Makefile.feature?

we usualy detect installed libraries via tools/build/features framework,
this looks like it could fit in there

jirka

>
> >
> > jirka
> >
> > > ifneq ($(filter s% -static%,$(LDFLAGS),),)
> > > msg := $(error No static glibc found, please install glibc-static);
> > > else
> > > --
> > > 2.1.0
> > >
>