ruby-core

Mailing list archive

[ruby-core:66660] setarch i686 bash -c ' [ $( ruby -e 'print RUBY_PLATFORM' ) == x86_64_linux ] '-> TRUE (0) - would expect platform to be i386_linux

From: Jason Vas Dias <jason.vas.dias@...>
Date: 2014-12-03 15:18:13 UTC
List: ruby-core #66660
When building an RPM for the i686 or i386 architecture on an x86_64 RHEL
6 / OL6 host that uses SWIG to generate headers, even though both
ruby-devel.i686 and ruby-devel.x86_64 are installed and
I have both /usr/lib/ruby/1.8/i386_linux and /usr/lib64/ruby/1.8/x86_64-linux
directories, and my 'uname -m -i -p' reports 'i686 i686 i686' since I am running
in an 'setarch i686' environment, /usr/bin/ruby (being from
ruby.x86_64 RPM) reports its 'RUBY_PLATFORM' as being x86_64 , making
it impossible to build
the package depending on ruby-devel for i686 on an x86_64 platform without
ruby i686 being installed .
Couldn't ruby use the uname() system call and if i686 is reported as
'machine', then check if /usr/lib/ruby/i386_linux exists, and if so, return
i686 as 'RUBY_PLATFORM' and use that directory as the arch-specific
dependency directory .
In perl, POSIX::uname() correctly reports 'i686' as the machine on
an x86_64 platform in a sub-process of 'setarch i686' . Why can't Ruby
be a bit more intelligent in the platform it reports ?
Is this a bug or new feature request ? Any votes / ideas ?

In This Thread

Prev Next