Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 730287 - It's not possible to build ruby package
It's not possible to build ruby package
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ruby (Show other bugs)
6.2
All Linux
high Severity high
: rc
: ---
Assigned To: Vít Ondruch
Aleš Mareček
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-12 07:23 EDT by Aleš Mareček
Modified: 2011-12-06 07:08 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 07:08:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1581 normal SHIPPED_LIVE Low: ruby security, bug fix, and enhancement update 2011-12-05 19:38:54 EST

  None (edit)
Description Aleš Mareček 2011-08-12 07:23:46 EDT
Description of problem:
I have problem with building of ruby package.

Version-Release number of selected component (if applicable):
ruby-1.8.7.352-2.el6.src

How reproducible:
Always

Steps to Reproduce:
1. As non-root user run: rpm -ivh /mnt/redhat/brewroot/packages/ruby/1.8.7.352/2.el6/src/ruby-1.8.7.352-2.el6.src.rpm
2. Build it: rpmbuild -vv -ba ~/rpmbuild/SPECS/ruby.spec
  
Actual results:
- SNIP -
gcc -shared -Wl,-soname,libruby.so.1.8   array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o tracer.o util.o variable.o version.o  dmyext.o dtrace.o -lpthread -lrt -ldl -lcrypt -lm   -o libruby.so.1.8.7
/home/bah/rpmbuild/BUILD/ruby-1.8.7.352/ruby-1.8.7-p352/lib/shellwords.rb:34:in `shellwords': Argument must be a string (ArgumentError)
	from /home/bah/rpmbuild/BUILD/ruby-1.8.7.352/ruby-1.8.7-p352/lib/mkmf.rb:25
	from ./ext/extmk.rb:37:in `require'
	from ./ext/extmk.rb:37
make: *** [all] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.CuRrKU (%build)


Expected results:
Build successfully

Additional info:
Comment 1 Vít Ondruch 2011-08-12 07:33:04 EDT
It seems that we hit following error [1]. The patch is available at [2]. Unfortunately it was not merged into 1.8.7 :/


[1] https://bugs.gentoo.org/234877?id=234877
[2] http://redmine.ruby-lang.org/projects/ruby-19/repository/revisions/20587
Comment 5 Aleš Mareček 2011-08-25 10:46:03 EDT
I did some tests and I think there is some strange bug in ranging with floats.

i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...6.4).step(1.8).to_a; p a; p a.size'
[1.0, 2.8, 4.6, 6.4]  <--- FAIL
4
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1...6).step(1).to_a; p a; p a.size'
[1, 2, 3, 4, 5]
5
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...6.4).step(1).to_a; p a; p a.size'
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
6
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...7.0).step(1).to_a; p a; p a.size'
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
6
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...7.1).step(1).to_a; p a; p a.size'
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]
7
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...13.6).step(1.8).to_a; p a; p a.size'
[1.0, 2.8, 4.6, 6.4, 8.2, 10.0, 11.8]
7
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...13.6).step(1.2).to_a; p a; p a.size'
[1.0, 2.2, 3.4, 4.6, 5.8, 7.0, 8.2, 9.4, 10.6, 11.8, 13.0]
11
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...4.6).step(1.2).to_a; p a; p a.size'
[1.0, 2.2, 3.4]
3
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1.0...9.4).step(1.2).to_a; p a; p a.size'
[1.0, 2.2, 3.4, 4.6, 5.8, 7.0, 8.2, 9.4]  <--- FAIL
8
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1...8).step(1).to_a; p a; p a.size'
[1, 2, 3, 4, 5, 6, 7]
7
i:i386|m:i686 bah@hp-xw4200-01 [smoke-test]# ruby -e 'a = (1...4).step(1).to_a; p a; p a.size'
[1, 2, 3]
3
Comment 6 Aleš Mareček 2011-08-25 10:47:46 EDT
^ ruby-1.8.7.352-3
Comment 7 Aleš Mareček 2011-08-25 10:51:02 EDT
Well, it seems this issue happens only on i386.

i:ppc64|m:ppc64 root@ibm-js12-02 [~]# ruby -e 'a = (1.0...6.4).step(1.8).to_a; p a; p a.size'
[1.0, 2.8, 4.6]
3
i:ppc64|m:ppc64 root@ibm-js12-02 [~]# ruby -e 'a = (1.0...9.4).step(1.2).to_a; p a; p a.size'
[1.0, 2.2, 3.4, 4.6, 5.8, 7.0, 8.2]
7
i:ppc64|m:ppc64 root@ibm-js12-02 [~]# ruby -e 'a = (1...4).step(1).to_a; p a; p a.size'
[1, 2, 3]
3
i:ppc64|m:ppc64 root@ibm-js12-02 [~]# ruby -e 'a = (1...8).step(1).to_a; p a; p a.size'
[1, 2, 3, 4, 5, 6, 7]
7
Comment 8 Aleš Mareček 2011-08-25 11:12:07 EDT
New bug about range issue: https://bugzilla.redhat.com/show_bug.cgi?id=733372
Comment 9 Vít Ondruch 2011-08-26 05:15:54 EDT
It seems to be platform specific issue. I have tried to write reproducer in C with the same (wrong) result. The -ffloat-store might fix the issue, however the performance impact is unclear.

Similar complain was risen in Ruby Redmine [1] but the patch [2] is not worth of any action, since it fixes the consequences, no the reasons.

[1] http://redmine.ruby-lang.org/issues/4576
[2] http://redmine.ruby-lang.org/projects/ruby-19/repository/revisions/31304/diff/test/ruby/test_range.rb
Comment 13 errata-xmlrpc 2011-12-06 07:08:14 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1581.html

Note You need to log in before you can comment on or make changes to this bug.