From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Romain Naour <romain.naour@gmail.com>,
Giulio Benetti <giulio.benetti@benettiengineering.com>,
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] toolchain/toolchain-external/toolchain-external-synopsys-arc: drop locale
Date: Tue, 21 Feb 2023 15:01:22 +0100 [thread overview]
Message-ID: <20230221150122.63e353f7@windsurf> (raw)
In-Reply-To: <20230221112911.177963-1-fontaine.fabrice@gmail.com>
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
next prev parent reply other threads:[~2023-02-21 14:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-02-21 14:09 ` Fabrice Fontaine
2023-02-21 14:21 ` Thomas Petazzoni via buildroot
2023-02-21 14:29 ` Fabrice Fontaine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230221150122.63e353f7@windsurf \
--to=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=giulio.benetti@benettiengineering.com \
--cc=romain.naour@gmail.com \
--cc=thomas.de_schampheleire@nokia.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox