From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E45B8A0540; Wed, 8 Jun 2022 20:31:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8401B40689; Wed, 8 Jun 2022 20:31:20 +0200 (CEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mails.dpdk.org (Postfix) with ESMTP id 3C41340042 for ; Wed, 8 Jun 2022 20:31:19 +0200 (CEST) Received: by mail-lf1-f44.google.com with SMTP id s6so34458111lfo.13 for ; Wed, 08 Jun 2022 11:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xAe1/i9AZCUNG/VVwbMfMtnoTd3pG1h2T9h8dXj/ox8=; b=QcKpAzMwbH1bK9F2Gf/kawrasytK9o0bSCluX01LmSYRA1r198CKR8WkJajfq4SIF+ 5KfYK6BaB53w/8inWwDoPDiTDC6ciQPIUnN2Ndw79psFMU4yuMR0dZqstFs2AKPP3k7C SewXPH7IfawGsu0rXlL5xKfuIz81sLxuYxSfC0G5WZSDJts+I7XGlSQLni+f2Gn8LMjD Dn/sf0fm/0YYluM5vLGOzZjFAQCDyZnAn5x33LvTUTH0Eh0QVOyvKA1AjFjJIrjuSd26 XcJdNMdpYLVUDPCRp1Cx26eATj50dVF5idsqsjhwH74xH7SHkRO06oEx/I7rsf7BblfL PzUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xAe1/i9AZCUNG/VVwbMfMtnoTd3pG1h2T9h8dXj/ox8=; b=bLgHsznqJl/kQiRo011H66c22L5G/va2yr3ynWkNGmKs4G/kalAH+QJz7UiNvnWZb5 nIRyaQu28YSrX9pJs1SsWIMsaohp5+k++ClGJ+eTjhWsaqVyxTfa/Bd8HKcRKyXxHP1G caVbH7zzDKah8bK9E8bY02OalosD1eMakWeNdVfcYXCKzJOH833lfk0ao7UUv7ZL+EjN d23bOVv7GwmH3APQUzMhalp4zGnhxBqUxbHc9a+dW8sCGb8YrT+qyffKaPAoCIET14tV 9w5vbPxCiZA/lf0AriVzD6/O1ZGioD2HeEGtvFOioEPoAeiPxL7OGIFKq2yMkt+BRVzB GjrQ== X-Gm-Message-State: AOAM532uTtnyhteeGARIiPHJtfnbfyctPAUgXHAwAsp0tiGmHkr/JyUW ga0R+2A5P+b5kJC2uiBCRRrHYSuyBtXkwUWpbNCJ+w== X-Google-Smtp-Source: ABdhPJx0nNCLqyohLYYjL8sLePozVcgKJsdB8eX2750XKqq+/Zmjw23b3SA4iFxlhczaoFwjZ9WCoeIxi8Jc/VrUnqY= X-Received: by 2002:a05:6512:3402:b0:474:41fe:69e9 with SMTP id i2-20020a056512340200b0047441fe69e9mr22709049lfr.514.1654713078650; Wed, 08 Jun 2022 11:31:18 -0700 (PDT) MIME-Version: 1.0 References: <20220602092356.2788089-1-jerinj@marvell.com> <4742743.31r3eYUQgx@thomas> In-Reply-To: From: =?UTF-8?Q?Stanis=C5=82aw_Kardach?= Date: Wed, 8 Jun 2022 20:30:42 +0200 Message-ID: Subject: Re: [dpdk-dev] [PATCH v1] build: ccache support for cross build To: Jerin Jacob Cc: Thomas Monjalon , Bruce Richardson , Jerin Jacob , dpdk-dev , Ruifeng Wang , Jan Viktorin , David Christensen , Konstantin Ananyev , David Marchand , =?UTF-8?Q?Juraj_Linke=C5=A1?= , fengchengwen Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Jun 8, 2022 at 7:17 PM Jerin Jacob wrote: > > On Wed, Jun 8, 2022 at 2:00 PM Thomas Monjalon wrote: > > > > 08/06/2022 10:22, Jerin Jacob: > > > On Thu, Jun 2, 2022 at 5:30 PM Jerin Jacob wrote: > > > > > > > > On Thu, Jun 2, 2022 at 4:25 PM Thomas Monjalon wrote: > > > > > > > > > > 02/06/2022 11:43, Jerin Jacob: > > > > > > On Thu, Jun 2, 2022 at 3:11 PM Bruce Richardson > > > > > > wrote: > > > > > > > > > > > > > > On Thu, Jun 02, 2022 at 02:53:55PM +0530, jerinj@marvell.com wrote: > > > > > > > > From: Jerin Jacob > > > > > > > > > > > > > > > > By default, ccache is not used for cross build[1]. > > > > > > > > Update all cross files to use ccache if it is available > > > > > > > > in build machine. > > > > > > > > > > > > > > > > [1] > > > > > > > > https://mesonbuild.com/Machine-files.html > > > > > > > > > > > > > > > > Signed-off-by: Jerin Jacob > > > > > > > > > > > > > > Does this still work even if ccache is not available? That's not fully > > > > > > > > > > > > Yes. > > > > > > > > > > > > > clear from the docs, but it seems to be that if an array is passed the > > > > > > > whole array is used as the command, rather than just one element of the > > > > > > > array. That would imply that cross-builds now require ccache. Is that > > > > > > > acceptable? > > > > > > > > > > > > I have removed ccache from the build machine still it works. > > > > > > > > > > I don't understand why it works without ccache. > > > > > > > > Meson is detecting valid compiler prefix. ccache is one of them. > > > > > > > > See > > > > https://github.com/fabio-porcedda/meson/commit/44db495f5ece43645ca3994dc95895c76a828530 > > > > https://github.com/mesonbuild/meson/issues/1392 > > > > > > I hope there are no other review comments to fix it for this patch. > > > Since it is improving the build time for cross-build. If there is no > > > objection to this patch, Please merge it. > > > > I've tested it now and I see a big blocker. > > This patch is breaking the use of devtools/test-meson-builds.sh > > so I cannot merge it as-is, sorry. > > I assume you are referring to fixing the DPDK_TARGET update due to the > cross-file update. > If so, it is fixed in v2 at > http://patches.dpdk.org/project/dpdk/patch/20220608171304.945454-1-jerinj@marvell.com/ I've just tested it on a clean Ubuntu 20.04 docker with only RISC-V toolchain, no ccache and indeed compilation works. Both directly with meson and via test-meson-builds.sh. Seems like ccache is parsed in special way by meson as using any other unknown command just fails meson configuration. Also setting CC/CXX env variable makes meson bail (even if I use the cross-file value), so I'm not sure if there is a better way to do it. Acked-by: Stanislaw Kardach