Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux i486 #16

Open
cschramm opened this issue Apr 17, 2013 · 3 comments · May be fixed by #17
Open

Linux i486 #16

cschramm opened this issue Apr 17, 2013 · 3 comments · May be fixed by #17

Comments

@cschramm
Copy link

The gem fails to find a proper binary for my 32 bit Debian server.

The problem is that RbConfig::CONFIG['host_cpu'] reports i486, while uname -m gives me i686.

I guess that RbConfig::CONFIG['host_cpu'] reports the compile configuration of Ruby, not the actual platform. It also will report a 32 bit architecture if you run a 32 bit ruby binary on a 64 bit platform.

I'm not sure if there's a proper way to detect the architecture of the actual platform ruby is running on instead of what it was compiled for (https://github.com/rdp/os does not do this either). Of course one could invoke a shell and ask e. g. uname, but...

The easiest fix would be to install the i686 version of phantom even if RbConfig::CONFIG['host_cpu'] reports i486. The probability of running on an actual i486 or Pentium should be quite low. You could give a warning in that situation. Would be nicer than just giving up.

I can prepare a PR if we agree on a solution for this.

@cschramm
Copy link
Author

Here's a quick implementation: cschramm@5e0115f

(I also removed x86_32 since I'm pretty confident this does not exist 😉 )

@cschramm cschramm linked a pull request Apr 21, 2013 that will close this issue
@cschramm
Copy link
Author

Any feedback?

@jabr
Copy link
Collaborator

jabr commented Aug 31, 2013

Perhaps a new UnknownLinux platform that prints a warn and then installs the 32bit version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants