From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 20 Nov 2026 08:48:57 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xUJMe-001NZB-1D for lore@lore.pengutronix.de; Fri, 20 Nov 2026 08:48:57 +0100 Received: from [127.0.0.1] (helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1xUJMe-0002NO-0w; Fri, 20 Nov 2026 08:48:56 +0100 Received: from mx1.white.stw.pengutronix.de ([185.203.200.13]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1xUJMU-0002NG-5w for ptxdist@pengutronix.de; Fri, 20 Nov 2026 08:48:47 +0100 Received: from ptx.office.stw.pengutronix.de (ptx.office.stw.pengutronix.de [IPv6:2a0a:edc0:0:900:1d::109]) (Authenticated sender: relay-from-ptx.office.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 15CC9200F2F; Fri, 20 Nov 2026 08:48:46 +0100 (CET) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1795160926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zo9qnNwWXh1sthbk/gWpti8nWno6xcKhdBQqLI67WUM=; b=PDMcJvqLTTJx2lmddf6Ty9CTuadgyYn50bIg/lTEsqVh+oDbgwDmfNbU1ezG7uXR0bDtl3 aHy6F81W+SNAdICCnkDeyyZxFrjfWlKek2JJpCccnHKse/a6WWXZTeEnXUxUjDDovjWR6v MY97nFH0v26xU5EE+2LRHRzvHnm/Wkx7CsQkFWBOnxdVBQa5tqswytGZyH0w2mQhbocw/y TsZ1TBP1f84CsoMXV1uxGhjAI2IJY9KOr8VNJER674Wr1pavAT89sRXO8Q/2viLml2L1/P 0h61gr5IrLk6mNKk2WhYvdcTc4BouVVRR8RgNUJ64ZeyXN4hVA9tUphZxUASCg== ARC-Seal: i=1; s=20260414; d=pengutronix.de; t=1795160926; a=rsa-sha256; cv=none; b=Ir0KHlDvPVG5IYe7e4z6Kns/ogsh44QPglbwl5hqVNvK3p/264jV3XEl0WW3CpHNWyfz/5 ErpV3SmdPoAQkF6ME5jmg6l24eWudtpCpeLF8ziMV7yBuJETygKf9gcxhNBe467E0sLtp/ 1KbHzAev+wprD1KJT6fnDF0BVgVd1jeoPWLVYL38Ab6x+kjBp+joq5mvJ8tIz6RRg2V9Ui G7x8AtDUV14SJ02S3EM1e11g/MaEAgZ2xwNbvJr+WaD6UDE+DZAumvARqhDP5xeiLXT/cV 0WtOBEplHz9q/jhFXMOGk9glEZ9f2opJJOMQJbTMmN0yANsXulGPtC5jsjKSww== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=relay-from-ptx.office.stw.pengutronix.de smtp.mailfrom=mol@pengutronix.de Received: by ptx.office.stw.pengutronix.de (Postfix, from userid 1014) id EDA0B1BF930; Fri, 20 Nov 2026 08:48:45 +0100 (CET) Date: Fri, 20 Nov 2026 08:48:45 +0100 From: Michael Olbrich To: Rug Ros Message-ID: References: <20261120083307.3f89ec27@laptop-RR> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261120083307.3f89ec27@laptop-RR> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] Possible bug while compiling the kernel sourced via lndir:// X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi, On Fri, Nov 20, 2026 at 08:33:07AM +0100, Rug Ros wrote: > n order to make some changes to a device driver, I sourced the kernel via > an lndir:// URL. Why would you need lndir:// for the kernel? The kernel is built out-off-tree and should not touch the source tree at all, except to write the compile_commands.json... > The kernel compilation itself succeeds, but the > kernel.compile stage subsequently fails with the following error: > > make: Leaving directory '/home/ruggero/phytec/i.MX6Linux/i.MX6Linux.newKernel/platform-phyFLEX-i.MX6/build-target/linux-6.12.96' > sed: can't read /home/ruggero/phytec/i.MX6Linux/i.MX6Linux/platform-phyFLEX-i.MX6/build-target/linux-6.12.96/compile_commands.json: > No such file or directory > make: ***[/home/ruggero/phytec/i.MX6Linux/i.MX6Linux/rules/kernel.make:276: > /home/ruggero/phytec/i.MX6Linux/i.MX6Linux/platform-phyFLEX-i.MX6/state/kernel.compile] > Error 2 > > > I traced the issue to ptxd_make_world_compile_commands_filter() in > ptxd_make_world_compile_commands.sh: > > In this function the file compile_commands.json is modified using sed, and > the source is handled properly (variable ${src_cmds}). > > If sed succeeds, ptxd_make_world_compile_commands_cleanup() is called. > > However, ptxd_make_world_compile_commands_cleanup() runs sed on > "${pkg_dir}/compile_commands.json". While that path is valid for regular > builds, it points to the wrong location when using an lndir:// URL. > > As a workaround, I passed the resolved path as a parameter to > ptxd_make_world_compile_commands_cleanup() and updated its second call > site in ptxd_make_world_compile.sh accordingly. > > I have attached a patch with my changes for reference. ... but the change below is correct anyways. Can you send a proper patch[1] please? Regards, Michael > diff -Naur /mnt/tmp/usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile.sh /usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile.sh > --- /mnt/tmp/usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile.sh 2026-06-27 13:07:38.000000000 +0000 > +++ /usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile.sh 2026-11-19 15:37:54.949219877 +0000 > @@ -164,7 +164,7 @@ > print "\n]" > }' > } > "${pkg_dir}/compile_commands.json" && > - ptxd_make_world_compile_commands_cleanup > + ptxd_make_world_compile_commands_cleanup "${pkg_dir}/compile_commands.json" > fi > } > export -f ptxd_make_world_compile_finish > diff -Naur /mnt/tmp/usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile_commands.sh /usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile_commands.sh > --- /mnt/tmp/usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile_commands.sh 2026-06-27 13:07:38.000000000 +0000 > +++ /usr/local/lib/ptxdist-2026.07.0/scripts/lib/ptxd_make_world_compile_commands.sh 2026-11-19 15:38:31.841776180 +0000 > @@ -12,7 +12,7 @@ > ptxd_make_world_compile_commands_cleanup() { > sed -i \ > -e 's/ *-fno-diagnostics-show-caret//g' \ > - "${pkg_dir}/compile_commands.json" > + "${1}" > } > export -f ptxd_make_world_compile_commands_cleanup > > @@ -44,7 +44,7 @@ > -e "s#\(\"command\": \" *[^ ]*\(gcc\|clang\) \)#\1 ${PTXDIST_CROSS_CPPFLAGS} ${pkg_cflags} #" \ > -e "s#\(\"command\": \" *[^ ]*++ \)#\1 ${PTXDIST_CROSS_CPPFLAGS} ${pkg_cxxflags} #" \ > "${src_cmds}" > "${dst_cmds}" && > - ptxd_make_world_compile_commands_cleanup > + ptxd_make_world_compile_commands_cleanup "${src_cmds}" > } > export -f ptxd_make_world_compile_commands_filter > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |