Bug #10120

TestSprintf#test_float still an issue

Added by Vit Ondruch 7 months ago. Updated 2 months ago.

Assignee:Nobuyoshi Nakada
ruby -v:ruby 2.0.0p353 (2013-11-22 revision 43784) [i686-linux] Backport:2.0.0: REQUIRED, 2.1: REQUIRED


The fix for #8358 is build time solution. Unfortunately it turns out that this does not work so well for for distributions such as Fedora:


The issues is that the SSE2 support is determined during build time, i.e. if builder supports SSE2, then the instructions are enabled. However, later when the packaged Ruby is executed on platform which does not support SSE2, it may result in issues as described in the above mentioned ticket.

Is there some way, how to resolve this issue in runtime rather than build time?

Related issues

Related to Ruby trunk - Bug #8358: TestSprintf#test_float test failure Closed 05/02/2013
Related to Ruby trunk - Bug #9705: Installing ruby 2.1.1 fails while compiling (after: rvm i... Open 04/04/2014

Associated revisions

Revision 47129
Added by Nobuyoshi Nakada 7 months ago

configure.in: remove SSE options


#1 Updated by Vit Ondruch 7 months ago

  • Related to Bug #8358: TestSprintf#test_float test failure added

#2 Updated by Nobuyoshi Nakada 7 months ago

How can I reproduce the problem of sprintf on Fedora?
Which version OS, libc, and gcc?


#3 Updated by Nobuyoshi Nakada 7 months ago

  • Status changed from Open to Feedback

#4 Updated by Vit Ondruch 7 months ago

The #8358 was always issue on our builders and reproducible locally using mock [1]. E.g. I typically run the i686 build on my x86_64 OS inside the mock environment for i686.

These are approximately steps you should follow to reproduce:

  1. Run x86_64 Fedora
  2. yum install mock
  3. usermod -a -G mock [User name] && newgrp mock
  4. mock -r fedora-rawhide-i386 --init
  5. mock -r fedora-rawhide-i386 --install subversion bison 5.1 you can similarly install whatever else you might find handy in the buildroot
  6. mock -r fedora-rawhide-i386 shell
  7. checkout the ruby repository and configure & make & make check

To be honest, I have never tried to reproduce the issue in pure i686 Fedora. Not sure if that might be of any difference.

[1] http://fedoraproject.org/wiki/Projects/Mock

#5 Updated by Hiroshi SHIBATA 7 months ago

  • Related to Bug #9705: Installing ruby 2.1.1 fails while compiling (after: rvm install 2.1.1) added

#6 Updated by Luis Lavena 6 months ago

  • Assignee set to Nobuyoshi Nakada


Now after r47129, mingw-w64 is failing again, so we are back to the beginning.

ruby -v: ruby 2.2.0dev (2014-08-24 trunk 47266) [i386-mingw32]
TestSprintf#test_float [C:/Users/Luis/Code/ruby/ruby/test/ruby/test_sprintf.rb:208]:
<"0x1p+2"> expected but was

I'm out of ideas on how to solve this without: force SSE or change the pow/float implementation for MinGW.

Open to suggestions.

Thank you.

#7 Updated by Vit Ondruch 2 months ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED
  • Status changed from Feedback to Closed

This should be resolved by r48844 according to [1].

[1] https://bugs.ruby-lang.org/issues/10553#note-14

Also available in: Atom PDF