All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64
@ 2026-09-28 15:22 Thibaut Collet
  2026-09-28 17:41 ` Vincent Jardin via buildroot
  2026-09-28 21:27 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Thibaut Collet @ 2026-09-28 15:22 UTC (permalink / raw)
  To: buildroot; +Cc: Thibaut Collet

lldpd bundles some uapi linux files for old distributions, especially
the types.h one.

Since kernel commit d4bf9e08d412 ("arm64: uapi: Use __u128 instead of
__uint128_t in UAPI headers"), the type __u128 is used by sigcontext.h.
This type is defined in types.h, but the old version bundled by lldpd
does not provide it. This lack leads to the following compilation error:

  In file included from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/bits/sigcontext.h:30,
                   from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/signal.h:301,
                   from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/sys/param.h:28,
                   from privsep_io.c:5:
  ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/asm/sigcontext.h:81:9: error: unknown type name '__u128'; did you mean '__u32'?
     81 |         __u128 vregs[32];
        |         ^~~~~~
        |         __u32

As Buildroot is not an old distribution and always provides the uapi
linux files, the lldpd ones are removed at the post patch step to have
a consistent set of uapi include files.

Signed-off-by: Thibaut Collet <thbt.cllt@gmail.com>
---
 package/lldpd/lldpd.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk
index f0cbc7e436..b6811ce3a8 100644
--- a/package/lldpd/lldpd.mk
+++ b/package/lldpd/lldpd.mk
@@ -61,6 +61,11 @@ else
 LLDPD_CONF_OPTS += --without-readline
 endif
 
+define LLDPD_DROP_UAPI_FILES
+	rm -rf $(@D)/include/linux
+endef
+LLDPD_POST_PATCH_HOOKS += LLDPD_DROP_UAPI_FILES
+
 define LLDPD_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/lldpd/S60lldpd \
 		$(TARGET_DIR)/etc/init.d/S60lldpd
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64
  2026-09-28 15:22 [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64 Thibaut Collet
@ 2026-09-28 17:41 ` Vincent Jardin via buildroot
  2026-09-28 21:27 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 5+ messages in thread
From: Vincent Jardin via buildroot @ 2026-09-28 17:41 UTC (permalink / raw)
  To: Thibaut Collet; +Cc: buildroot

Hi Thibaut,

> +define LLDPD_DROP_UAPI_FILES
> +	rm -rf $(@D)/include/linux
> +endef
> +LLDPD_POST_PATCH_HOOKS += LLDPD_DROP_UAPI_FILES

LGTM so it'll support the current package versions. However,
could the lldpd's build framework be updated too with a mean
to avoid such patch ?

Reviewed-by: Vincent Jardin <vjardin@free.fr>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64
  2026-09-28 15:22 [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64 Thibaut Collet
  2026-09-28 17:41 ` Vincent Jardin via buildroot
@ 2026-09-28 21:27 ` Thomas Petazzoni via buildroot
  2026-09-29  8:02   ` Thibaut Collet
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-28 21:27 UTC (permalink / raw)
  To: Thibaut Collet; +Cc: buildroot

Hello Thibault,

On Mon, Sep 28, 2026 at 05:22:18PM +0200, Thibaut Collet wrote:
> lldpd bundles some uapi linux files for old distributions, especially
> the types.h one.
> 
> Since kernel commit d4bf9e08d412 ("arm64: uapi: Use __u128 instead of
> __uint128_t in UAPI headers"), the type __u128 is used by sigcontext.h.
> This type is defined in types.h, but the old version bundled by lldpd
> does not provide it. This lack leads to the following compilation error:
> 
>   In file included from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/bits/sigcontext.h:30,
>                    from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/signal.h:301,
>                    from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/sys/param.h:28,
>                    from privsep_io.c:5:
>   ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/asm/sigcontext.h:81:9: error: unknown type name '__u128'; did you mean '__u32'?
>      81 |         __u128 vregs[32];
>         |         ^~~~~~
>         |         __u32
> 
> As Buildroot is not an old distribution and always provides the uapi
> linux files, the lldpd ones are removed at the post patch step to have
> a consistent set of uapi include files.
> 
> Signed-off-by: Thibaut Collet <thbt.cllt@gmail.com>

Thanks for the patch!

However, when you say "Buildroot is not an old distribution and always
provides the uapi linux files": we do allow building with fairly old
kernels. So which version of the kernel header does lldpd now requires
after your change? I'm interested to understand what is the chance of
this patch breaking some other users that are running old kernels.

Thanks for your feedback!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64
  2026-09-28 21:27 ` Thomas Petazzoni via buildroot
@ 2026-09-29  8:02   ` Thibaut Collet
  2026-09-29 17:05     ` Vincent Jardin via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Thibaut Collet @ 2026-09-29  8:02 UTC (permalink / raw)
  To: Thomas Petazzoni, vjardin@free.fr; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 3948 bytes --]

Hi Thomas and Vincent,

Thanks for your feedbacks.

Le lun. 28 sept. 2026 à 23:27, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> a écrit :

> Hello Thibault,
>
> On Mon, Sep 28, 2026 at 05:22:18PM +0200, Thibaut Collet wrote:
> > lldpd bundles some uapi linux files for old distributions, especially
> > the types.h one.
> >
> > Since kernel commit d4bf9e08d412 ("arm64: uapi: Use __u128 instead of
> > __uint128_t in UAPI headers"), the type __u128 is used by sigcontext.h.
> > This type is defined in types.h, but the old version bundled by lldpd
> > does not provide it. This lack leads to the following compilation error:
> >
> >   In file included from
> ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/bits/sigcontext.h:30,
> >                    from
> ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/signal.h:301,
> >                    from
> ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/sys/param.h:28,
> >                    from privsep_io.c:5:
> >
>  ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/asm/sigcontext.h:81:9:
> error: unknown type name '__u128'; did you mean '__u32'?
> >      81 |         __u128 vregs[32];
> >         |         ^~~~~~
> >         |         __u32
> >
> > As Buildroot is not an old distribution and always provides the uapi
> > linux files, the lldpd ones are removed at the post patch step to have
> > a consistent set of uapi include files.
> >
> > Signed-off-by: Thibaut Collet <thbt.cllt@gmail.com>
>
> Thanks for the patch!
>
> However, when you say "Buildroot is not an old distribution and always
> provides the uapi linux files": we do allow building with fairly old
> kernels. So which version of the kernel header does lldpd now requires
> after your change? I'm interested to understand what is the chance of
> this patch breaking some other users that are running old kernels.
>
> Thanks for your feedback!
>

I have done some archeology on lldpd project.
- The linux include has been added to fix outdated kernel header (version
3.6.9) on some distributions, see commit
https://github.com/lldpd/lldpd/commit/2516cfb1d6d474d41cd7effa8d2372fb44939649.
The solution is similar as the one of iproute2
- The header files have been moved to version 4.19 later (see commit
https://github.com/lldpd/lldpd/commit/a192a2e91f8109bd56519563a41bb72ce9cf9b36
)
- These included files create a compilation issue with FreeBSD14 (see
https://github.com/lldpd/lldpd/pull/503/) and remove (see commt
https://github.com/lldpd/lldpd/commit/4da5d52856e150bbc4c3266780dd73d39dfb1898
)
- This removal causes some issue with other distribution (like Debian8) and
some files have been re-added (see commit
https://github.com/lldpd/lldpd/commit/2f2ae98ded0c20b049d385e4fa702365eb444ad8
)

So removing the uapi include files of lldpd to use the kernel ones is the
best choice for kernel greater or equal to 4.19 to avoid using outdated
include files regarding the kernel version.
Gating the LLDPD_POST_PATCH_HOOKS with 'ifeq
($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19),y)' will do the job.
Do you agree with this solution ?

Regarding Vincent question:

> However, could the lldpd's build framework be updated too with a mean to
avoid such patch ?

As spotted in the commit log of lldpd use the right header files to be
compliant with any kernel version and distribution is an endless loop. For
buildroot rather than relying on modifications inside the lldpd project it
can be simpler and faster to just remove them. NB for iproute2 that also
provides some uapi include files the compilation is OK for kernel 7.3 with
aarch64 as the provided types.h is more recent and __u128 is defined.

Best regards

Thibaut

>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>

[-- Attachment #1.2: Type: text/html, Size: 5423 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64
  2026-09-29  8:02   ` Thibaut Collet
@ 2026-09-29 17:05     ` Vincent Jardin via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent Jardin via buildroot @ 2026-09-29 17:05 UTC (permalink / raw)
  To: Thibaut Collet; +Cc: Thomas Petazzoni, buildroot

Hi Thibaut,

> So removing the uapi include files of lldpd to use the kernel ones is the
> best choice for kernel greater or equal to 4.19 to avoid using outdated
> include files regarding the kernel version.
> Gating the LLDPD_POST_PATCH_HOOKS with 'ifeq
> ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19),y)' will do the job.
> Do you agree with this solution ?

It seems to be a better approach for me.

> 
> Regarding Vincent question:
> 
> > However, could the lldpd's build framework be updated too with a mean to
> avoid such patch ?
> 
> As spotted in the commit log of lldpd use the right header files to be
> compliant with any kernel version and distribution is an endless loop. For
> buildroot rather than relying on modifications inside the lldpd project it
> can be simpler and faster to just remove them. NB for iproute2 that also
> provides some uapi include files the compilation is OK for kernel 7.3 with
> aarch64 as the provided types.h is more recent and __u128 is defined.

ok, right, same issue.

thanks Thibaut,
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-29 17:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 15:22 [Buildroot] [PATCH] package/lldpd: fix compilation issue with kernel 7.3 on aarch64 Thibaut Collet
2026-09-28 17:41 ` Vincent Jardin via buildroot
2026-09-28 21:27 ` Thomas Petazzoni via buildroot
2026-09-29  8:02   ` Thibaut Collet
2026-09-29 17:05     ` Vincent Jardin via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.