All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/optee-client: needs glibc or musl
@ 2026-11-19  8:08 Yegor Yefremov
  2026-11-20  6:17 ` Waldemar Brodkorb
  0 siblings, 1 reply; 3+ messages in thread
From: Yegor Yefremov @ 2026-11-19  8:08 UTC (permalink / raw)
  To: buildroot; +Cc: Etienne Carriere

Since version 4.8.0 [1], tee-supplicant uses renameat2(), which
uClibc-ng doesn't provide (glibc has it since 2.28, musl since 1.2.6):

  tee_supp_fs.c:491:25: error: 'RENAME_NOREPLACE' undeclared (first use in this function)
  tee_supp_fs.c:493:13: error: implicit declaration of function 'renameat2'; did you mean 'renameat'? [-Wimplicit-function-declaration]

This was reported upstream [2], where the maintainer proposed adding
a dependency to the package, and the issue was later closed as stale.
So make optee-client unavailable with uClibc-ng, and propagate the
dependency to optee-examples and optee-test, which select it.

This issue has been present since commit 6b7b895d10a8 ("{boot/optee-os,
package/optee-*}: bump version to 4.9.0"), which brought optee-client
from 4.6.0 to 4.9.0. It therefore affects 2026.02 and later, including
the 2026.02.x LTS branch.

[1] https://github.com/OP-TEE/optee_client/commit/e3148e3019f4eb0eeadac5ddceffc4d425b3570d
[2] https://github.com/OP-TEE/optee_client/issues/418

Fixes:
https://autobuild.buildroot.org/results/a1776b9fb064aea72e37965e9c04d44ab1743b2c

Fixes: 6b7b895d10a8156e96f17742c6b05eb6fd47ca40 ("{boot/optee-os, package/optee-*}: bump version to 4.9.0")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/optee-client/Config.in   | 6 ++++--
 package/optee-examples/Config.in | 6 ++++--
 package/optee-test/Config.in     | 6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/package/optee-client/Config.in b/package/optee-client/Config.in
index 04849ffce4..fd9193b67b 100644
--- a/package/optee-client/Config.in
+++ b/package/optee-client/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_OPTEE_CLIENT
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 # MMC_IOC_MULTI_CMD
 	depends on BR2_USE_MMU # fork()
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # renameat2()
 	help
 	  Enable the OP-TEE client package that brings non-secure
 	  client application resources for OP-TEE support. OP-TEE
@@ -94,7 +95,8 @@ config BR2_PACKAGE_OPTEE_CLIENT_TEEACL
 
 endif
 
-comment "optee-client needs a toolchain w/ threads, headers >= 4.3"
+comment "optee-client needs a glibc or musl toolchain w/ threads, headers >= 4.3"
 	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 || \
+		BR2_TOOLCHAIN_USES_UCLIBC
diff --git a/package/optee-examples/Config.in b/package/optee-examples/Config.in
index fca9aca07c..9a32263e74 100644
--- a/package/optee-examples/Config.in
+++ b/package/optee-examples/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_OPTEE_EXAMPLES
 	depends on !BR2_STATIC_LIBS # optee-client
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 # optee-client
 	depends on BR2_USE_MMU # optee-client
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # optee-client
 	select BR2_PACKAGE_OPTEE_CLIENT
 	select BR2_TARGET_OPTEE_OS_SDK
 	help
@@ -21,11 +22,12 @@ config BR2_PACKAGE_OPTEE_EXAMPLES
 
 	  https://github.com/linaro-swg/optee_examples
 
-comment "optee-examples needs a toolchain w/ threads, dynamic library, headers >= 4.3"
+comment "optee-examples needs a glibc or musl toolchain w/ threads, dynamic library, headers >= 4.3"
 	depends on BR2_TARGET_OPTEE_OS
 	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
-		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 || \
+		BR2_TOOLCHAIN_USES_UCLIBC
 
 if BR2_PACKAGE_OPTEE_EXAMPLES
 
diff --git a/package/optee-test/Config.in b/package/optee-test/Config.in
index 8631d12cef..05ff86287a 100644
--- a/package/optee-test/Config.in
+++ b/package/optee-test/Config.in
@@ -6,6 +6,7 @@ config BR2_PACKAGE_OPTEE_TEST
 	depends on !BR2_STATIC_LIBS # optee-client
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 # optee-client
 	depends on BR2_USE_MMU # optee-client
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # optee-client
 	select BR2_PACKAGE_OPTEE_CLIENT
 	select BR2_TARGET_OPTEE_OS_SDK
 	help
@@ -26,11 +27,12 @@ config BR2_PACKAGE_OPTEE_TEST
 
 	  http://github.com/OP-TEE/optee_test
 
-comment "optee-test needs a toolchain w/ threads, C++, dynamic library, headers >= 4.3"
+comment "optee-test needs a glibc or musl toolchain w/ threads, C++, dynamic library, headers >= 4.3"
 	depends on BR2_TARGET_OPTEE_OS
 	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
-		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
+		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 || \
+		BR2_TOOLCHAIN_USES_UCLIBC
 
 if BR2_PACKAGE_OPTEE_TEST
 
-- 
2.34.1

_______________________________________________
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] package/optee-client: needs glibc or musl
  2026-11-19  8:08 [Buildroot] [PATCH] package/optee-client: needs glibc or musl Yegor Yefremov
@ 2026-11-20  6:17 ` Waldemar Brodkorb
  2026-11-20  6:53   ` Yegor Yefremov
  0 siblings, 1 reply; 3+ messages in thread
From: Waldemar Brodkorb @ 2026-11-20  6:17 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: buildroot, Etienne Carriere

Hi Yegor, all,
Yegor Yefremov wrote,

> Since version 4.8.0 [1], tee-supplicant uses renameat2(), which
> uClibc-ng doesn't provide (glibc has it since 2.28, musl since 1.2.6):
> 
>   tee_supp_fs.c:491:25: error: 'RENAME_NOREPLACE' undeclared (first use in this function)
>   tee_supp_fs.c:493:13: error: implicit declaration of function 'renameat2'; did you mean 'renameat'? [-Wimplicit-function-declaration]

Instead of disabling the package, I will propose a small uClibc-ng
patch providing the syscall wrapper for renameat2.

best regards
 Waldemar
_______________________________________________
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] package/optee-client: needs glibc or musl
  2026-11-20  6:17 ` Waldemar Brodkorb
@ 2026-11-20  6:53   ` Yegor Yefremov
  0 siblings, 0 replies; 3+ messages in thread
From: Yegor Yefremov @ 2026-11-20  6:53 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot, Etienne Carriere

Hi Waldemar,

On Fri, Nov 20, 2026 at 7:17 AM Waldemar Brodkorb <wbx@openadk.org> wrote:
>
> Hi Yegor, all,
> Yegor Yefremov wrote,
>
> > Since version 4.8.0 [1], tee-supplicant uses renameat2(), which
> > uClibc-ng doesn't provide (glibc has it since 2.28, musl since 1.2.6):
> >
> >   tee_supp_fs.c:491:25: error: 'RENAME_NOREPLACE' undeclared (first use in this function)
> >   tee_supp_fs.c:493:13: error: implicit declaration of function 'renameat2'; did you mean 'renameat'? [-Wimplicit-function-declaration]
>
> Instead of disabling the package, I will propose a small uClibc-ng
> patch providing the syscall wrapper for renameat2.

This is, of course, a better solution. I'll test your patch as soon as
it arrives.

Regards,
Yegor
_______________________________________________
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-11-20  6:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19  8:08 [Buildroot] [PATCH] package/optee-client: needs glibc or musl Yegor Yefremov
2026-11-20  6:17 ` Waldemar Brodkorb
2026-11-20  6:53   ` Yegor Yefremov

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.