diff mbox series

[1/1] toolchain/helpers.mk: fix uclibc locale support

Message ID 20230221143533.1510153-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] toolchain/helpers.mk: fix uclibc locale support | expand

Commit Message

Fabrice Fontaine Feb. 21, 2023, 2:35 p.m. UTC
locale_t is defined by uclibc in xlocale.h:
https://github.com/wbx-github/uclibc-ng/blob/ab1dd83bec59c9e65c31efd6e887182948f627be/include/xlocale.h#L46

As a result, without xlocale, locale is not fully enabled which will
result in the following build failure with
toolchain-external-synopsys-arc and libcpprestsdk:

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/helpers.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni Aug. 30, 2023, 9:46 p.m. UTC | #1
On Tue, 21 Feb 2023 15:35:33 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> locale_t is defined by uclibc in xlocale.h:
> https://github.com/wbx-github/uclibc-ng/blob/ab1dd83bec59c9e65c31efd6e887182948f627be/include/xlocale.h#L46
> 
> As a result, without xlocale, locale is not fully enabled which will
> result in the following build failure with
> toolchain-external-synopsys-arc and libcpprestsdk:
> 
> 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/helpers.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I've applied this one to master, after squashing it with
"toolchain/toolchain-external/toolchain-external-synopsys-arc: drop
locale", and writing a better commit log. See:

  https://gitlab.com/buildroot.org/buildroot/-/commit/3c8d890c1946308f5396aa6428da5274b25c3a5f

Thanks a lot!

Thomas
Peter Korsgaard Sept. 14, 2023, 8:28 a.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Tue, 21 Feb 2023 15:35:33 +0100
 > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

 >> locale_t is defined by uclibc in xlocale.h:
 >> https://github.com/wbx-github/uclibc-ng/blob/ab1dd83bec59c9e65c31efd6e887182948f627be/include/xlocale.h#L46
 >> 
 >> As a result, without xlocale, locale is not fully enabled which will
 >> result in the following build failure with
 >> toolchain-external-synopsys-arc and libcpprestsdk:
 >> 
 >> 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/helpers.mk | 2 +-
 >> 1 file changed, 1 insertion(+), 1 deletion(-)

 > I've applied this one to master, after squashing it with
 > "toolchain/toolchain-external/toolchain-external-synopsys-arc: drop
 > locale", and writing a better commit log. See:

 >   https://gitlab.com/buildroot.org/buildroot/-/commit/3c8d890c1946308f5396aa6428da5274b25c3a5f

 > Thanks a lot!

Committed to 2023.02.x and 2023.05.x, thanks.
diff mbox series

Patch

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index f8fc933914..601a64f191 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -307,7 +307,7 @@  check_uclibc = \
 	$(call check_uclibc_feature,__UCLIBC_HAS_LFS__,,$${UCLIBC_CONFIG_FILE},Large file support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_TOOLCHAIN_HAS_NATIVE_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\
-	$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_XLOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\
 	$(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\