From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755762AbbIAKkW (ORCPT ); Tue, 1 Sep 2015 06:40:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50765 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755717AbbIAKkS (ORCPT ); Tue, 1 Sep 2015 06:40:18 -0400 Date: Tue, 1 Sep 2015 12:40:15 +0200 From: Jiri Olsa To: Adrian Hunter Cc: Wang Nan , acme@kernel.org, linux-kernel@vger.kernel.org, lizefan@huawei.com, pi3orama@163.com, Arnaldo Carvalho de Melo Subject: Re: [PATCH] perf tools: Fix random building error Message-ID: <20150901104015.GF12968@krava.brq.redhat.com> References: <1441087005-107540-1-git-send-email-wangnan0@huawei.com> <55E5448E.40001@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55E5448E.40001@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 01, 2015 at 09:24:14AM +0300, Adrian Hunter wrote: > On 01/09/15 08:56, Wang Nan wrote: > > I hit following building error randomly: > > Random presumably because there is a race to use/create the directory by > different make jobs (i.e. -j option). > > > > > ... > > /bin/sh: /path/to/kernel/buildperf/util/intel-pt-decoder/inat-tables.c: No such file or directory > > ... > > LINK /path/to/kernel/buildperf/plugin_mac80211.so > > LINK /path/to/kernel/buildperf/plugin_kmem.so > > LINK /path/to/kernel/buildperf/plugin_xen.so > > LINK /path/to/kernel/buildperf/plugin_hrtimer.so > > In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:25:0: > > util/intel-pt-decoder/inat.c:24:25: fatal error: inat-tables.c: No such file or directory > > #include "inat-tables.c" > > ^ > > compilation terminated. > > make[4]: *** [/path/to/kernel/buildperf/util/intel-pt-decoder/intel-pt-insn-decoder.o] Error 1 > > make[4]: *** Waiting for unfinished jobs.... > > LINK /path/to/kernel/buildperf/plugin_function.so > > > > This is caused by tools/perf/util/intel-pt-decoder/Build that, it tries to > > generate $(OUTPUT)util/intel-pt-decoder/inat-tables.c atomatically but > > forget to ensure the existance of $(OUTPUT)util/intel-pt-decoder directory. > > > > This patch fixes it by adding $(call rule_mkdir) like other similar rules. > > > > Signed-off-by: Wang Nan > > Cc: Arnaldo Carvalho de Melo > > Cc: Adrian Hunter > > Looks ok to me. Jiri? right, each separate rule needs to have this Acked-by: Jiri Olsa thanks, jirka