From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B892B10DF; Thu, 30 Nov 2023 14:12:20 -0800 (PST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5c21e185df5so1162233a12.1; Thu, 30 Nov 2023 14:12:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701382340; x=1701987140; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+Z2BEAePLu01GRPlfECCRaK8cq/hBNpwuCocumn+ug4=; b=VjrD9LBGRx0AT73T4mgniuqfUKmBSH4mqWGmUblO+7mXJJ6OX1F/dLSo7++qotgAau KFoDVwPNDkVPPLiFqdPKcaF21ZPgK+zJDmL0LnvKOPEnbHicz2+/g8WKokZ3Tg+GLPz+ 9KJ0WJIAJb8MG8eWdi1tXu/iKHh9JyxVDKm4X7bZkKC/GCj4LZgBWZui5TGBzZoZo4Am E+GbwgvqcPZfhD1Q5F1FwksbVueQyEj6aGpESI81BQ6LTWb1/bnyBLlThwgW2zePfwat jiRr4uuitRSu3KWpmDoZw4K/fchPWBVrxNyKsgbKKC9C95JmqFHbgInicRqrbzfbYq48 4NlA== X-Gm-Message-State: AOJu0Yy7Q0mU1NhRmxBZCcKdCKAAQR3+tipeT9eQeUk8HKU0uFoStifZ EzQ93GKJKP2g+rwlb0BtAf4avqiSxxutbjqaFFY= X-Google-Smtp-Source: AGHT+IHUrfUhc1KjoJM0sgOBbQJ/V0+8OJ0d1ll3lqAXcHNTp5BImJQJGhsViHMJJr60vBWw6pSedfARAoFCeE4+AQ8= X-Received: by 2002:a17:90a:f3cc:b0:280:25e8:f7b4 with SMTP id ha12-20020a17090af3cc00b0028025e8f7b4mr24694263pjb.15.1701382340064; Thu, 30 Nov 2023 14:12:20 -0800 (PST) Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Thu, 30 Nov 2023 14:12:08 -0800 Message-ID: Subject: Re: [PATCH 1/1] perf beauty: Don't use 'find ... -printf' as it isn't available in busybox To: Arnaldo Carvalho de Melo Cc: Ian Rogers , Adrian Hunter , Jiri Olsa , linux-perf-users@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Arnaldo, On Thu, Nov 30, 2023 at 1:54=E2=80=AFPM Arnaldo Carvalho de Melo wrote: > > Namhyung reported: > > I'm seeing a build error on my Alpine linux image which uses busybox + > musl libc: > > In file included from trace/beauty/arch_errno_names.c:1, > from builtin-trace.c:899: > /build/trace/beauty/generated/arch_errno_name_array.c: In function 'a= rch_syscalls__strerrno': > /build/trace/beauty/generated/arch_errno_name_array.c:142:49: error: = unused parameter 'arch' [-Werror=3Dunused-parameter] > 142 | const char *arch_syscalls__strerrno(const char *arch, int err= ) > > It looks like busybox find command doesn't have -printf option > > find: unrecognized: -printf > , Yesterday 9:16=E2=80=AFPM > , > BusyBox v1.36.1 (2023-07-27 17:12:24 UTC) multi-call binary. > > Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS] > > Search for files and perform actions on them. > First failed action stops processing of current file. > Defaults: PATH is current directory, action is '-print' > > So just remove it and pipe find's entry to a basename loop to produce > the same result. > > Fixes: 0337cf74ccf2a434 ("perf util: Introduce architecture specific errn= o/name mapping") > Reported-by: Namhyung Kim > Cc: Adrian Hunter > Cc: Hendrik Brueckner > Cc: Ian Rogers > Cc: Jiri Olsa > Cc: Michael Petlan > Cc: Thomas Richter > Signed-off-by: Arnaldo Carvalho de Melo Thanks for the fix! Tested-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/trace/beauty/arch_errno_names.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/trace/beauty/arch_errno_names.sh b/tools/perf/tra= ce/beauty/arch_errno_names.sh > index cc09dcaa891e04bb..3ec8781344db13ba 100755 > --- a/tools/perf/trace/beauty/arch_errno_names.sh > +++ b/tools/perf/trace/beauty/arch_errno_names.sh > @@ -76,7 +76,7 @@ EoHEADER > > # Create list of architectures that have a specific errno.h. > archlist=3D"" > -for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d -print= f "%f\n" | sort -r); do > +for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d | whil= e read arch ; do basename $arch ; done | sort -r); do > test -f $toolsdir/arch/$arch/include/uapi/asm/errno.h && archlist= =3D"$archlist $arch" > done > > -- > 2.41.0 >