From: "Wangnan (F)" <wangnan0@huawei.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: <jolsa@redhat.com>, <linux-kernel@vger.kernel.org>,
<pi3orama@163.com>, <lizefan@huawei.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH v2 3/9] perf build: Test correct path of perf in build-test
Date: Fri, 15 Jan 2016 10:22:11 +0800 [thread overview]
Message-ID: <569857D3.3000705@huawei.com> (raw)
In-Reply-To: <20160114145817.GU18367@kernel.org>
On 2016/1/14 22:58, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jan 14, 2016 at 11:50:21AM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Thu, Jan 14, 2016 at 01:13:57PM +0000, Wang Nan escreveu:
>>> If an 'O' is passed to 'make build-test', many 'test -x' and 'test -f'
>>> will fail because perf resides in a different directory. Fix this by
>>> computing PERF_OUT according to 'O' and test correct output files.
>>> For make_kernelsrc and make_kernelsrc_tools, set KBUILD_OUTPUT_DIR
>>> instead because the path is different from others ($(O)/perf vs
>>> $(O)/tools/perf).
>> So, before this patch:
> Also, while trying to get this to work, I found these places lacking the
> O= prefixing, right?
>
>
> diff --git a/tools/perf/tests/make b/tools/perf/tests/make
> index e74c86b00c31..67842900482e 100644
> --- a/tools/perf/tests/make
> +++ b/tools/perf/tests/make
> @@ -59,7 +59,7 @@ has = $(shell which $1 2>/dev/null)
>
> # standard single make variable specified
> make_clean_all := clean all
> -make_python_perf_so := python/perf.so
> +make_python_perf_so := $(PERF_O)/python/perf.so
> make_debug := DEBUG=1
> make_no_libperl := NO_LIBPERL=1
> make_no_libpython := NO_LIBPYTHON=1
> @@ -82,9 +82,9 @@ make_tags := tags
> make_cscope := cscope
> make_help := help
> make_doc := doc
> -make_perf_o := perf.o
> -make_util_map_o := util/map.o
> -make_util_pmu_bison_o := util/pmu-bison.o
> +make_perf_o := $(PERF_O)/perf.o
> +make_util_map_o := $(PERF_O)/util/map.o
> +make_util_pmu_bison_o := $(PERF_O)/util/pmu-bison.o
> make_install := install
> make_install_bin := install-bin
> make_install_doc := install-doc
Rechecked. As a make target we don't need this prefix:
Don't allow writing at every directories:
$ find -type d -exec chmod 555 {} \;
$ touch ddd
touch: cannot touch ‘ddd’: Permission denied
$ make -C perf python/perf.so
make: Entering directory `/home/wangnan/kernel-hydrogen/tools/perf'
BUILD: Doing 'make -j24' parallel build
/bin/sh: .config-detected: Permission denied
...
config/Makefile:261: *** No gnu/libc-version.h found, please install
glibc-dev[el]. Stop.
make: *** [python/perf.so] Error 2
make: Leaving directory `/home/wangnan/kernel-hydrogen/tools/perf'
Then use python/perf.so as make target:
$ make -C perf python/perf.so O=/tmp/xxxxx
make: Entering directory `/home/w00229757/kernel-hydrogen/tools/perf'
BUILD: Doing 'make -j24' parallel build
Auto-detecting system features:
... dwarf: [ on ]
... glibc: [ on ]
... gtk2: [ OFF ]
... libaudit: [ OFF ]
... libbfd: [ OFF ]
... libelf: [ on ]
... libnuma: [ OFF ]
... numa_num_possible_cpus: [ OFF ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
...
LD /tmp/xxxxx/fd/libapi-in.o
GEN /tmp/xxxxx/libtraceevent-dynamic-list
LD /tmp/xxxxx/fs/libapi-in.o
LD /tmp/xxxxx/libapi-in.o
AR /tmp/xxxxx/libapi.a
LD /tmp/xxxxx/libtraceevent-in.o
LINK /tmp/xxxxx/libtraceevent.a
GEN /tmp/xxxxx/python/perf.so
make: Leaving directory `/home/wangnan/kernel-hydrogen/tools/perf'
Adding the prefix also works it.
next prev parent reply other threads:[~2016-01-15 2:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 13:13 [PATCH v2 0/9] perf build: Make build-test faster Wang Nan
2016-01-14 13:13 ` [PATCH v2 1/9] perf build: Set parallel making options build-test Wang Nan
2016-01-14 13:13 ` [PATCH v2 2/9] perf build: Pass O option to Makefile.perf in build-test Wang Nan
2016-01-14 13:13 ` [PATCH v2 3/9] perf build: Test correct path of perf " Wang Nan
2016-01-14 14:50 ` Arnaldo Carvalho de Melo
2016-01-14 14:58 ` Arnaldo Carvalho de Melo
2016-01-14 15:08 ` pi3orama
2016-01-14 15:44 ` Arnaldo Carvalho de Melo
2016-01-14 16:02 ` Arnaldo Carvalho de Melo
2016-01-14 17:32 ` Arnaldo Carvalho de Melo
2016-01-15 2:57 ` Wangnan (F)
2016-01-15 3:32 ` Wangnan (F)
2016-01-15 2:22 ` Wangnan (F) [this message]
2016-01-14 13:13 ` [PATCH v2 4/9] perf build: Pass O option to kernel makefile " Wang Nan
2016-01-14 13:13 ` [PATCH v2 5/9] perf build: Add feature-dump target Wang Nan
2016-01-14 13:14 ` [PATCH v2 6/9] perf build: Introduce FEATURES_DUMP make variable Wang Nan
2016-01-14 13:14 ` [PATCH v2 7/9] tools build: Allow subprojects select all feature checkers Wang Nan
2016-01-14 13:14 ` [PATCH v2 8/9] perf build: Select all feature checkers for feature-dump Wang Nan
2016-01-14 13:14 ` [PATCH v2 9/9] perf build: Use feature dump file for build-test Wang Nan
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=569857D3.3000705@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
/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
Powered by JetHome