Building and then immediately cleaning in the source tree fails. Using 'remake' for extended debug info. This looks to be caused by the same issue as I reported last week in bug #116131 which affects building out-of-tree. $ pwd /home/all/SourceCode/linux/linux $ gitlog -n 1 806fdcc 2016-04-14 19:53:46 -0700 N Linus Torvalds Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip $ git status On branch master Your branch is up-to-date with 'origin/master'. $ remake JOBS=1 V=1 tools/perf ... $ remake JOBS=1 V=1 tools/perf_clean ... #0 silentoldconfig at /home/all/SourceCode/linux/linux/Makefile:537 Command-line invocation: "remake -f ./Makefile silentoldconfig" ##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> mkdir -p ./tools ##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> remake LDFLAGS= MAKEFLAGS="" O=/home/all/SourceCode/linux/linux subdir=tools -C ./tools/ perf_clean ##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> mkdir -p /home/all/SourceCode/linux/linux/tools/perf && remake O=/home/all/SourceCode/linux/linux subdir=tools/perf --no-print-directory -C perf clean ##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> remake -C /home/all/SourceCode/linux/linux/tools/lib/traceevent/ O=/home/all/SourceCode/linux/linux/tools/perf/ clean >/dev/null ##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< /bin/sh: 1: cd: can't cd to /home/all/SourceCode/linux/linux/tools/perf/tools/perf/ ../../scripts/Makefile.include:16: *** output directory "/home/all/SourceCode/linux/linux/tools/perf/tools/perf/" does not exist. Stop. Makefile.perf:450: *** [/home/all/SourceCode/linux/linux/tools/perf/libtraceevent.a-clean] Error 2 #0 /home/all/SourceCode/linux/linux/tools/perf/libtraceevent.a-clean at /home/all/SourceCode/linux/linux/tools/perf/Makefile.perf:450 #1 clean at /home/all/SourceCode/linux/linux/tools/perf/Makefile.perf:628 Command-line invocation: "remake -f Makefile.perf --no-print-directory -j1 O=/home/all/SourceCode/linux/linux clean" Makefile:88: *** [clean] Error 2 #0 clean at /home/all/SourceCode/linux/linux/tools/perf/Makefile:88 Command-line invocation: "remake O=/home/all/SourceCode/linux/linux subdir=tools/perf --no-print-directory -C perf clean" Makefile:139: *** [perf_clean] Error 2 #0 perf_clean at /home/all/SourceCode/linux/linux/tools/Makefile:139 Command-line invocation: "remake LDFLAGS= MAKEFLAGS= O=/home/all/SourceCode/linux/linux subdir=tools -C ./tools/ perf_clean" Makefile:1547: *** [tools/perf_clean] Error 2 #0 tools/perf_clean at /home/all/SourceCode/linux/linux/Makefile:1547 Command-line invocation: "remake JOBS=1 V=1 tools/perf_clean"
Created attachment 213171 [details] perf tools: Force subdir to be empty could you please test this patch, thanks
Doesn't look good; many of the paths being generated are not correct, in that the base $(O) directory is being used, not $(O)/$(subdir)/ Seeing this clearly with a: remake V=1 JOBS=1 O=../builds/amd64 tools/perf_clean where towards the end it does: ... remake O=/home/all/SourceCode/linux/builds/amd64 -C Documentation clean ##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> rm -f /home/all/SourceCode/linux/builds/amd64/perf-diff.xml /home/all/SourceCode/linux/builds/amd64/perf-record.xml /home/all/SourceCode/linux/builds/amd64/pe rf-timechart.xml /home/all/SourceCode/linux/builds/amd64/perf-report.xml /home/all/SourceCode/linux/builds/amd64/perf-kvm.xml /home/all/SourceCode/linux/build s/amd64/perf-data.xml /home/all/SourceCode/linux/builds/amd64/perf-buildid-cache.xml /home/all/SourceCode/linux/builds/amd64/perf-list.xml ... Those paths should be /home/all/SourceCode/linux/builds/amd64/tools/perf/Documentation/
Created attachment 213251 [details] tools build: Fix perf_clean target how about this one.. thanks