linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config
@ 2020-06-02  4:15 Tiezhu Yang
  2020-06-02  4:15 ` [PATCH 2/2] perf tools: Remove some duplicated includes Tiezhu Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tiezhu Yang @ 2020-06-02  4:15 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim
  Cc: linux-kernel, Xuefeng Li

When build perf with ASan or UBSan, if libasan or libubsan can not find,
the feature-glibc is 0 and there exists the following error log which is
wrong, because we can find gnu/libc-version.h in /usr/include, glibc-devel
is also installed.

[yangtiezhu@linux perf]$ make DEBUG=1 EXTRA_CFLAGS='-fno-omit-frame-pointer -fsanitize=address'
  BUILD:   Doing 'make -j4' parallel build
  HOSTCC   fixdep.o
  HOSTLD   fixdep-in.o
  LINK     fixdep
<stdin>:1:0: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
<stdin>:1:0: warning: -fsanitize=address not supported for this target

Auto-detecting system features:
...                         dwarf: [ OFF ]
...            dwarf_getlocations: [ OFF ]
...                         glibc: [ OFF ]
...                          gtk2: [ OFF ]
...                      libaudit: [ OFF ]
...                        libbfd: [ OFF ]
...                        libcap: [ OFF ]
...                        libelf: [ OFF ]
...                       libnuma: [ OFF ]
...        numa_num_possible_cpus: [ OFF ]
...                       libperl: [ OFF ]
...                     libpython: [ OFF ]
...                     libcrypto: [ OFF ]
...                     libunwind: [ OFF ]
...            libdw-dwarf-unwind: [ OFF ]
...                          zlib: [ OFF ]
...                          lzma: [ OFF ]
...                     get_cpuid: [ OFF ]
...                           bpf: [ OFF ]
...                        libaio: [ OFF ]
...                       libzstd: [ OFF ]
...        disassembler-four-args: [ OFF ]

Makefile.config:393: *** No gnu/libc-version.h found, please install glibc-dev[el].  Stop.
Makefile.perf:224: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:69: recipe for target 'all' failed
make: *** [all] Error 2
[yangtiezhu@linux perf]$ ls /usr/include/gnu/libc-version.h
/usr/include/gnu/libc-version.h

After install libasan and libubsan, the feature-glibc is 1 and the build
process is success, so the cause is related with libasan or libubsan, we
should check them and print an error log to reflect the reality.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 tools/perf/Makefile.config | 6 ++++++
 1 file changed, 6 insertions(+)

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
       ifneq ($(filter s% -static%,$(LDFLAGS),),)
         msg := $(error No static glibc found, please install glibc-static);
       else
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] perf tools: Remove some duplicated includes
  2020-06-02  4:15 [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config Tiezhu Yang
@ 2020-06-02  4:15 ` Tiezhu Yang
  2020-06-02 14:10   ` Arnaldo Carvalho de Melo
  2020-06-02 14:11 ` [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config Arnaldo Carvalho de Melo
  2020-06-02 14:15 ` Jiri Olsa
  2 siblings, 1 reply; 7+ messages in thread
From: Tiezhu Yang @ 2020-06-02  4:15 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim
  Cc: linux-kernel, Xuefeng Li

There exists some duplicated includes in tools/perf, remove them.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 tools/perf/builtin-report.c | 1 -
 tools/perf/util/annotate.c  | 1 -
 tools/perf/util/auxtrace.c  | 1 -
 tools/perf/util/config.c    | 1 -
 tools/perf/util/session.c   | 1 -
 5 files changed, 5 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index ba63390..5425a2c 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -47,7 +47,6 @@
 #include "util/time-utils.h"
 #include "util/auxtrace.h"
 #include "util/units.h"
-#include "util/branch.h"
 #include "util/util.h" // perf_tip()
 #include "ui/ui.h"
 #include "ui/progress.h"
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index d828c2d..76bfb4a 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -41,7 +41,6 @@
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
-#include <bpf/libbpf.h>
 #include <subcmd/parse-options.h>
 #include <subcmd/run-command.h>
 
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index 749487a..94a8f4f 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -55,7 +55,6 @@
 #include "util/mmap.h"
 
 #include <linux/ctype.h>
-#include <linux/kernel.h>
 #include "symbol/kallsyms.h"
 #include <internal/lib.h>
 
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index ef38eba..64f14a5 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -20,7 +20,6 @@
 #include "build-id.h"
 #include "debug.h"
 #include "config.h"
-#include "debug.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdlib.h>
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index c11d89e..5550e26e 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -33,7 +33,6 @@
 #include "../perf.h"
 #include "arch/common.h"
 #include <internal/lib.h>
-#include <linux/err.h>
 
 #ifdef HAVE_ZSTD_SUPPORT
 static int perf_session__process_compressed_event(struct perf_session *session,
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] perf tools: Remove some duplicated includes
  2020-06-02  4:15 ` [PATCH 2/2] perf tools: Remove some duplicated includes Tiezhu Yang
@ 2020-06-02 14:10   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-06-02 14:10 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, linux-kernel, Xuefeng Li

Em Tue, Jun 02, 2020 at 12:15:04PM +0800, Tiezhu Yang escreveu:
> There exists some duplicated includes in tools/perf, remove them.

Applied, thanks.

- Arnaldo
 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  tools/perf/builtin-report.c | 1 -
>  tools/perf/util/annotate.c  | 1 -
>  tools/perf/util/auxtrace.c  | 1 -
>  tools/perf/util/config.c    | 1 -
>  tools/perf/util/session.c   | 1 -
>  5 files changed, 5 deletions(-)
> 
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index ba63390..5425a2c 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -47,7 +47,6 @@
>  #include "util/time-utils.h"
>  #include "util/auxtrace.h"
>  #include "util/units.h"
> -#include "util/branch.h"
>  #include "util/util.h" // perf_tip()
>  #include "ui/ui.h"
>  #include "ui/progress.h"
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index d828c2d..76bfb4a 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -41,7 +41,6 @@
>  #include <linux/bitops.h>
>  #include <linux/kernel.h>
>  #include <linux/string.h>
> -#include <bpf/libbpf.h>
>  #include <subcmd/parse-options.h>
>  #include <subcmd/run-command.h>
>  
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index 749487a..94a8f4f 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -55,7 +55,6 @@
>  #include "util/mmap.h"
>  
>  #include <linux/ctype.h>
> -#include <linux/kernel.h>
>  #include "symbol/kallsyms.h"
>  #include <internal/lib.h>
>  
> diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
> index ef38eba..64f14a5 100644
> --- a/tools/perf/util/config.c
> +++ b/tools/perf/util/config.c
> @@ -20,7 +20,6 @@
>  #include "build-id.h"
>  #include "debug.h"
>  #include "config.h"
> -#include "debug.h"
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <stdlib.h>
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index c11d89e..5550e26e 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -33,7 +33,6 @@
>  #include "../perf.h"
>  #include "arch/common.h"
>  #include <internal/lib.h>
> -#include <linux/err.h>
>  
>  #ifdef HAVE_ZSTD_SUPPORT
>  static int perf_session__process_compressed_event(struct perf_session *session,
> -- 
> 2.1.0
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config
  2020-06-02  4:15 [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config Tiezhu Yang
  2020-06-02  4:15 ` [PATCH 2/2] perf tools: Remove some duplicated includes Tiezhu Yang
@ 2020-06-02 14:11 ` Arnaldo Carvalho de Melo
  2020-06-02 14:15 ` Jiri Olsa
  2 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-06-02 14:11 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, linux-kernel, Xuefeng Li

Em Tue, Jun 02, 2020 at 12:15:03PM +0800, Tiezhu Yang escreveu:
> When build perf with ASan or UBSan, if libasan or libubsan can not find,
> the feature-glibc is 0 and there exists the following error log which is
> wrong, because we can find gnu/libc-version.h in /usr/include, glibc-devel
> is also installed.

I'll check this later,

- Arnaldo
 
> [yangtiezhu@linux perf]$ make DEBUG=1 EXTRA_CFLAGS='-fno-omit-frame-pointer -fsanitize=address'
>   BUILD:   Doing 'make -j4' parallel build
>   HOSTCC   fixdep.o
>   HOSTLD   fixdep-in.o
>   LINK     fixdep
> <stdin>:1:0: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
> <stdin>:1:0: warning: -fsanitize=address not supported for this target
> 
> Auto-detecting system features:
> ...                         dwarf: [ OFF ]
> ...            dwarf_getlocations: [ OFF ]
> ...                         glibc: [ OFF ]
> ...                          gtk2: [ OFF ]
> ...                      libaudit: [ OFF ]
> ...                        libbfd: [ OFF ]
> ...                        libcap: [ OFF ]
> ...                        libelf: [ OFF ]
> ...                       libnuma: [ OFF ]
> ...        numa_num_possible_cpus: [ OFF ]
> ...                       libperl: [ OFF ]
> ...                     libpython: [ OFF ]
> ...                     libcrypto: [ OFF ]
> ...                     libunwind: [ OFF ]
> ...            libdw-dwarf-unwind: [ OFF ]
> ...                          zlib: [ OFF ]
> ...                          lzma: [ OFF ]
> ...                     get_cpuid: [ OFF ]
> ...                           bpf: [ OFF ]
> ...                        libaio: [ OFF ]
> ...                       libzstd: [ OFF ]
> ...        disassembler-four-args: [ OFF ]
> 
> Makefile.config:393: *** No gnu/libc-version.h found, please install glibc-dev[el].  Stop.
> Makefile.perf:224: recipe for target 'sub-make' failed
> make[1]: *** [sub-make] Error 2
> Makefile:69: recipe for target 'all' failed
> make: *** [all] Error 2
> [yangtiezhu@linux perf]$ ls /usr/include/gnu/libc-version.h
> /usr/include/gnu/libc-version.h
> 
> After install libasan and libubsan, the feature-glibc is 1 and the build
> process is success, so the cause is related with libasan or libubsan, we
> should check them and print an error log to reflect the reality.
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  tools/perf/Makefile.config | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 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
>        ifneq ($(filter s% -static%,$(LDFLAGS),),)
>          msg := $(error No static glibc found, please install glibc-static);
>        else
> -- 
> 2.1.0
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config
  2020-06-02  4:15 [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config Tiezhu Yang
  2020-06-02  4:15 ` [PATCH 2/2] perf tools: Remove some duplicated includes Tiezhu Yang
  2020-06-02 14:11 ` [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config Arnaldo Carvalho de Melo
@ 2020-06-02 14:15 ` Jiri Olsa
  2020-06-03  2:01   ` Tiezhu Yang
  2 siblings, 1 reply; 7+ messages in thread
From: Jiri Olsa @ 2020-06-02 14:15 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Namhyung Kim, linux-kernel,
	Xuefeng Li

On Tue, Jun 02, 2020 at 12:15:03PM +0800, Tiezhu Yang wrote:
> When build perf with ASan or UBSan, if libasan or libubsan can not find,
> the feature-glibc is 0 and there exists the following error log which is
> wrong, because we can find gnu/libc-version.h in /usr/include, glibc-devel
> is also installed.
> 
> [yangtiezhu@linux perf]$ make DEBUG=1 EXTRA_CFLAGS='-fno-omit-frame-pointer -fsanitize=address'
>   BUILD:   Doing 'make -j4' parallel build
>   HOSTCC   fixdep.o
>   HOSTLD   fixdep-in.o
>   LINK     fixdep
> <stdin>:1:0: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
> <stdin>:1:0: warning: -fsanitize=address not supported for this target
> 
> Auto-detecting system features:
> ...                         dwarf: [ OFF ]
> ...            dwarf_getlocations: [ OFF ]
> ...                         glibc: [ OFF ]
> ...                          gtk2: [ OFF ]
> ...                      libaudit: [ OFF ]
> ...                        libbfd: [ OFF ]
> ...                        libcap: [ OFF ]
> ...                        libelf: [ OFF ]
> ...                       libnuma: [ OFF ]
> ...        numa_num_possible_cpus: [ OFF ]
> ...                       libperl: [ OFF ]
> ...                     libpython: [ OFF ]
> ...                     libcrypto: [ OFF ]
> ...                     libunwind: [ OFF ]
> ...            libdw-dwarf-unwind: [ OFF ]
> ...                          zlib: [ OFF ]
> ...                          lzma: [ OFF ]
> ...                     get_cpuid: [ OFF ]
> ...                           bpf: [ OFF ]
> ...                        libaio: [ OFF ]
> ...                       libzstd: [ OFF ]
> ...        disassembler-four-args: [ OFF ]
> 
> Makefile.config:393: *** No gnu/libc-version.h found, please install glibc-dev[el].  Stop.
> Makefile.perf:224: recipe for target 'sub-make' failed
> make[1]: *** [sub-make] Error 2
> Makefile:69: recipe for target 'all' failed
> make: *** [all] Error 2
> [yangtiezhu@linux perf]$ ls /usr/include/gnu/libc-version.h
> /usr/include/gnu/libc-version.h
> 
> After install libasan and libubsan, the feature-glibc is 1 and the build
> process is success, so the cause is related with libasan or libubsan, we
> should check them and print an error log to reflect the reality.
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  tools/perf/Makefile.config | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 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?

jirka

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config
  2020-06-02 14:15 ` Jiri Olsa
@ 2020-06-03  2:01   ` Tiezhu Yang
  2020-06-04  8:34     ` Jiri Olsa
  0 siblings, 1 reply; 7+ messages in thread
From: Tiezhu Yang @ 2020-06-03  2:01 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Namhyung Kim, linux-kernel,
	Xuefeng Li

On 06/02/2020 10:15 PM, Jiri Olsa wrote:
> On Tue, Jun 02, 2020 at 12:15:03PM +0800, Tiezhu Yang wrote:
>> When build perf with ASan or UBSan, if libasan or libubsan can not find,
>> the feature-glibc is 0 and there exists the following error log which is
>> wrong, because we can find gnu/libc-version.h in /usr/include, glibc-devel
>> is also installed.
>>
>> [yangtiezhu@linux perf]$ make DEBUG=1 EXTRA_CFLAGS='-fno-omit-frame-pointer -fsanitize=address'
>>    BUILD:   Doing 'make -j4' parallel build
>>    HOSTCC   fixdep.o
>>    HOSTLD   fixdep-in.o
>>    LINK     fixdep
>> <stdin>:1:0: warning: -fsanitize=address and -fsanitize=kernel-address are not supported for this target
>> <stdin>:1:0: warning: -fsanitize=address not supported for this target
>>
>> Auto-detecting system features:
>> ...                         dwarf: [ OFF ]
>> ...            dwarf_getlocations: [ OFF ]
>> ...                         glibc: [ OFF ]
>> ...                          gtk2: [ OFF ]
>> ...                      libaudit: [ OFF ]
>> ...                        libbfd: [ OFF ]
>> ...                        libcap: [ OFF ]
>> ...                        libelf: [ OFF ]
>> ...                       libnuma: [ OFF ]
>> ...        numa_num_possible_cpus: [ OFF ]
>> ...                       libperl: [ OFF ]
>> ...                     libpython: [ OFF ]
>> ...                     libcrypto: [ OFF ]
>> ...                     libunwind: [ OFF ]
>> ...            libdw-dwarf-unwind: [ OFF ]
>> ...                          zlib: [ OFF ]
>> ...                          lzma: [ OFF ]
>> ...                     get_cpuid: [ OFF ]
>> ...                           bpf: [ OFF ]
>> ...                        libaio: [ OFF ]
>> ...                       libzstd: [ OFF ]
>> ...        disassembler-four-args: [ OFF ]
>>
>> Makefile.config:393: *** No gnu/libc-version.h found, please install glibc-dev[el].  Stop.
>> Makefile.perf:224: recipe for target 'sub-make' failed
>> make[1]: *** [sub-make] Error 2
>> Makefile:69: recipe for target 'all' failed
>> make: *** [all] Error 2
>> [yangtiezhu@linux perf]$ ls /usr/include/gnu/libc-version.h
>> /usr/include/gnu/libc-version.h
>>
>> After install libasan and libubsan, the feature-glibc is 1 and the build
>> process is success, so the cause is related with libasan or libubsan, we
>> should check them and print an error log to reflect the reality.
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>> ---
>>   tools/perf/Makefile.config | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> 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?

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config
  2020-06-03  2:01   ` Tiezhu Yang
@ 2020-06-04  8:34     ` Jiri Olsa
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Olsa @ 2020-06-04  8:34 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Namhyung Kim, linux-kernel,
	Xuefeng Li

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
> > > 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-04  8:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02  4:15 [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config Tiezhu Yang
2020-06-02  4:15 ` [PATCH 2/2] perf tools: Remove some duplicated includes Tiezhu Yang
2020-06-02 14:10   ` Arnaldo Carvalho de Melo
2020-06-02 14:11 ` [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config Arnaldo Carvalho de Melo
2020-06-02 14:15 ` Jiri Olsa
2020-06-03  2:01   ` Tiezhu Yang
2020-06-04  8:34     ` Jiri Olsa

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).