Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1238720imu; Sat, 17 Nov 2018 20:18:21 -0800 (PST) X-Google-Smtp-Source: AJdET5faIKRcaUbcxeZkMSJScfwRNyGuUCDm6X1k6v8shrjQzv/vN5W/lkOCKli3D7vDqqD07kkb X-Received: by 2002:a63:42c1:: with SMTP id p184mr15508630pga.202.1542514701717; Sat, 17 Nov 2018 20:18:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542514701; cv=none; d=google.com; s=arc-20160816; b=Up/XMtqQ+g2DvNLdlNwcif0fwyTa1QXwGIsmB2XSkGqUdUUKTmy8hVbshewbcfJOo2 qyjlpU8JPx726Ux0jPNPcKFNtDmaN3nfOcCip7aCTcXMP9cZeISmfSmOWiFBp9nxdH8G ZeCvgMG1Ze+KxtOMgsSRaS+wGBv4V3a+0a8Km9+z54F1RFDlT90/y3cOC4YtjbFBQGwO RMJOzQBSGekUQcqt9GgjJB4Cp5Ks3aXusvn2fHnvXC/BHqlT5rcMIFi0LOVM3LiAkzfL aFpP/YHsIsDy8t3BWe+mVeQuoxs33KMwKiaVcB9W1MsdjpOhICfkpb8Xz6rSULWyuFh+ 3eug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=k5kLdnkAExx7TCzc2TBOgiAEVZLmpQxrMUA5tGysWjs=; b=D21+tRGz7Jov/shE80yilBl9UrbKdpjmlo1fBqS/CC6jFWDiycY/6ism11Td2qTcNP PnsBhmWYfbAp+mwL/R1xzhYvuD0NMIlgCy8VeYGYmezWqmZUaYvqRIFMH6SoIU5SYsHO BPUTqAcJuNyy8jJ/bKWiexkxBmTdzZLTz5YvvrKJg1cXNd8gbZ+e/TA4tpMVflTzjKUW XtynNkFBbulhAFnAzWDiICgUm8C4sMahJYeZtImdx5lpDOhN4hRoKuABVSTMlTTGeAbo PlSR3mdXXInOl8pxUR7mNjsV+Q8xGS+ckldvxyl/SKdo7BO3gXftg0IEnzQbaC9jM/aT IxBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JAAqGwbW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si2079097plr.127.2018.11.17.20.17.37; Sat, 17 Nov 2018 20:18:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JAAqGwbW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726180AbeKROez (ORCPT + 99 others); Sun, 18 Nov 2018 09:34:55 -0500 Received: from conssluserg-05.nifty.com ([210.131.2.90]:47513 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeKROez (ORCPT ); Sun, 18 Nov 2018 09:34:55 -0500 Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) (authenticated) by conssluserg-05.nifty.com with ESMTP id wAI4FqbY004746; Sun, 18 Nov 2018 13:15:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com wAI4FqbY004746 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542514553; bh=k5kLdnkAExx7TCzc2TBOgiAEVZLmpQxrMUA5tGysWjs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JAAqGwbWZzWL05yIu4PaGzfCJPbvbfo7lVIs+v3DegKApXIUpaKObgixce4+cIUgl FH5VibN0Ii4CIXlPQb8SyuYCfIUSA8xLmtlvlOWHB8ueMnK4dwLPtnYEIV7S4SYfv+ DBfJbZXfb66QVB949+GWgy4JhH20R0kmA50/JR3sEPRt1cxUizlnhOhvT63fFebOkw 9OMamgQifiZCHD+CenXdpkjN9eDZBEf0Tv5EFiuDxoJtrSzNMNRSIMi1mlkm9Hq3Zw jwsTK3egtu+e2thzVTkpVcz89e/1CkxVtNXyIgbGzNF10BRhUu73fMMIlMeogaH8Oo 2/U5Y8SvPBefg== X-Nifty-SrcIP: [209.85.217.42] Received: by mail-vs1-f42.google.com with SMTP id g68so15940340vsd.11; Sat, 17 Nov 2018 20:15:53 -0800 (PST) X-Gm-Message-State: AGRZ1gKDXCGm9sdkC75IsQWCKIwp0I6m8564iPf9OtVDqVg3L97o2RHY ewiMsQK1qXbq2I0VJ8s2u4xvGXz1lMjj0H6ezPE= X-Received: by 2002:a67:f1d6:: with SMTP id v22mr6939888vsm.181.1542514552277; Sat, 17 Nov 2018 20:15:52 -0800 (PST) MIME-Version: 1.0 References: <1541404309-30210-1-git-send-email-yamada.masahiro@socionext.com> <17334806.ITFQqvuZkQ@avalon> In-Reply-To: <17334806.ITFQqvuZkQ@avalon> From: Masahiro Yamada Date: Sun, 18 Nov 2018 13:15:16 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used To: Laurent Pinchart Cc: Linux Kbuild mailing list , zhenzhong.duan@oracle.com, Michal Marek , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Sun, Nov 18, 2018 at 4:22 AM Laurent Pinchart wrote: > > Hi Yamada-san, > > On Monday, 5 November 2018 09:51:49 EET Masahiro Yamada wrote: > > Zhenzhong Duan reported that running 'make O=/build/kernel binrpm-pkg' > > failed with the following errors: > > > > Running 'make O=/build/kernel binrpm-pkg' failed with below two errors. > > > > Makefile:600: include/config/auto.conf: No such file or directory > > > > + cp make -C /mnt/root/kernel O=/build/kernel image_name make -f > > /mnt/root/kernel/Makefile ... > > cp: invalid option -- 'C' > > Try 'cp --help' for more information. > > > > Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only > > for out-of-tree build"), both objtree and srctree were added to > > --include-dir, and the wrong code 'make image_name' was working > > relying on that. Now, the potential issue that had previously been > > hidden just showed up. > > > > 'make image_name' recurses to the generated $(objtree)/Makefile and > > ends up with running in srctree, which is incorrect. It should be > > invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed > > in objtree. > > I (painfully) found out that a similar problem occurs with 'make bindeb-pkg'. > > After spending half a day unsuccessfully trying to debug and fix the problem I > ran across this patch. The naive approach of mimicking the solution and adding > 'MAKE="$MAKE -f $srctree/Makefile"' at the top of scripts/package/builddeb > didn't work. Reverting commit 80463f1b7bf9 fixed the problem. > > Would you be able to give it a look ? I'm afraid my limited skills related to > the kernel build system don't allow me to submit a fix :-S I fixed bindeb-pkg as well for v4.20-rc2 commit 02826a6ba301b72461c3706e1cc66d5571cd327e Author: Masahiro Yamada Date: Mon Nov 5 16:52:34 2018 +0900 kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used If you still see a problem, please let me know. -- Best Regards Masahiro Yamada