* Re: [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool
[not found] <20260909071155.1234922-1-maxime.chevallier@bootlin.com>
@ 2026-09-10 15:59 ` Jakub Kicinski
2026-09-10 16:51 ` Maxime Chevallier
2026-09-10 17:10 ` Bobby Eshleman
1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2026-09-10 15:59 UTC (permalink / raw)
To: Maxime Chevallier (Netdev Foundation)
Cc: Andrew Lunn, davem, Eric Dumazet, Paolo Abeni, Bobby Eshleman,
Donald Hunter, Simon Horman, Shuah Khan, matttbe,
Stanislav Fomichev, netdev, linux-kernel, thomas.petazzoni,
linux-kselftest
On Wed, 9 Sep 2026 09:11:54 +0200 Maxime Chevallier (Netdev
Foundation) wrote:
> thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org
> Subject: [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool
Hi Maxime, thanks for the quick fix. Looks like this did not hit
netdev, unfortunately. It reached lore but via a different ML,
and our patchwork only trails netdev itself. Please repost.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool
2026-09-10 15:59 ` [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool Jakub Kicinski
@ 2026-09-10 16:51 ` Maxime Chevallier
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Chevallier @ 2026-09-10 16:51 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Andrew Lunn, davem, Eric Dumazet, Paolo Abeni, Bobby Eshleman,
Donald Hunter, Simon Horman, Shuah Khan, matttbe,
Stanislav Fomichev, netdev, linux-kernel, thomas.petazzoni,
linux-kselftest
Hi,
On 9/10/26 17:59, Jakub Kicinski wrote:
> On Wed, 9 Sep 2026 09:11:54 +0200 Maxime Chevallier (Netdev
> Foundation) wrote:
>> thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org
>> Subject: [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool
>
> Hi Maxime, thanks for the quick fix. Looks like this did not hit
> netdev, unfortunately. It reached lore but via a different ML,
> and our patchwork only trails netdev itself. Please repost.
Dammit, seems like most of the patches I sent yesterday failed in a
similar fashion :(
I'll resend right-away, sorry about that,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool
[not found] <20260909071155.1234922-1-maxime.chevallier@bootlin.com>
2026-09-10 15:59 ` [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool Jakub Kicinski
@ 2026-09-10 17:10 ` Bobby Eshleman
2026-09-10 21:12 ` Maxime Chevallier
1 sibling, 1 reply; 5+ messages in thread
From: Bobby Eshleman @ 2026-09-10 17:10 UTC (permalink / raw)
To: Maxime Chevallier (Netdev Foundation)
Cc: Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Donald Hunter, Simon Horman, Shuah Khan, matttbe,
Stanislav Fomichev, netdev, linux-kernel, thomas.petazzoni,
linux-kselftest
On Wed, Sep 09, 2026 at 09:11:54AM +0200, Maxime Chevallier (Netdev Foundation) wrote:
> After the blamed commit, running a out-of-tree build for ynltool fails :
>
> # make -C tools/net/ynl/ynltool O=/tmp/o1
> make: Entering directory 'tools/net/ynl/ynltool'
> make: *** No rule to make target '/tmp/o1/json_writer.o', needed by '/tmp/o1/ynltool'. Stop.
>
> ynltool's Makefile correctly accounts for $(OUTPUT) to get the list of
> object files to generate :
>
> OBJS := $(patsubst %.c,$(OUTPUT)%.o,$(SRCS))
>
> but it never actually set $(OUTPUT) before the blamed commit, meaning
> that out-of-tree buils of ynltool were always actually in-tree.
>
> Now, the O= parameter is correctly accounted for, and the %o: %c rule fails.
>
> Let's update the %o: %c rule to also use $(OUTPUT).
>
> Reported-by: Bobby Eshleman <bobbyeshleman@gmail.com>
> Closes: https://lore.kernel.org/all/aqCyWQxqKDuQnZYR@devvm29614.prn0.facebook.com/
> Fixes: 917f713b4ec4 ("tools: ynl: Allow cross-compiling ynl and associated tools")
> Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com>
> ---
> Targetting net-next, as the blamed commit lives there.
>
> tools/net/ynl/ynltool/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/net/ynl/ynltool/Makefile b/tools/net/ynl/ynltool/Makefile
> index b8c67cdb4fdf..1053e7606c86 100644
> --- a/tools/net/ynl/ynltool/Makefile
> +++ b/tools/net/ynl/ynltool/Makefile
> @@ -31,7 +31,7 @@ $(YNLTOOL): ../libynl.a $(OBJS)
> $(Q)echo -e "\tLINK $@"
> $(Q)$(CC) $(CFLAGS) -o $@ $(OBJS) ../libynl.a -lm
>
> -%.o: %.c ../libynl.a
> +$(OUTPUT)%.o: %.c ../libynl.a
> $(Q)echo -e "\tCC $@"
> $(Q)$(COMPILE.c) -MMD -c -o $@ $<
>
> --
> 2.55.0
>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool
2026-09-10 17:10 ` Bobby Eshleman
@ 2026-09-10 21:12 ` Maxime Chevallier
2026-09-10 21:16 ` Bobby Eshleman
0 siblings, 1 reply; 5+ messages in thread
From: Maxime Chevallier @ 2026-09-10 21:12 UTC (permalink / raw)
To: Bobby Eshleman
Cc: Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Donald Hunter, Simon Horman, Shuah Khan, matttbe,
Stanislav Fomichev, netdev, linux-kernel, thomas.petazzoni,
linux-kselftest
Hi Bobby,
On 9/10/26 19:10, Bobby Eshleman wrote:
> On Wed, Sep 09, 2026 at 09:11:54AM +0200, Maxime Chevallier (Netdev Foundation) wrote:
>> After the blamed commit, running a out-of-tree build for ynltool fails :
>>
>> # make -C tools/net/ynl/ynltool O=/tmp/o1
>> make: Entering directory 'tools/net/ynl/ynltool'
>> make: *** No rule to make target '/tmp/o1/json_writer.o', needed by '/tmp/o1/ynltool'. Stop.
>>
>> ynltool's Makefile correctly accounts for $(OUTPUT) to get the list of
>> object files to generate :
>>
>> OBJS := $(patsubst %.c,$(OUTPUT)%.o,$(SRCS))
>>
>> but it never actually set $(OUTPUT) before the blamed commit, meaning
>> that out-of-tree buils of ynltool were always actually in-tree.
>>
>> Now, the O= parameter is correctly accounted for, and the %o: %c rule fails.
>>
>> Let's update the %o: %c rule to also use $(OUTPUT).
>>
>> Reported-by: Bobby Eshleman <bobbyeshleman@gmail.com>
>> Closes: https://lore.kernel.org/all/aqCyWQxqKDuQnZYR@devvm29614.prn0.facebook.com/
>> Fixes: 917f713b4ec4 ("tools: ynl: Allow cross-compiling ynl and associated tools")
>> Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com>
[...]
> Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Thanks :)
Nicolai noted that there's another improvement to be made, as we don't
account for modifications made to .h files. The diff would be :
-include $(wildcard *.d)
+include $(wildcard $(OUTPUT)*.d)
See [1].
May I keep your review tag if I add the above diff in v2 ?
Thanks,
Maxime
[1] : https://lore.kernel.org/all/c44d371714839566a02cd9c944c7e177@tipi-net.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool
2026-09-10 21:12 ` Maxime Chevallier
@ 2026-09-10 21:16 ` Bobby Eshleman
0 siblings, 0 replies; 5+ messages in thread
From: Bobby Eshleman @ 2026-09-10 21:16 UTC (permalink / raw)
To: Maxime Chevallier
Cc: Andrew Lunn, davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Donald Hunter, Simon Horman, Shuah Khan, matttbe,
Stanislav Fomichev, netdev, linux-kernel, thomas.petazzoni,
linux-kselftest
On Thu, Sep 10, 2026 at 11:12:24PM +0200, Maxime Chevallier wrote:
> Hi Bobby,
>
> On 9/10/26 19:10, Bobby Eshleman wrote:
> > On Wed, Sep 09, 2026 at 09:11:54AM +0200, Maxime Chevallier (Netdev Foundation) wrote:
> >> After the blamed commit, running a out-of-tree build for ynltool fails :
> >>
> >> # make -C tools/net/ynl/ynltool O=/tmp/o1
> >> make: Entering directory 'tools/net/ynl/ynltool'
> >> make: *** No rule to make target '/tmp/o1/json_writer.o', needed by '/tmp/o1/ynltool'. Stop.
> >>
> >> ynltool's Makefile correctly accounts for $(OUTPUT) to get the list of
> >> object files to generate :
> >>
> >> OBJS := $(patsubst %.c,$(OUTPUT)%.o,$(SRCS))
> >>
> >> but it never actually set $(OUTPUT) before the blamed commit, meaning
> >> that out-of-tree buils of ynltool were always actually in-tree.
> >>
> >> Now, the O= parameter is correctly accounted for, and the %o: %c rule fails.
> >>
> >> Let's update the %o: %c rule to also use $(OUTPUT).
> >>
> >> Reported-by: Bobby Eshleman <bobbyeshleman@gmail.com>
> >> Closes: https://lore.kernel.org/all/aqCyWQxqKDuQnZYR@devvm29614.prn0.facebook.com/
> >> Fixes: 917f713b4ec4 ("tools: ynl: Allow cross-compiling ynl and associated tools")
> >> Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com>
>
> [...]
>
> > Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
>
> Thanks :)
>
> Nicolai noted that there's another improvement to be made, as we don't
> account for modifications made to .h files. The diff would be :
>
> -include $(wildcard *.d)
> +include $(wildcard $(OUTPUT)*.d)
>
> See [1].
>
> May I keep your review tag if I add the above diff in v2 ?
>
> Thanks,
>
> Maxime
Yes, np, feel free to carry it forward!
Best,
Bobby
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-10 21:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260909071155.1234922-1-maxime.chevallier@bootlin.com>
2026-09-10 15:59 ` [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool Jakub Kicinski
2026-09-10 16:51 ` Maxime Chevallier
2026-09-10 17:10 ` Bobby Eshleman
2026-09-10 21:12 ` Maxime Chevallier
2026-09-10 21:16 ` Bobby Eshleman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox