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

macOS BigSur dir_chdir error when installing to ruby 2.7.1 #27

Open
ajunB7 opened this issue Apr 6, 2021 · 1 comment
Open

macOS BigSur dir_chdir error when installing to ruby 2.7.1 #27

ajunB7 opened this issue Apr 6, 2021 · 1 comment

Comments

@ajunB7
Copy link

ajunB7 commented Apr 6, 2021

Any one else see something similar? works in 2.5.3. Using rvm to install 2.7.1. All other gems seem to be just fine.

current directory: /Users/ab/.rvm/gems/ruby-2.7.1/gems/digest-crc-0.6.3/ext/digest
["/Users/ab/.rvm/rubies/ruby-2.7.1/bin/ruby", "-I/Users/ab/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems", "-rrubygems", "/Users/ab/.rvm/gems/ruby-2.7.1/gems/rake-13.0.3/exe/rake", "RUBYARCHDIR=/Users/ab/.rvm/gems/ruby-2.7.1/extensions/x86_64-darwin-20/2.7.0/digest-crc-0.6.3", "RUBYLIBDIR=/Users/ab/.rvm/gems/ruby-2.7.1/extensions/x86_64-darwin-20/2.7.0/digest-crc-0.6.3"]
/Users/ab/.rvm/rubies/ruby-2.7.1/bin/ruby -S extconf.rb
checking for stdint.h... yes
checking for stddef.h... yes
creating extconf.h
creating Makefile
rake aborted!
Errno::EINTR: Interrupted system call @ dir_chdir - /Users/ab/.rvm/gems/ruby-2.7.1/gems/digest-crc-0.6.3/ext/digest
/Users/ab/.rvm/gems/ruby-2.7.1/gems/digest-crc-0.6.3/ext/digest/Rakefile:23:in `chdir'
/Users/ab/.rvm/gems/ruby-2.7.1/gems/digest-crc-0.6.3/ext/digest/Rakefile:23:in `block (2 levels) in <top (required)>'
/Users/ab/.rvm/gems/ruby-2.7.1/gems/rake-13.0.3/exe/rake:27:in `<main>'
Tasks: TOP => default => crc16_genibus/crc16_genibus_ext.bundle => crc16_genibus/Makefile
(See full trace by running task with --trace)
ERROR:  Error installing digest-crc:
	ERROR: Failed to build gem native extension.

    current directory: /Users/ab/.rvm/gems/ruby-2.7.1/gems/digest-crc-0.6.3/ext/digest
/Users/ab/.rvm/rubies/ruby-2.7.1/bin/ruby -I/Users/ab/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems -rrubygems /Users/ab/.rvm/gems/ruby-2.7.1/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=/Users/ab/.rvm/gems/ruby-2.7.1/extensions/x86_64-darwin-20/2.7.0/digest-crc-0.6.3 RUBYLIBDIR\=/Users/ab/.rvm/gems/ruby-2.7.1/extensions/x86_64-darwin-20/2.7.0/digest-crc-0.6.3
Building has failed. See above output for more information on the failure.
rake failed, exit code 1

Gem files will remain installed in /Users/ab/.rvm/gems/ruby-2.7.1/gems/digest-crc-0.6.3 for inspection.
Results logged to /Users/ab/.rvm/gems/ruby-2.7.1/extensions/x86_64-darwin-20/2.7.0/digest-crc-0.6.3/gem_make.out
@ajunB7
Copy link
Author

ajunB7 commented Apr 6, 2021

Adding a sleep in Rakefile seems to help build for spec at least. No clue why.

  file "#{crc}/#{crc_ext_lib}" => "#{crc}/Makefile" do
    Dir.chdir(crc) do
      begin
        sh 'make', 'clean'
        sh 'make'
      rescue
        fail_gracefully "Unable to build C extensions"
      end
      sleep(1) # this helps? No idea why
    end
  end

@ajunB7 ajunB7 changed the title dir_chdir Error when installing to ruby 2.7.1 (works in 2.5.3) macOS BigSur dir_chdir error when installing to ruby 2.7.1 (works in 2.5.3) Apr 6, 2021
@ajunB7 ajunB7 changed the title macOS BigSur dir_chdir error when installing to ruby 2.7.1 (works in 2.5.3) macOS BigSur dir_chdir error when installing to ruby 2.7.1 Apr 6, 2021
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

1 participant