Actions
Bug #9993
closedx86_64 linux + i686 os = 32bit ruby, but `RUBY_PLATFORM=x86_64`
Description
Hi,
On x86_64 Linux Kernel, but i686 OS (there is no 64-binary file anywhere), this will produce a i686-binary ruby, but RUBY_PLATFORM=x86_64-linux:
# ./configure && make
Downloading config.guess...
Downloading config.sub...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
System type is wrong.
[...]
# ./ruby --disable-all -e 'puts RUBY_PLATFORM'
x86_64-linux
# file ./ruby
ruby: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
This works fine:
# ./configure --with-arch=i686 && make
./configure --with-arch=i686 && make
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
System type is wrong, too, but:
[...]
# ./ruby --disable-all -e 'puts RUBY_PLATFORM'
i686-linux
# file ruby
ruby: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
In config.log i found in both situations this:
uname -m = x86_64
uname -m
prints the kernel system type, not the os system type.
It isn't possible to compile a x86_64-binary on this machine, there is no compiler for that. Only for i386.
configure:3795: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Actions
Like0
Like0Like0Like0