Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/kbd: requires shared libraries if using uClibc
@ 2026-09-20 11:32 Fiona Klute via buildroot
  2026-09-20 12:14 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Klute via buildroot @ 2026-09-20 11:32 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute

Since upstream commit 7fdd8debe37ae52812b77d82e08713bd62c607f4 [1]
(included from release 2.9.0) libkbdfile unconditionally includes
dlfcn.h. uClibc provides this header only if shared library support is
enabled [2], so building kbd fails if BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
and BR2_STATIC_LIBS=y (BR2_SHARED_STATIC_LIBS=y works).

The issue has been reported upstream [3], until it is fixed disable
building kbd with uClibc and static libraries only.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/commit/?id=7fdd8debe37ae52812b77d82e08713bd62c607f4
[2] https://github.com/wbx-github/uclibc-ng/blob/v1.0.59/Makefile.in#L260
[3] https://github.com/legionus/kbd/issues/159

Fixes: https://autobuild.buildroot.org/results/872d12bf869717ae8aec9a2ed6295cf8f7e8b098/
Fixes: https://autobuild.buildroot.org/results/056b5fe4ca230989041a1ed166c1b509f8bb0908/

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
 package/kbd/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/kbd/Config.in b/package/kbd/Config.in
index 27cadf1af2..e3ed20a5d2 100644
--- a/package/kbd/Config.in
+++ b/package/kbd/Config.in
@@ -3,11 +3,13 @@ config BR2_PACKAGE_KBD
 	# Uses fork()
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # _Generic
+	depends on !BR2_STATIC_LIBS || !BR2_TOOLCHAIN_USES_UCLIBC # dlfcn.h
 	help
 	  Keytable files and keyboard utilities.
 
 	  http://kernel.org/pub/linux/utils/kbd/
 
-comment "kbd needs a toolchain w/ gcc >= 4.9"
+comment "kbd needs a toolchain w/ gcc >= 4.9, and shared libraries if using uClibc"
 	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	depends on BR2_STATIC_LIBS && BR2_TOOLCHAIN_USES_UCLIBC
-- 
2.55.0

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

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

* Re: [Buildroot] [PATCH 1/1] package/kbd: requires shared libraries if using uClibc
  2026-09-20 11:32 [Buildroot] [PATCH 1/1] package/kbd: requires shared libraries if using uClibc Fiona Klute via buildroot
@ 2026-09-20 12:14 ` Thomas Petazzoni via buildroot
  2026-09-20 13:24   ` Fiona Klute via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-20 12:14 UTC (permalink / raw)
  To: Fiona Klute; +Cc: buildroot

On Sun, Sep 20, 2026 at 01:32:31PM +0200, Fiona Klute via buildroot wrote:
> Since upstream commit 7fdd8debe37ae52812b77d82e08713bd62c607f4 [1]
> (included from release 2.9.0) libkbdfile unconditionally includes
> dlfcn.h. uClibc provides this header only if shared library support is
> enabled [2], so building kbd fails if BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
> and BR2_STATIC_LIBS=y (BR2_SHARED_STATIC_LIBS=y works).

Hm, you bring an interesting problem to the table here. So far,
whenever <dlfcn.h> was used, we simply added a !BR2_STATIC_LIBS
dependency. Just check in the tree:

$ git grep dlcfn

BR2_STATIC_LIBS=y with glibc is not possible.

BR2_STATIC_LIBS=y with uClibc indeed brings this outcome, as in this
case, we build uClibc without dynamic library support, and therefore
dlfcn.h is missing.

The interesting case is BR2_STATIC_LIBS=y with musl. We do allow this
configuration.. but in this case indeed musl will still provide
<dlfcn.h> and allow loading dynamic libraries.

I'm not sure how to handle this. However, for the time being, for the
sake of consistency, I think we should handle this <dlfcn.h> usage of
kbd like we're doing in all other packages: by adding just a
!BR2_STATIC_LIBS dependency.

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] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/kbd: requires shared libraries if using uClibc
  2026-09-20 12:14 ` Thomas Petazzoni via buildroot
@ 2026-09-20 13:24   ` Fiona Klute via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Fiona Klute via buildroot @ 2026-09-20 13:24 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Am 20.09.26 um 14:14 schrieb Thomas Petazzoni:
> On Sun, Sep 20, 2026 at 01:32:31PM +0200, Fiona Klute via buildroot wrote:
>> Since upstream commit 7fdd8debe37ae52812b77d82e08713bd62c607f4 [1]
>> (included from release 2.9.0) libkbdfile unconditionally includes
>> dlfcn.h. uClibc provides this header only if shared library support is
>> enabled [2], so building kbd fails if BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
>> and BR2_STATIC_LIBS=y (BR2_SHARED_STATIC_LIBS=y works).
> 
> Hm, you bring an interesting problem to the table here. So far,
> whenever <dlfcn.h> was used, we simply added a !BR2_STATIC_LIBS
> dependency. Just check in the tree:
> 
> $ git grep dlcfn
> 
> BR2_STATIC_LIBS=y with glibc is not possible.
> 
> BR2_STATIC_LIBS=y with uClibc indeed brings this outcome, as in this
> case, we build uClibc without dynamic library support, and therefore
> dlfcn.h is missing.
> 
> The interesting case is BR2_STATIC_LIBS=y with musl. We do allow this
> configuration.. but in this case indeed musl will still provide
> <dlfcn.h> and allow loading dynamic libraries.
> 
> I'm not sure how to handle this. However, for the time being, for the
> sake of consistency, I think we should handle this <dlfcn.h> usage of
> kbd like we're doing in all other packages: by adding just a
> !BR2_STATIC_LIBS dependency.
I suppose in the musl BR2_STATIC_LIBS=y the dynamic zlib, etc. libraries 
kbd might want to load wouldn't exist, so while the build would work, 
it'd fail at runtime if handling compressed files. But it should work 
for uncompressed ones, and depending on !BR2_STATIC_LIBS would break 
that (by disabling the build of kbd).

Question is, does that matter to anyone? I don't have any production 
builds with static libraries myself. If it's not a problem I'm happy to 
respin with the simplified requirement, otherwise I think keeping 
functionality is more important than keeping condition style consistent.

Best regards,
Fiona

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

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

end of thread, other threads:[~2026-09-20 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-20 11:32 [Buildroot] [PATCH 1/1] package/kbd: requires shared libraries if using uClibc Fiona Klute via buildroot
2026-09-20 12:14 ` Thomas Petazzoni via buildroot
2026-09-20 13:24   ` Fiona Klute via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox