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

[toolchain][mpfr-4.1.0] check_vsprintf test failure with Gentoo (needs patch or version bump) #179

Open
jeandestouches opened this issue Aug 28, 2024 · 1 comment

Comments

@jeandestouches
Copy link

Hello,
At commit : e888634
Building the toolchain fails at the mpfr-4.1.0 compilation stage (test for check_vsprintf) on my Gentoo system (gcc 14.2.1 / glibc 2.39 / binutils 2.42) ; for some reason, if I use Debian 8/9/10/11, no problem.

Anyway, I bumped myself mpfr to 4.2.1 since It has been fixed in 4.2.1 release and now mpfr builds fine. (And everything else too :) )

Maybe a patch can be made for 4.1.0 or else maybe bumping the release to 4.2.1.


https://gitlab.inria.fr/mpfr/mpfr/-/blob/4.2.1/ChangeLog

The test
check_vsprintf ("+01,234,567  :", "%0+ -'13.10Pd:", (mpfr_prec_t) 1234567);

is based on the output from glibc up to 2.36, which is incorrect:
https://sourceware.org/bugzilla/show_bug.cgi?id=23432
The GNU C Library has apparently been partially fixed in its Git
repository for the future 2.37, since a tsprintf failure has been
reported (this is a bug in this test, not in the MPFR library):
https://sympa.inria.fr/sympa/arc/mpfr/2023-01/msg00001.html
So, modified the test to avoid the particular case of leading zeros
due to the precision field larger than the number of digits. This
case has already been tested without the thousands separator (where
there are no issues with the C libraries), so that we do not miss
much testing. Added a comment explaining the issue and a possible
solution for future testing of this particular case (if need be).

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
@jeandestouches and others