Skip to contentSkip to conversation

perf build: Update error message for BUILD_NONDISTRO=1

PATCH In review Namhyung Kim 2 participants 5 messages May 4

Subsystems (2)
lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH v2 1/3 perf build: Update error message for BUILD_NONDISTRO=1

It should say binutils-dev(el) instead of plain binutils package as it's mostly installed already and can confuse people like me. :)

---
 tools/perf/Makefile.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -1
index 333ddd0e4bd814e9..06d7a3f9990ce522 100644
@@ -923,7 +923,7 @@ ifdef BUILD_NONDISTRO
   $(call feature_check,libbfd-liberty-z)
 
   ifneq ($(feature-libbfd-threadsafe), 1)
-    $(error binutils 2.42 or later is required for non-distro builds)
+    $(error binutils-dev(el) 2.42 or later is required for non-distro builds)
   endif
 
   # we may be on a system that requires -liberty and (maybe) -lz
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH v2 2/3 perf build: Add -fms-extensions for GEN_VMLINUX_H=1

On my system, make GEN_VMLINUX_H=1 fails with a lot of error messages like below:

./util/bpf_skel/vmlinux.h:134488:4: error: declaration does not declare anything [-Werror,-Wmissing-declarations]

   134488 |                         struct freelist_counters;
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~

make[2]: *** [Makefile.perf:1249: linux/tools/perf/util/bpf_skel/.tmp/lock_contention.bpf.o] Error 1

I saw commit 835a50753579a ("selftests/bpf: Add -fms-extensions to bpf build flags") also added the same flags to bpf programs.

---
v2) use -fms-extensions and -Wno-microsoft-anon-tag (Sashiko)

 tools/perf/Makefile.perf | 1 +
 1 file changed, 1 insertion(+)
tools/perf/Makefile.perf +1 -0
index cee19c923c0607d2..0aba14f22a06f7a6 100644
@@ -1249,6 +1249,7 @@ $(SKEL_TMP_OUT)/%.bpf.o: util/bpf_skel/%.bpf.c $(LIBBPF) $(SKEL_OUT)/vmlinux.h
 	$(QUIET_CLANG)$(CLANG) -g -O2 -fno-stack-protector --target=bpf \
 	  $(CLANG_OPTIONS) $(EXTRA_BPF_FLAGS) $(BPF_INCLUDE) $(TOOLS_UAPI_INCLUDE) \
 	  -include $(OUTPUT)PERF-VERSION-FILE -include util/bpf_skel/perf_version.h \
+	  -fms-extensions -Wno-microsoft-anon-tag \
 	  -c $(filter util/bpf_skel/%.bpf.c,$^) -o $@
 
 $(SKEL_OUT)/%.skel.h: $(SKEL_TMP_OUT)/%.bpf.o | $(BPFTOOL)
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH v2 3/3 perf build: Remove NO_GTK2 build test

In reply to Namhyung Kim

4751bddd3f983af2 ("perf tools: Make GTK2 support opt-in") changed GTK2 build as opt-in. So NO_GTK2 is meaningless and we need to pass GTK2=1 to enable it. Let's update the build-test configuration for that.

Also make_no_ui is the same as make_no_slang since NO_GTK2 is no-op. Let's get rid of it as well.

---
v2) new submission

 tools/perf/tests/make | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
tools/perf/tests/make +1 -5
index 6587dc326d1b272e..dbd7c86a2dccba6c 100644
@@ -78,8 +78,6 @@ make_libperl        := LIBPERL=1
 make_no_libpython   := NO_LIBPYTHON=1
 make_no_scripts     := NO_LIBPYTHON=1
 make_no_slang       := NO_SLANG=1
-make_no_gtk2        := NO_GTK2=1
-make_no_ui          := NO_SLANG=1 NO_GTK2=1
 make_no_demangle    := NO_DEMANGLE=1
 make_no_libelf      := NO_LIBELF=1
 make_no_libdw       := NO_LIBDW=1
@@ -118,7 +116,7 @@ make_install_prefix_slash := install prefix=/tmp/krava/
 make_static         := LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 NO_LIBTRACEEVENT=1 NO_LIBELF=1
 
 # all the NO_* variable combined
-make_minimal        := NO_LIBPYTHON=1 NO_GTK2=1
+make_minimal        := NO_LIBPYTHON=1
 make_minimal        += NO_DEMANGLE=1 NO_LIBELF=1 NO_BACKTRACE=1
 make_minimal        += NO_LIBNUMA=1 NO_LIBBIONIC=1 NO_LIBDW=1
 make_minimal        += NO_LIBBPF=1
@@ -153,8 +151,6 @@ run += make_libperl
 run += make_no_libpython
 run += make_no_scripts
 run += make_no_slang
-run += make_no_gtk2
-run += make_no_ui
 run += make_no_demangle
 run += make_no_libelf
 run += make_no_libdw
Signature · 1 line
2.53.0
#3 lore raw

Re: [PATCH v2 3/3] perf build: Remove NO_GTK2 build test

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The commit removes the `NO_GTK2` test cases but fails to add `make_with_gtk2` to the `run` list…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit removes the NO_GTK2 test cases but fails to add make_with_gtk2 to the run list, leaving the opt-in GTK2 build entirely untested. --

commit a080179ce5f6a893edba859d130afb3b6367e133
Author: Namhyung Kim <[email protected]>

perf build: Remove NO_GTK2 build test

This commit removes the obsolete NO_GTK2 build targets since GTK2 support was previously made opt-in. It updates the build-test configuration by removing make_no_gtk2, make_no_ui, and updating make_minimal.

Quoted 4 lines
tools/perf/tests/make +0 -0
index 6587dc326d1b..dbd7c86a2dcc 100644

[ ... ]

tools/perf/tests/make run += make_libperl · line 156

Quoted 9 lines
tools/perf/tests/make +0 -2
@@ -153,8 +151,6 @@ run += make_libperl
 run += make_no_libpython
 run += make_no_scripts
 run += make_no_slang
-run += make_no_gtk2
-run += make_no_ui
 run += make_no_demangle
 run += make_no_libelf
 run += make_no_libdw

Does this leave the GTK2 build entirely untested?

The commit message states "we need to pass GTK2=1 to enable it. Let's update the build-test configuration for that."

However, after removing these targets, there doesn't appear to be a corresponding addition to the run list (such as run += make_with_gtk2) to actually test the opt-in GTK2 build path.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
author maintainer
#4 lore raw

Re: [PATCH v2 3/3] perf build: Remove NO_GTK2 build test

Quoted 30 lines · On Mon, May 04, 2026 at 06:47:59AM +0000, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit removes the NO_GTK2 test cases but fails to add make_with_gtk2 to the run list, leaving the opt-in GTK2 build entirely untested. --

commit a080179ce5f6a893edba859d130afb3b6367e133
Author: Namhyung Kim <[email protected]>

perf build: Remove NO_GTK2 build test

This commit removes the obsolete NO_GTK2 build targets since GTK2 support was previously made opt-in. It updates the build-test configuration by removing make_no_gtk2, make_no_ui, and updating make_minimal.

Quoted 4 lines
tools/perf/tests/make +0 -0
index 6587dc326d1b..dbd7c86a2dcc 100644

[ ... ]

tools/perf/tests/make run += make_libperl · line 156

Quoted 9 lines
tools/perf/tests/make +0 -2
@@ -153,8 +151,6 @@ run += make_libperl
 run += make_no_libpython
 run += make_no_scripts
 run += make_no_slang
-run += make_no_gtk2
-run += make_no_ui
 run += make_no_demangle
 run += make_no_libelf
 run += make_no_libdw

Does this leave the GTK2 build entirely untested?

Quoted 6 lines

The commit message states "we need to pass GTK2=1 to enable it. Let's update the build-test configuration for that."

However, after removing these targets, there doesn't appear to be a corresponding addition to the run list (such as run += make_with_gtk2) to actually test the opt-in GTK2 build path.

This is handled separately in tools/perf/Makefile.

Thanks,
Namhyung