Skip to contentSkip to conversation

package/drogon: needs a toolchain with wchar support

PATCH Applied Dario Binacchi 2 participants 3 messages Oct 27 – Nov 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/drogon: needs a toolchain with wchar support

The trantor library bundled in drogon uses std::codecvt_utf8<wchar_t> to convert strings between UTF-8 and std::wstring. Toolchains without wide character support, such as uClibc without WCHAR, have a libstdc++ that lacks it, so any executable linked against trantor fails to link, starting with the drogon examples.

ld: ../trantor/libtrantor.so.1.5.29: undefined reference to `std::codecvt_utf8<wchar_t, 1114111ul, (std::codecvt_mode)0>::codecvt_utf8(unsigned int)'

These conversions are part of the public API of trantor and drogon, so they cannot be disabled. Add a dependency on BR2_USE_WCHAR, together with the matching comment.

This issue has been present since the package was added, so it also affects the 2026.08.x branch.

Fixes:
https://autobuild.buildroot.org/results/6b893fea68e25fd928daabff5cf034de76062ac1

Fixes d38b4915e9437c5492836914c0a0fff12b4f1031 ("package/drogon: new package")
---
 package/drogon/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/drogon/Config.in +3 -2
index ce8a8313bded..c5e20c2017f6 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_DROGON
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_11 # C++17/20
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_USE_WCHAR # std::codecvt_utf8<wchar_t>
 	select BR2_PACKAGE_JSONCPP
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
@@ -45,8 +46,8 @@ config BR2_PACKAGE_DROGON_YAML_CONFIG
 
 endif
 
-comment "drogon needs a toolchain w/ C++, threads, gcc >= 11"
+comment "drogon needs a toolchain w/ C++, threads, wchar, gcc >= 11"
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 12 lines · Dario Binacchi

The trantor library bundled in drogon uses std::codecvt_utf8<wchar_t> to convert strings between UTF-8 and std::wstring. Toolchains without wide character support, such as uClibc without WCHAR, have a libstdc++ that lacks it, so any executable linked against trantor fails to link, starting with the drogon examples.

ld: ../trantor/libtrantor.so.1.5.29: undefined reference to `std::codecvt_utf8<wchar_t, 1114111ul, (std::codecvt_mode)0>::codecvt_utf8(unsigned int)'

These conversions are part of the public API of trantor and drogon, so they cannot be disabled. Add a dependency on BR2_USE_WCHAR, together with the matching comment.

Quoted 8 lines

This issue has been present since the package was added, so it also affects the 2026.08.x branch.

Fixes:
https://autobuild.buildroot.org/results/6b893fea68e25fd928daabff5cf034de76062ac1

Fixes d38b4915e9437c5492836914c0a0fff12b4f1031 ("package/drogon: new package")

Applied to master, thanks!

Best regards,

Thomas Petazzoni

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Dario Binacchi

In reply of:

Quoted 12 lines

The trantor library bundled in drogon uses std::codecvt_utf8<wchar_t> to convert strings between UTF-8 and std::wstring. Toolchains without wide character support, such as uClibc without WCHAR, have a libstdc++ that lacks it, so any executable linked against trantor fails to link, starting with the drogon examples.

ld: ../trantor/libtrantor.so.1.5.29: undefined reference to `std::codecvt_utf8<wchar_t, 1114111ul, (std::codecvt_mode)0>::codecvt_utf8(unsigned int)'

These conversions are part of the public API of trantor and drogon, so they cannot be disabled. Add a dependency on BR2_USE_WCHAR, together with the matching comment.

Quoted 8 lines

This issue has been present since the package was added, so it also affects the 2026.08.x branch.

Fixes:
https://autobuild.buildroot.org/results/6b893fea68e25fd928daabff5cf034de76062ac1

Fixes d38b4915e9437c5492836914c0a0fff12b4f1031 ("package/drogon: new package")

Applied to 2026.08.x. Thanks

Quoted 17 lines
---
 package/drogon/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/drogon/Config.in +1 -0
index ce8a8313bded..c5e20c2017f6 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_DROGON
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_11 # C++17/20
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_USE_WCHAR # std::codecvt_utf8<wchar_t>
 	select BR2_PACKAGE_JSONCPP
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID

package/drogon/Config.in config BR2_PACKAGE_DROGON_YAML_CONFIG · line 53

Quoted 10 lines
package/drogon/Config.in +2 -2
@@ -45,8 +46,8 @@ config BR2_PACKAGE_DROGON_YAML_CONFIG
 
 endif
 
-comment "drogon needs a toolchain w/ C++, threads, gcc >= 11"
+comment "drogon needs a toolchain w/ C++, threads, wchar, gcc >= 11"
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot