From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, "James Clark" <james.clark@arm.com>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"Ian Rogers" <irogers@google.com>,
"Jaroslav Škarvada" <jskarvad@redhat.com>,
"Jiri Olsa" <jolsa@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>
Subject: [PATCH 5.4 57/88] tools build: Remove needless libpython-version feature check that breaks test-all fast path
Date: Mon, 13 Dec 2021 10:30:27 +0100 [thread overview]
Message-ID: <20211213092935.229501437@linuxfoundation.org> (raw)
In-Reply-To: <20211213092933.250314515@linuxfoundation.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
commit 3d1d57debee2d342a47615707588b96658fabb85 upstream.
Since 66dfdff03d196e51 ("perf tools: Add Python 3 support") we don't use
the tools/build/feature/test-libpython-version.c version in any Makefile
feature check:
$ find tools/ -type f | xargs grep feature-libpython-version
$
The only place where this was used was removed in 66dfdff03d196e51:
- ifneq ($(feature-libpython-version), 1)
- $(warning Python 3 is not yet supported; please set)
- $(warning PYTHON and/or PYTHON_CONFIG appropriately.)
- $(warning If you also have Python 2 installed, then)
- $(warning try something like:)
- $(warning $(and ,))
- $(warning $(and ,) make PYTHON=python2)
- $(warning $(and ,))
- $(warning Otherwise, disable Python support entirely:)
- $(warning $(and ,))
- $(warning $(and ,) make NO_LIBPYTHON=1)
- $(warning $(and ,))
- $(error $(and ,))
- else
- LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
- EXTLIBS += $(PYTHON_EMBED_LIBADD)
- LANG_BINDINGS += $(obj-perf)python/perf.so
- $(call detected,CONFIG_LIBPYTHON)
- endif
And nowadays we either build with PYTHON=python3 or just install the
python3 devel packages and perf will build against it.
But the leftover feature-libpython-version check made the fast path
feature detection to break in all cases except when python2 devel files
were installed:
$ rpm -qa | grep python.*devel
python3-devel-3.9.7-1.fc34.x86_64
$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf ;
$ make -C tools/perf O=/tmp/build/perf install-bin
make: Entering directory '/var/home/acme/git/perf/tools/perf'
BUILD: Doing 'make -j32' parallel build
HOSTCC /tmp/build/perf/fixdep.o
<SNIP>
$ cat /tmp/build/perf/feature/test-all.make.output
In file included from test-all.c:18:
test-libpython-version.c:5:10: error: #error
5 | #error
| ^~~~~
$ ldd ~/bin/perf | grep python
libpython3.9.so.1.0 => /lib64/libpython3.9.so.1.0 (0x00007fda6dbcf000)
$
As python3 is the norm these days, fix this by just removing the unused
feature-libpython-version feature check, making the test-all fast path
to work with the common case.
With this:
$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf ;
$ make -C tools/perf O=/tmp/build/perf install-bin |& head
make: Entering directory '/var/home/acme/git/perf/tools/perf'
BUILD: Doing 'make -j32' parallel build
HOSTCC /tmp/build/perf/fixdep.o
HOSTLD /tmp/build/perf/fixdep-in.o
LINK /tmp/build/perf/fixdep
Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
$ ldd ~/bin/perf | grep python
libpython3.9.so.1.0 => /lib64/libpython3.9.so.1.0 (0x00007f58800b0000)
$ cat /tmp/build/perf/feature/test-all.make.output
$
Reviewed-by: James Clark <james.clark@arm.com>
Fixes: 66dfdff03d196e51 ("perf tools: Add Python 3 support")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jaroslav Škarvada <jskarvad@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/YaYmeeC6CS2b8OSz@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/build/Makefile.feature | 1 -
tools/build/feature/Makefile | 4 ----
tools/build/feature/test-all.c | 5 -----
tools/build/feature/test-libpython-version.c | 11 -----------
tools/perf/Makefile.config | 2 --
5 files changed, 23 deletions(-)
delete mode 100644 tools/build/feature/test-libpython-version.c
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -52,7 +52,6 @@ FEATURE_TESTS_BASIC :=
numa_num_possible_cpus \
libperl \
libpython \
- libpython-version \
libslang \
libslang-include-subdir \
libcrypto \
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -30,7 +30,6 @@ FILES=
test-numa_num_possible_cpus.bin \
test-libperl.bin \
test-libpython.bin \
- test-libpython-version.bin \
test-libslang.bin \
test-libslang-include-subdir.bin \
test-libcrypto.bin \
@@ -214,9 +213,6 @@ $(OUTPUT)test-libperl.bin:
$(OUTPUT)test-libpython.bin:
$(BUILD) $(FLAGS_PYTHON_EMBED)
-$(OUTPUT)test-libpython-version.bin:
- $(BUILD)
-
$(OUTPUT)test-libbfd.bin:
$(BUILD) -DPACKAGE='"perf"' -lbfd -ldl
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -14,10 +14,6 @@
# include "test-libpython.c"
#undef main
-#define main main_test_libpython_version
-# include "test-libpython-version.c"
-#undef main
-
#define main main_test_libperl
# include "test-libperl.c"
#undef main
@@ -193,7 +189,6 @@
int main(int argc, char *argv[])
{
main_test_libpython();
- main_test_libpython_version();
main_test_libperl();
main_test_hello();
main_test_libelf();
--- a/tools/build/feature/test-libpython-version.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <Python.h>
-
-#if PY_VERSION_HEX >= 0x03000000
- #error
-#endif
-
-int main(void)
-{
- return 0;
-}
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -247,8 +247,6 @@ endif
FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS)
FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS)
-FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS)
-FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS)
FEATURE_CHECK_LDFLAGS-libaio = -lrt
next prev parent reply other threads:[~2021-12-13 9:48 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 9:29 [PATCH 5.4 00/88] 5.4.165-rc1 review Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 01/88] serial: tegra: Change lower tolerance baud rate limit for tegra20 and tegra30 Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 02/88] ntfs: fix ntfs_test_inode and ntfs_init_locked_inode function type Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 03/88] HID: quirks: Add quirk for the Microsoft Surface 3 type-cover Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 04/88] HID: google: add eel USB id Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 05/88] HID: add hid_is_usb() function to make it simpler for USB detection Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 06/88] HID: add USB_HID dependancy to hid-prodikeys Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 07/88] HID: add USB_HID dependancy to hid-chicony Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 08/88] HID: add USB_HID dependancy on some USB HID drivers Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 09/88] HID: bigbenff: prevent null pointer dereference Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 10/88] HID: wacom: fix problems when device is not a valid USB device Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 11/88] HID: check for valid USB device for many HID drivers Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 12/88] can: kvaser_usb: get CAN clock frequency from device Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 13/88] can: kvaser_pciefd: kvaser_pciefd_rx_error_frame(): increase correct stats->{rx,tx}_errors counter Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 14/88] can: sja1000: fix use after free in ems_pcmcia_add_card() Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 15/88] nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 16/88] selftests: netfilter: add a vrf+conntrack testcase Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 17/88] vrf: dont run conntrack on vrf with !dflt qdisc Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 18/88] bpf: Fix the off-by-two error in range markings Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 19/88] ice: ignore dropped packets during init Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 20/88] bonding: make tx_rebalance_counter an atomic Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 21/88] nfp: Fix memory leak in nfp_cpp_area_cache_add() Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 22/88] seg6: fix the iif in the IPv6 socket control block Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 23/88] udp: using datalen to cap max gso segments Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 24/88] iavf: restore MSI state on reset Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 25/88] iavf: Fix reporting when setting descriptor count Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 26/88] IB/hfi1: Correct guard on eager buffer deallocation Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 27/88] mm: bdi: initialize bdi_min_ratio when bdi is unregistered Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 28/88] ALSA: ctl: Fix copy of updated id with element read/write Greg Kroah-Hartman
2021-12-13 9:29 ` [PATCH 5.4 29/88] ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 30/88] ALSA: pcm: oss: Fix negative period/buffer sizes Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 31/88] ALSA: pcm: oss: Limit the period size to 16MB Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 32/88] ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 33/88] btrfs: clear extent buffer uptodate when we fail to write it Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 34/88] btrfs: replace the BUG_ON in btrfs_del_root_ref with proper error handling Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 35/88] nfsd: Fix nsfd startup race (again) Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 36/88] tracefs: Have new files inherit the ownership of their parent Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 37/88] clk: qcom: regmap-mux: fix parent clock lookup Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 38/88] drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 39/88] can: pch_can: pch_can_rx_normal: fix use after free Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 40/88] can: m_can: Disable and ignore ELO interrupt Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 41/88] x86/sme: Explicitly map new EFI memmap table as encrypted Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 42/88] libata: add horkage for ASMedia 1092 Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 43/88] wait: add wake_up_pollfree() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 44/88] binder: use wake_up_pollfree() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 45/88] signalfd: " Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 46/88] aio: keep poll requests on waitqueue until completed Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 47/88] aio: fix use-after-free due to missing POLLFREE handling Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 48/88] tracefs: Set all files to the same group ownership as the mount option Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 49/88] block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2) Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 50/88] qede: validate non LSO skb length Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 51/88] ASoC: qdsp6: q6routing: Fix return value from msm_routing_put_audio_mixer Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 52/88] i40e: Fix failed opcode appearing if handling messages from VF Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 53/88] i40e: Fix pre-set max number of queues for VF Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 54/88] mtd: rawnand: fsmc: Take instruction delay into account Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 55/88] mtd: rawnand: fsmc: Fix timing computation Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 56/88] dt-bindings: net: Reintroduce PHY no lane swap binding Greg Kroah-Hartman
2021-12-13 9:30 ` Greg Kroah-Hartman [this message]
2021-12-13 9:30 ` [PATCH 5.4 58/88] net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 59/88] net: altera: set a couple error code in probe() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 60/88] net: fec: only clear interrupt of handling queue in fec_enet_rx_queue() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 61/88] net, neigh: clear whole pneigh_entry at alloc time Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 62/88] net/qla3xxx: fix an error code in ql_adapter_up() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 63/88] selftests/fib_tests: Rework fib_rp_filter_test() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 64/88] USB: gadget: detect too-big endpoint 0 requests Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 65/88] USB: gadget: zero allocate endpoint 0 buffers Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 66/88] usb: core: config: fix validation of wMaxPacketValue entries Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 67/88] xhci: Remove CONFIG_USB_DEFAULT_PERSIST to prevent xHCI from runtime suspending Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 68/88] usb: core: config: using bit mask instead of individual bits Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 69/88] xhci: avoid race between disable slot command and host runtime suspend Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 70/88] iio: trigger: Fix reference counting Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 71/88] iio: trigger: stm32-timer: fix MODULE_ALIAS Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 72/88] iio: stk3310: Dont return error code in interrupt handler Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 73/88] iio: mma8452: Fix trigger reference couting Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 74/88] iio: ltr501: Dont return error code in trigger handler Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 75/88] iio: kxsd9: " Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 76/88] iio: itg3200: Call iio_trigger_notify_done() on error Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 77/88] iio: dln2-adc: Fix lockdep complaint Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 78/88] iio: dln2: Check return value of devm_iio_trigger_register() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 79/88] iio: at91-sama5d2: Fix incorrect sign extension Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 80/88] iio: adc: axp20x_adc: fix charging current reporting on AXP22x Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 81/88] iio: ad7768-1: Call iio_trigger_notify_done() on error Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 82/88] iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 83/88] irqchip/armada-370-xp: Fix return value of armada_370_xp_msi_alloc() Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 84/88] irqchip/armada-370-xp: Fix support for Multi-MSI interrupts Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 85/88] irqchip/irq-gic-v3-its.c: Force synchronisation when issuing INVALL Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 86/88] irqchip: nvic: Fix offset for Interrupt Priority Offsets Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 87/88] misc: fastrpc: fix improper packet size calculation Greg Kroah-Hartman
2021-12-13 9:30 ` [PATCH 5.4 88/88] bpf: Add selftests to cover packet access corner cases Greg Kroah-Hartman
2021-12-13 14:43 ` [PATCH 5.4 00/88] 5.4.165-rc1 review Jon Hunter
2021-12-13 19:55 ` Guenter Roeck
2021-12-13 20:24 ` Florian Fainelli
2021-12-13 20:28 ` Shuah Khan
2021-12-14 12:29 ` Naresh Kamboju
2021-12-14 12:41 ` Sudip Mukherjee
2021-12-15 0:50 ` Samuel Zou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211213092935.229501437@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=jskarvad@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).