Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMT_STATIC_THOUSANDS_SEPARATOR broken in 10.0.0 #3835

Closed
vuvova opened this issue Feb 1, 2024 · 2 comments
Closed

FMT_STATIC_THOUSANDS_SEPARATOR broken in 10.0.0 #3835

vuvova opened this issue Feb 1, 2024 · 2 comments

Comments

@vuvova
Copy link

vuvova commented Feb 1, 2024

It seems that FMT_STATIC_THOUSANDS_SEPARATOR no longer works in 10.0.0. The following test succeeds in 8.0.1 but fails in 10.0.0:

#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1
#include <fmt/format-inl.h>
int main() {
  int answer= 4321;
  fmt::format_args::format_arg arg=
    fmt::detail::make_arg<fmt::format_context>(answer);
  return fmt::vformat("{:L}", fmt::format_args(&arg, 1)).compare("4,321");
}

References: https://jira.mariadb.org/browse/MDEV-32815

@vitaut
Copy link
Contributor

vitaut commented Feb 4, 2024

Bisected to b98ffb7.

@vitaut
Copy link
Contributor

vitaut commented Feb 10, 2024

Fixed in 44c3fe1, thanks for reporting.

@vitaut vitaut closed this as completed Feb 10, 2024
algitbot pushed a commit to alpinelinux/aports that referenced this issue Mar 8, 2024
bell-sw pushed a commit to bell-sw/alpaquita-aports that referenced this issue Mar 11, 2024
[ commit be4985b3440cfec6259d2bce653a00797ae1616c ]

Needed for mariadb.
ref: fmtlib/fmt#3835
ottok added a commit to ottok/mariadb that referenced this issue May 1, 2024
It is also safe to use `-DHAVE_SYSTEM_LIBFMT_EXITCODE=0` with < 10
version of libfmt, and in Debian there is currently 9.1.0.

It is also safe to have this flag when cross-compiling against a
libfmt-10+ version that has
fmtlib/fmt@44c3fe1

However, there hasn't been a libfmt release with this fix yet, so we
need to be careful to avoid libfmt 10.0.0-10.2.1.

ref:
- fmtlib/fmt#3835
- https://alioth-lists.debian.net/pipermail/pkg-mysql-maint/2024-May/017325.html
ottok added a commit to ottok/mariadb that referenced this issue May 1, 2024
It is also safe to use `-DHAVE_SYSTEM_LIBFMT_EXITCODE=0` with < 10
version of libfmt, and in Debian there is currently 9.1.0.

It is also safe to have this flag when cross-compiling against a
libfmt-10+ version that has
fmtlib/fmt@44c3fe1

However, there hasn't been a libfmt release with this fix yet, so we
need to be careful to avoid libfmt 10.0.0-10.2.1.

ref:
- fmtlib/fmt#3835
- https://alioth-lists.debian.net/pipermail/pkg-mysql-maint/2024-May/017325.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants