From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 20 Nov 2026 09:59:37 +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 1xUKT2-001OXK-33 for lore@lore.pengutronix.de; Fri, 20 Nov 2026 09:59:37 +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 1xUKT2-0001KQ-Ce; Fri, 20 Nov 2026 09:59:36 +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 1xUKSo-0001KI-B5 for ptxdist@pengutronix.de; Fri, 20 Nov 2026 09:59:22 +0100 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPS id F10BE20173E for ; Fri, 20 Nov 2026 09:59:21 +0100 (CET) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1795165162; 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=fAlfSyMsVwKU+Z11tV0Bg6fgeCoVP+jkTZVr/exQiCk=; b=MbXlo4szTOMRcuiLPY04sgNqUyzlABVSfGR0RRG3oRrvaTAcOSyuzfiJtNrjPD/rw4tCL8 SZ5R/VGMMXKrdmn9zKLX/oqZlQIDnm03a1wD0CekC6AY6cey0m0d0Zzx103Fnrkcu07CyP qH8L6eBOUtlgUqfdmDQZVEEM7le8bvDQqey6plaDbSMjckjGYoSXsdJ9p8CKYuzun/9ixW BhRH+ccXNRBMF6mx5c6FoKNfleca5feo6QyBuLKsZDxAPyqeKe1wnAoLBrYt1njXElcJti 6syavyqwNNiYHmtGa16Ia8pVrLOdRIhdnYa4E/26wSxLrSC80UO+aJAHpawQNQ== ARC-Seal: i=1; s=20260414; d=pengutronix.de; t=1795165162; a=rsa-sha256; cv=none; b=B6ZOUWzMz4xkSufizJvSTXB0Lb+ZQPK/UQKqU+8iPWkW1NDnh4ViB55DncSPneG62A8t2D wEUQXGOu9BUv/WfeSYiM8C9x0D+lMeMDE+JpVgmHD9sZKRwaXBTWU7U6AYXPe3guOcj2We L2sc6MtZjedhAoAPAP3IYBfMUO3RTMnIs/LjFtAFcBpQPWZ4+7vOjQjRke8TbkxzuDB5aX 73CxvltMvb9e26bfLdotdpbQHfSsO/MIN0MS6dHG88/3nUKALazPZm5zy1BNmQ27wwqUDt L+UjvkDOfTdaxUlB7/26YubUqIHd61I3D5rByIx2bS4WmlNjuhqzgpySAgVFxw== ARC-Authentication-Results: i=1; mx1.white.stw.pengutronix.de; dkim=pass header.d=gmail.com header.s=20260707 header.b=DNaRUzXF; spf=pass (mx1.white.stw.pengutronix.de: domain of rug2ros@gmail.com designates 2a00:1450:4864:20::42b as permitted sender) smtp.mailfrom=rug2ros@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-491f34b4e0fso266521f8f.2 for ; Fri, 20 Nov 2026 00:59:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795165161; x=1795769961; h=content-type:mime-version:references:in-reply-to:message-id:subject :cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=fAlfSyMsVwKU+Z11tV0Bg6fgeCoVP+jkTZVr/exQiCk=; b=0IcBaH+GDHWzCJ/DGLUhvuidm1fewMtep1RwZzMWlQK5/e94cr5ZGfiTeKcOsCLLHl 7195kSS4GLEOxHICcRczXZC14rGOgcMY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05:6000:4808:b0:4a9:760f:1843 with SMTP id ffacd0b85a97d-4abb0d51e12mr4728004f8f.27.1795165161148; Fri, 20 Nov 2026 00:59:21 -0800 (PST) Received: from laptop-RR (p200300c00f1e0300d0a573d2b372d350.dip0.t-ipconnect.de. [2003:c0:f1e:300:d0a5:73d2:b372:d350]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6b9abf15sm4025447f8f.43.2026.11.20.00.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2026 00:59:20 -0800 (PST) Date: Fri, 20 Nov 2026 09:59:18 +0100 From: Rug Ros To: Michael Olbrich Message-ID: <20261120095918.66459d0a@laptop-RR> In-Reply-To: References: <20261120083307.3f89ec27@laptop-RR> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/u_.dd0cUg9ZtfOqaeZ_j7c=" X-Spamd-Result: default: False [-3.50 / 15.00]; BAYES_HAM(-3.00)[100.00%]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4864::/56]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20260707]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; HAS_ATTACHMENT(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[ptxdist@pengutronix.de]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::42b:from]; RECEIVED_SPAMHAUS_PBL(0.00)[2003:c0:f1e:300:d0a5:73d2:b372:d350:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM(-0.00)[-1.000]; RCPT_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_SIGNED(0.00)[pengutronix.de:s=20260414:i=1] X-Rspamd-Action: no action X-Rspamd-Queue-Id: F10BE20173E X-Rspamd-Server: mx1 X-Stat-Signature: tog94mc6s4q1obmnsm679imuak9ko3pz 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=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_GMAIL_RCVD,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=no 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: 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 --MP_/u_.dd0cUg9ZtfOqaeZ_j7c= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, 20 Nov 2026 08:48:45 +0100 Michael Olbrich wrote: Hi Michael, I hope the attached file is the right format. By the way I corrected an error on my previous version: the cleanup() function must work on ${dst_cmds}, and not on src. To Alexander: I'm lazy, so I copied what I already had from a different package. The lndir:// URL makes a link to all the files in the local source, without have to worry that a clean wipe off all the changes. Good to know there is the alternative you mentioned, probably with less overhead. Best regards, Rugggero > 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 > > > > --MP_/u_.dd0cUg9ZtfOqaeZ_j7c= Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-ptxd_make_world_compile_commands-pass-compile_comman.patch >>From 643641cd4e93295a4518b474d16dc9331becdf09 Mon Sep 17 00:00:00 2001 From: ruggero Date: Fri, 20 Nov 2026 09:37:15 +0100 Subject: [PATCH] ptxd_make_world_compile_commands: pass compile_commands.json path to cleanup When building kernel sourced via lndir://, compile_commands.json is not located directly inside ${pkg_dir}. Pass the resolved file path explicitly to ptxd_make_world_compile_commands_cleanup() instead of hardcoding "${pkg_dir}/compile_commands.json". Signed-off-by: ruggero --- scripts/lib/ptxd_make_world_compile.sh | 2 +- scripts/lib/ptxd_make_world_compile_commands.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh index 739e4fb45..033c24ca8 100644 --- a/scripts/lib/ptxd_make_world_compile.sh +++ b/scripts/lib/ptxd_make_world_compile.sh @@ -164,7 +164,7 @@ ptxd_make_world_compile_finish() { 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 --git a/scripts/lib/ptxd_make_world_compile_commands.sh b/scripts/lib/ptxd_make_world_compile_commands.sh index df6baf535..b0522d52b 100644 --- a/scripts/lib/ptxd_make_world_compile_commands.sh +++ b/scripts/lib/ptxd_make_world_compile_commands.sh @@ -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 @@ ptxd_make_world_compile_commands_filter() { -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 "${dst_cmds}" } export -f ptxd_make_world_compile_commands_filter -- 2.43.0 --MP_/u_.dd0cUg9ZtfOqaeZ_j7c=--