* [Buildroot] [PATCH 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale
@ 2023-02-21 11:29 Fabrice Fontaine
2023-02-21 14:01 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2023-02-21 11:29 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Romain Naour, Thomas Petazzoni,
Thomas De Schampheleire, Fabrice Fontaine
locale is not enabled resulting in the following libcpprestsdk build
failure:
In file included from /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/include/cpprest/json.h:18,
from /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/src/pch/stdafx.h:88,
from /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/src/http/client/http_client_msg.cpp:13:
/home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/include/cpprest/asyncrt_utils.h:317:13: error: 'locale_t' does not name a type
317 | typedef locale_t xplat_locale;
| ^~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/e6778e60cc1ea455f5b4511d5824f04d8040f67b
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
.../toolchain-external/toolchain-external-synopsys-arc/Config.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
index c3483f331c..37c7b82644 100644
--- a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
+++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
@@ -4,7 +4,6 @@ config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
depends on BR2_HOSTARCH = "x86_64"
select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
select BR2_INSTALL_LIBSTDCPP
- select BR2_ENABLE_LOCALE
select BR2_USE_WCHAR
select BR2_TOOLCHAIN_HAS_THREADS
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
--
2.39.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 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale 2023-02-21 11:29 [Buildroot] [PATCH 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale Fabrice Fontaine @ 2023-02-21 14:01 ` Thomas Petazzoni via buildroot 2023-02-21 14:09 ` Fabrice Fontaine 0 siblings, 1 reply; 5+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-02-21 14:01 UTC (permalink / raw) To: Fabrice Fontaine Cc: Romain Naour, Giulio Benetti, Thomas De Schampheleire, buildroot On Tue, 21 Feb 2023 12:29:11 +0100 Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > locale is not enabled resulting in the following libcpprestsdk build > failure: > > In file included from /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/include/cpprest/json.h:18, > from /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/src/pch/stdafx.h:88, > from /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/src/http/client/http_client_msg.cpp:13: > /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/include/cpprest/asyncrt_utils.h:317:13: error: 'locale_t' does not name a type > 317 | typedef locale_t xplat_locale; > | ^~~~~~~~ > > Fixes: > - http://autobuild.buildroot.org/results/e6778e60cc1ea455f5b4511d5824f04d8040f67b > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> The thing is that the toolchain claims to have locale support: $ grep LOCALE output/host/opt/ext-toolchain/arc-snps-linux-uclibc/sysroot/usr/include/bits/uClibc_config.h #define __UCLIBC_HAS_LOCALE__ 1 #define __UCLIBC_BUILD_MINIMAL_LOCALE__ 1 #undef __UCLIBC_BUILD_ALL_LOCALE__ #define __UCLIBC_BUILD_MINIMAL_LOCALES__ "en_US" #undef __UCLIBC_HAS_XLOCALE__ Are you sure your commit doesn't break the build? Indeed normally for external toolchains, we verify that the Buildroot configuration matches the toolchain, and abort the build if not. So if the toolchain supports locale (which it does here according to __UCLIBC_HAS_LOCALE__) but your Buildroot configuration doesn't say so, the build should normally abort with: XYZ available in C library, please enable ABC See in toolchains/helpers.mk: check_uclibc_feature = \ IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \ if [ -z "$(2)" ] ; then \ if [ "$${IS_IN_LIBC}" != "y" ] ; then \ echo "$(4) not available in C library, toolchain unsuitable for Buildroot" ; \ exit 1 ; \ fi ; \ else \ if [ "$($(2))" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ echo "$(4) available in C library, please enable $(2)" ; \ exit 1 ; \ fi ; \ if [ "$($(2))" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ echo "$(4) not available in C library, please disable $(2)" ; \ exit 1 ; \ fi ; \ fi check_uclibc = \ [...] $(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\ 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 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale 2023-02-21 14:01 ` Thomas Petazzoni via buildroot @ 2023-02-21 14:09 ` Fabrice Fontaine 2023-02-21 14:21 ` Thomas Petazzoni via buildroot 0 siblings, 1 reply; 5+ messages in thread From: Fabrice Fontaine @ 2023-02-21 14:09 UTC (permalink / raw) To: Thomas Petazzoni Cc: Romain Naour, Giulio Benetti, Thomas De Schampheleire, buildroot [-- Attachment #1.1: Type: text/plain, Size: 3622 bytes --] Le mar. 21 févr. 2023 à 15:01, Thomas Petazzoni < thomas.petazzoni@bootlin.com> a écrit : > On Tue, 21 Feb 2023 12:29:11 +0100 > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > > locale is not enabled resulting in the following libcpprestsdk build > > failure: > > > > In file included from > /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/include/cpprest/json.h:18, > > from > /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/src/pch/stdafx.h:88, > > from > /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/src/http/client/http_client_msg.cpp:13: > > > /home/thomas/autobuild/instance-0/output-1/build/libcpprestsdk-2.10.18/Release/include/cpprest/asyncrt_utils.h:317:13: > error: 'locale_t' does not name a type > > 317 | typedef locale_t xplat_locale; > > | ^~~~~~~~ > > > > Fixes: > > - > http://autobuild.buildroot.org/results/e6778e60cc1ea455f5b4511d5824f04d8040f67b > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > The thing is that the toolchain claims to have locale support: > > $ grep LOCALE > output/host/opt/ext-toolchain/arc-snps-linux-uclibc/sysroot/usr/include/bits/uClibc_config.h > > #define __UCLIBC_HAS_LOCALE__ 1 > #define __UCLIBC_BUILD_MINIMAL_LOCALE__ 1 > #undef __UCLIBC_BUILD_ALL_LOCALE__ > #define __UCLIBC_BUILD_MINIMAL_LOCALES__ "en_US" > #undef __UCLIBC_HAS_XLOCALE__ > I think the issue is that __UCLIBC_HAS_XLOCALE__ is disabled. To my understanding, locale_t is defined in xlocale.h: https://github.com/wbx-github/uclibc-ng/blob/ab1dd83bec59c9e65c31efd6e887182948f627be/include/xlocale.h#L46 I'm far from being an expert in locale/uclibc-ng so I'm a bit lost between all those variables ... In uclibc.mk, we're enabling UCLIBC_HAS_XLOCALE in UCLIBC_LOCALE_CONFIG hook. > > Are you sure your commit doesn't break the build? Indeed normally for > external toolchains, we verify that the Buildroot configuration matches > the toolchain, and abort the build if not. So if the toolchain supports > locale (which it does here according to __UCLIBC_HAS_LOCALE__) but your > Buildroot configuration doesn't say so, the build should normally abort > with: > > XYZ available in C library, please enable ABC > > See in toolchains/helpers.mk: > > check_uclibc_feature = \ > IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \ > if [ -z "$(2)" ] ; then \ > if [ "$${IS_IN_LIBC}" != "y" ] ; then \ > echo "$(4) not available in C library, toolchain > unsuitable for Buildroot" ; \ > exit 1 ; \ > fi ; \ > else \ > if [ "$($(2))" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ > echo "$(4) available in C library, please enable > $(2)" ; \ > exit 1 ; \ > fi ; \ > if [ "$($(2))" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ > echo "$(4) not available in C library, please > disable $(2)" ; \ > exit 1 ; \ > fi ; \ > fi > > check_uclibc = \ > [...] > $(call > check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale > support) ;\ > > Thomas > -- > Thomas Petazzoni, co-owner and CEO, Bootlin > Embedded Linux and Kernel engineering and training > https://bootlin.com Best Regards, Fabrice [-- Attachment #1.2: Type: text/html, Size: 5251 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 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale 2023-02-21 14:09 ` Fabrice Fontaine @ 2023-02-21 14:21 ` Thomas Petazzoni via buildroot 2023-02-21 14:29 ` Fabrice Fontaine 0 siblings, 1 reply; 5+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-02-21 14:21 UTC (permalink / raw) To: Fabrice Fontaine Cc: Romain Naour, Giulio Benetti, Thomas De Schampheleire, buildroot On Tue, 21 Feb 2023 15:09:47 +0100 Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > I think the issue is that __UCLIBC_HAS_XLOCALE__ is disabled. > To my understanding, locale_t is defined in xlocale.h: > https://github.com/wbx-github/uclibc-ng/blob/ab1dd83bec59c9e65c31efd6e887182948f627be/include/xlocale.h#L46 Possible indeed. There are newer versions of the ARC toolchain available at https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases, but I checked the latest and it still has xlocale disabled. One option is to ask the ARC/Synopsys people to enable XLOCALE in their uClibc configuration. Another option is to drop the ARC/Synopsys toolchain entirely. A third option is to change the check done by Buildroot to verify __UCLIBC_HAS_XLOCALE__ instead of __UCLIBC_HAS_LOCALE__. This way it will be valid to say that the ARC toolchain does not have locale support. 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 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale 2023-02-21 14:21 ` Thomas Petazzoni via buildroot @ 2023-02-21 14:29 ` Fabrice Fontaine 0 siblings, 0 replies; 5+ messages in thread From: Fabrice Fontaine @ 2023-02-21 14:29 UTC (permalink / raw) To: Thomas Petazzoni Cc: Romain Naour, Giulio Benetti, Thomas De Schampheleire, buildroot [-- Attachment #1.1: Type: text/plain, Size: 1373 bytes --] Le mar. 21 févr. 2023 à 15:21, Thomas Petazzoni < thomas.petazzoni@bootlin.com> a écrit : > On Tue, 21 Feb 2023 15:09:47 +0100 > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > > I think the issue is that __UCLIBC_HAS_XLOCALE__ is disabled. > > To my understanding, locale_t is defined in xlocale.h: > > > https://github.com/wbx-github/uclibc-ng/blob/ab1dd83bec59c9e65c31efd6e887182948f627be/include/xlocale.h#L46 > > Possible indeed. There are newer versions of the ARC toolchain > available at > https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases > , > but I checked the latest and it still has xlocale disabled. > > One option is to ask the ARC/Synopsys people to enable XLOCALE in their > uClibc configuration. > I added a comment to an issue opened in 2020: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/241 > > Another option is to drop the ARC/Synopsys toolchain entirely. > > A third option is to change the check done by Buildroot to verify > __UCLIBC_HAS_XLOCALE__ instead of __UCLIBC_HAS_LOCALE__. This way it > will be valid to say that the ARC toolchain does not have locale > support. > I'll send a patch. > > 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: 2593 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
end of thread, other threads:[~2023-02-21 14:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-02-21 11:29 [Buildroot] [PATCH 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale Fabrice Fontaine 2023-02-21 14:01 ` Thomas Petazzoni via buildroot 2023-02-21 14:09 ` Fabrice Fontaine 2023-02-21 14:21 ` Thomas Petazzoni via buildroot 2023-02-21 14:29 ` Fabrice Fontaine
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox