From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Waldemar Brodkorb <wbx@openadk.org>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/perl: threads support needs locales
Date: Wed, 9 Aug 2023 20:07:42 +0200 [thread overview]
Message-ID: <20230809200742.5968181b@windsurf> (raw)
In-Reply-To: <ZNOMtm7TTVd12BQ3@waldemar-brodkorb.de>
On Wed, 9 Aug 2023 14:55:18 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:
> The thread support in perl needs locales enabled in the C library.
> Otherwise it fails with:
> POSIX.xs:3386:13: error: 'MBLEN_LOCK' undeclared (first use in this function); did you mean 'MUTEX_LOCK'?
Doesn't that seem really really weird, that thread support would depend
on locale support?
If we look at perl.h, which defines MBLEN_LOCK, we see something like
this:
/* Locale/thread synchronization macros. */
#if ! ( defined(USE_LOCALE) \
&& defined(USE_ITHREADS) \
&& ( ! defined(USE_THREAD_SAFE_LOCALE) \
|| ( defined(HAS_LOCALECONV) \
&& ( ! defined(HAS_LOCALECONV_L) \
|| defined(TS_W32_BROKEN_LOCALECONV))) \
|| ( defined(HAS_NL_LANGINFO) \
&& ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L)) \
|| (defined(HAS_MBLEN) && ! defined(HAS_MBRLEN)) \
|| (defined(HAS_MBTOWC) && ! defined(HAS_MBRTOWC)) \
|| (defined(HAS_WCTOMB) && ! defined(HAS_WCRTOMB))))
[...]
# define MBLEN_LOCK NOOP
[...]
#else
[...]
# if defined(HAS_MBLEN) && ! defined(HAS_MBRLEN)
# define MBLEN_LOCK LOCALE_LOCK_
# define MBLEN_UNLOCK LOCALE_UNLOCK_
[...]
Shouldn't the first #define MBLEN_LOCK NOOP correspond to our case
where no locale support is available?
There was a massive rework of this stuff in upstream commit
https://github.com/Perl/perl5/commit/d9e22c6a8a05aab7fffdbf810f74ddfcb4efd752,
which perhaps broke things.
I think I'll apply your patch anyway. I don't care very much about
!locale configs, and debugging the internals of Perl is beyond my
motivation.
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-08-09 18:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 12:55 [Buildroot] [PATCH] package/perl: threads support needs locales Waldemar Brodkorb
2023-08-09 18:07 ` Thomas Petazzoni via buildroot [this message]
2024-01-02 20:26 ` Yann E. MORIN
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=20230809200742.5968181b@windsurf \
--to=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=wbx@openadk.org \
/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