Bug #10120

TestSprintf#test_float still an issue

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

[ruby-core:64284]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v:ruby 2.0.0p353 (2013-11-22 revision 43784) [i686-linux] Backport:2.0.0: REQUIRED, 2.1: DONE

Description

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:

https://bugzilla.redhat.com/show_bug.cgi?id=1101811

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 install 2.1.1) Open 04/04/2014

Associated revisions

Revision 47129
Added by Nobuyoshi Nakada 10 months ago

configure.in: remove SSE options

Revision 50067
Added by Tomoyuki Chikanaga 2 months ago

merge revision(s) r47129,r48844: [Backport #10120]

configure.in: remove SSE options

History

#1 Updated by Vit Ondruch 10 months ago

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

#2 Updated by Nobuyoshi Nakada 10 months ago

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

I CAN NEVER REPRODUCE IT ON ANY PLATFORMS, INCLUDE MINGW.

#3 Updated by Nobuyoshi Nakada 10 months ago

  • Status changed from Open to Feedback

#4 Updated by Vit Ondruch 10 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 10 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 9 months ago

  • Assignee set to Nobuyoshi Nakada

Hello,

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
<"0x1p+1">.

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 5 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

#8 Updated by Tomoyuki Chikanaga 2 months ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

r47129 and r48844 were backported into ruby_2_1 branch at r50067.

Also available in: Atom PDF