From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 20 Nov 2026 09:22:19 +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 1xUJsw-001O7u-23 for lore@lore.pengutronix.de; Fri, 20 Nov 2026 09:22:19 +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 1xUJsw-0006Jn-9p; Fri, 20 Nov 2026 09:22:18 +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 1xUJsk-0006Cg-Q4 for ptxdist@pengutronix.de; Fri, 20 Nov 2026 09:22:09 +0100 Received: from mail.thorsis.com (mail.thorsis.com [IPv6:2003:a:e28:26e4::10]) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPS id 54C86202052 for ; Fri, 20 Nov 2026 09:22:06 +0100 (CET) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1795162926; 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:dkim-signature; bh=1TJD5W4ynTLaatBFBzoHOKWQP9gcSfPTt5FNHBBt0H0=; b=bAUGgYRSXsQROXEWv/Vfi/zjnj/ZCvZxUCTEElL4iBGHe0mcS2azcPCMpowRHhgqeiMesr 724gvCoszacXMS+pkh0feThkBH2hLcxnH1pDEvwu53eS0W7TlROnxcXDGXVyoO7iKmPGCQ 0KSfAjiH4RPNvUfW03lCAYgVnW8VcpmiUgggaMO0wUigtCMUyn59+YSaQ7fUepAYxl27+v v9JdfGTTWlhXPiwQQXXlmFJ8W9zb0nbuOvvnVae8zcQ0v/A29EgqY5M3v7tvs1LmP6RE1B mOzHvKxqxVev+7cacSj+kV8smkqydre8uo5EI9+5/RXIawK9uHl8DdQZ4rKCgw== ARC-Seal: i=1; s=20260414; d=pengutronix.de; t=1795162926; a=rsa-sha256; cv=none; b=b6VK6f+l0KLxDi+YlW6WF2UT1N9UPA+cmlwpU36Uyrv2/O73FFZPIOWS4UQmchrrgWlsQf qOhtoRkf4NHnIM1444Ixwpvj3La/c2vX8Nl9t+uKRwCsThzT+5TujQenOIwiSRXrhSzJPz sjco995kJDBGyDUDXZF8kIppG71047XnPjKP1ZIacOMN0rzglqwUtkOz3ASoMPO+gTKH1x bcpnwl4vSKJLbttnO9wm4mZWHO8g+yoD17nRGxabywntGHqaKj1Fh1z8Sc/TjKc1zUGkD8 Yd1PSZZnh+YjBDvLXQwHrmzeO1D3caRPFTNjLP7iwrbEHL8lI806SLvd1Zj+Dg== ARC-Authentication-Results: i=1; mx1.white.stw.pengutronix.de; dkim=pass header.d=thorsis.com header.s=dkim header.b=gEhItN7t; spf=pass (mx1.white.stw.pengutronix.de: domain of ada@thorsis.com designates 2003:a:e28:26e4::10 as permitted sender) smtp.mailfrom=ada@thorsis.com; dmarc=pass (policy=quarantine) header.from=thorsis.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3922B1483D36; Fri, 20 Nov 2026 09:22:14 +0100 (CET) Date: Fri, 20 Nov 2026 09:22:00 +0100 To: Rug Ros Message-ID: <20261120-enlarged-treachery-fa0eb139821a@thorsis.com> Mail-Followup-To: Rug Ros , ptxdist@pengutronix.de 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> User-Agent: Mutt/2.2.13 (2024-03-09) X-Last-TLS-Session-Version: TLSv1.3 X-Spamd-Result: default: False [-4.00 / 15.00]; BAYES_HAM(-3.00)[99.99%]; DMARC_POLICY_ALLOW(-0.50)[thorsis.com,quarantine]; R_DKIM_ALLOW(-0.20)[thorsis.com:s=dkim]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RECEIVED_HELO_LOCALHOST(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[thorsis.com:+]; RCVD_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM(-0.00)[-1.000]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE]; ARC_SIGNED(0.00)[pengutronix.de:s=20260414:i=1] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 54C86202052 X-Rspamd-Server: mx1 X-Stat-Signature: dq4w7kcxa6fga34ms4nfku7reu4nuyck 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.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE 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: , From: Alexander Dahl via ptxdist Reply-To: ptxdist@pengutronix.de Cc: Alexander Dahl , 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 Hello, Am Fri, Nov 20, 2026 at 08:33:07AM +0100 schrieb Rug Ros: > Hello, > > n order to make some changes to a device driver, I sourced the kernel via > an lndir:// URL. The kernel compilation itself succeeds, but the > kernel.compile stage subsequently fails with the following error: When developing in out-of-tree projects I usually do it with `ptxdist local-src` and for the kernel this would be for example: ptxdist clean kernel ptxdist local-src kernel ~/src/linux/vanilla ptxdist oldconfig kernel Works fine for me with kernel and other packages. This command is documented only briefly with `ptxdist help` and somewhat more extensive in section "6.1 Using an Externel Kernel Source Tree" in documentation [1]. Not sure, but I guess you tried something else? Greets Alex [1] https://ptxdist.org/doc/daily_work_section.html#using-an-external-kernel-source-tree > > 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. > > Best regards > > Ruggero > 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 >