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

host_cpu changes between Ruby 2.7.2 and 2.7.3 #179

Closed
JoshCheek opened this issue Jun 16, 2021 · 2 comments
Closed

host_cpu changes between Ruby 2.7.2 and 2.7.3 #179

JoshCheek opened this issue Jun 16, 2021 · 2 comments

Comments

@JoshCheek
Copy link

Version:

$ ruby -r childprocess -e 'p ChildProcess::VERSION'
"4.1.0"

The host_cpu changes between patchlevel versions:

$ ruby-install -c -j12 --no-install-deps -r "$HOME"/tmp ruby 2.7.2
$ ruby-install -c -j12 --no-install-deps -r "$HOME"/tmp ruby 2.7.3

$ ruby-2.7.2/bin/ruby -e 'puts RbConfig::CONFIG["host_cpu"]'
arm

$ ruby-2.7.3/bin/ruby -e 'puts RbConfig::CONFIG["host_cpu"]'
arm64

This means that #177 is correct for Ruby 2.7.3+ (including 3.0.x), but for 2.7.2, it looks for the file "arm-macosx.rb" instead of "arm64-macosx.rb".

This leads to #176 still being an issue on Ruby <= 2.7.2

eg:

$ CHILDPROCESS_POSIX_SPAWN=true ruby-2.7.2/bin/ruby -r childprocess -e ChildProcess.new
W, [2021-06-15T22:47:08.489959 #94108]  WARN -- : posix_spawn is not yet supported on arm-macosx (arm64-darwin20), falling back to default implementation. If you believe this is an error, please file a bug at http://github.com/enkessler/childprocess/issues

$ CHILDPROCESS_POSIX_SPAWN=true ruby-2.7.3/bin/ruby -r childprocess -e ChildProcess.new
@p0deje
Copy link

p0deje commented Nov 3, 2022

On TruffleRuby 22.2.0 running on Apple M1 it is different too:

RbConfig::CONFIG['host_cpu']
=> "aarch64"

@sds
Copy link
Collaborator

sds commented Jan 7, 2024

Sorry this never got a response. Since Ruby 2.7 has reached end-of-life in March 2023, would suggest at this point to upgrade Ruby instead (unless you're seeing this same issue in Ruby 3.x)

@sds sds closed this as completed Jan 7, 2024
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

No branches or pull requests

3 participants