rvm icon indicating copy to clipboard operation
rvm copied to clipboard

'__rvm_make -j8 error' on rvm install 2.6.1 (M1 MBPro, Ventura 13.0)

Open jbk2 opened this issue 3 years ago • 20 comments

- When trying to `rvm install 'ruby-2.6.1' I get the following error message:

"Error running '__rvm_make -j8', please read /Users/jamesbkemp/.rvm/log/1668005178_ruby-2.6.1/make.log

There has been an error while running make. Halting the installation."

Note that directly after rvm install command is given the following warning is printed out:

'No binary rubies available for: osx/13.0/x86_64/ruby-2.6.1. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.'

The last few lines from the 'make.log' file are:

(gist for entire file here)

`Undefined symbols for architecture x86_64: "__mh_execute_header", referenced from: _rb_dump_backtrace_with_lines in addr2line.o ld: symbol(s) not found for architecture x86_64

Transforming external functions to static: transform_mjit_header: making external definition of 'Init_vm_stack_canary' static inline transform_mjit_header: making external definition of 'rb_vm_opt_struct_aset' static inline ... transform_mjit_header: SKIPPED to transform __darwin_check_fd_set transform_mjit_header: SKIPPED to transform __sputc clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libruby.2.6.dylib] Error 1 make: *** Waiting for unfinished jobs.... ln -sf ../../../.ext/include/x86_64-darwin22/rb_mjit_min_header-2.6.1.h include/ruby-2.6.0/x86_64-darwin22/rb_mjit_min_header-2.6.1.h +__rvm_make:0> return 2 `

Attempted fixes:

  • rvm get stable - did not fix my error.
  • Carried out the homebrew reinstall and related steps as per this user's suggestion against another seemingly similar rvm error - did not fix my error.
  • Added flags to the .zshrc file as advised here on similar issue - did not fix my error.

rvm info returns:

`name: "OSX" version: "13.0" architecture: "x86_64" bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin22)" zsh: "/bin/zsh => zsh 5.8.1 (x86_64-apple-darwin22.0)" remote_path: "osx/13.0/x86_64" xcode: ""

rvm: version: "1.29.12 (latest)" updated: "3 minutes 25 seconds ago" path: "/Users/jamesbkemp/.rvm" autolibs: "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

ruby: interpreter: "ruby" version: "3.1.2p20" date: "2022-04-12" platform: "arm64-darwin21" patchlevel: "2022-04-12 revision 4491bb740a" full_version: "ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]"

homes: gem: "/Users/jamesbkemp/.rvm/gems/ruby-3.1.2" ruby: "/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2"

binaries: ruby: "/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2/bin/ruby" irb: "/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2/bin/irb" gem: "/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2/bin/gem" rake: "/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2/bin/rake"

environment: PATH: "/Users/jamesbkemp/.rvm/gems/ruby-3.1.2/bin:/Users/jamesbkemp/.rvm/gems/ruby-3.1.2@global/bin:/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jamesbkemp/.rvm/bin" GEM_HOME: "/Users/jamesbkemp/.rvm/gems/ruby-3.1.2" GEM_PATH: "/Users/jamesbkemp/.rvm/gems/ruby-3.1.2:/Users/jamesbkemp/.rvm/gems/ruby-3.1.2@global" MY_RUBY_HOME: "/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2" IRBRC: "/Users/jamesbkemp/.rvm/rubies/ruby-3.1.2/.irbrc" RUBYOPT: "" gemset: "" `

jbk2 avatar Nov 09 '22 15:11 jbk2

#use the below instruction step by step #open the ~/.zshrc nano ~/.zshrc #copy and paste the below lines in you ~/.zshrc file export RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC export optflags="-Wno-error=implicit-function-declaration"

to come out of this press ctrl + o > enter> ctrl +x source ~/.zshrc rvm install 2.6.6

#please update if your issue is resolved

iAaquibjawed avatar Nov 09 '22 16:11 iAaquibjawed

As listed in the 'attempted fixes' section of my issue post @iAaquibjawed I have already tried your add to .zshrc suggestion, and this unfortunately did not stop the error.

jbk2 avatar Nov 09 '22 16:11 jbk2

@jbk2 , There has be some better solutions but downgrading xcode to 13.4 fixed the issue for me.

References: asdf-vm/asdf-ruby#301 https://www.rubyonmac.dev/how-to-install-ruby-on-macos-12-6-apple-silicon#install-ruby-with-v13-of-the-command-line-tools

Pralish avatar Nov 11 '22 04:11 Pralish

@jbk2 , There has be some better solutions but downgrading xcode to 13.4 fixed the issue for me.

Thanks @Pralish, I'm trying to go through this process now, the issue I've now hit is that my OSX version (Ventura 13.0.1) will not allow the older xcode 13.6 to run due to compatability issues. Currently unsure if there is a way around this OS13.0.1. vs xcode 13.6 issue. Would of course rather a better solution than this xcode version workaround, but unfortunately I;ve no idea what it is.

jbk2 avatar Nov 11 '22 09:11 jbk2

rvm install 2.6.1 --with-out-ext=fiddle try this or you can first install fiddle then install the required ruby for installing fiddle use the below link https://docs.telerik.com/fiddler-everywhere/get-started/quickstart-macos#:~:text=Step%201%3A%20Install%20Fiddler%20Everywhere,to%20start%20the%20installation%20process.

iAaquibjawed avatar Nov 11 '22 10:11 iAaquibjawed

rvm install 2.6.1 --with-out-ext=fiddle try this Does not work unfortunately @iAaquibjawed.

jbk2 avatar Nov 11 '22 11:11 jbk2

Thanks @Pralish, I'm trying to go through this process now, the issue I've now hit is that my OSX version (Ventura 13.0.1) will not allow the older xcode 13.6 to run due to compatability issues. Currently unsure if there is a way around this OS13.0.1. vs xcode 13.6 issue. Would of course rather a better solution than this xcode version workaround, but unfortunately I;ve no idea what it is.

@jbk2 , The xcode will throw an error when you try to open it. But the thing is you don't need to open xcode. Just move xcode from where you downloaded to Applications. Do check the xcode version afterwards with brew config.

Yeah, It sounds crazy but I couldn't make it work any other way 😅. Please drop a comment if you find any other solutions.

Pralish avatar Nov 11 '22 13:11 Pralish

Were you able to get this working?

dpaola2 avatar Dec 08 '22 17:12 dpaola2

@jbk2 are you able to fix this? I am getting same issue with Ventura 13.0.1 with m2.

RuturajBisure avatar Dec 09 '22 05:12 RuturajBisure

No

On Thu, Dec 8, 2022 at 9:36 PM Ruturaj Bisure @.***> wrote:

@jbk2 https://github.com/jbk2 are you able to fix this? I am getting same issue with Ventura 13.0.1 with m2.

— Reply to this email directly, view it on GitHub https://github.com/rvm/rvm/issues/5266#issuecomment-1343874985, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEX3J4BOSQEHFO3DPQ3ILWMLAMRANCNFSM6AAAAAAR3RBRSY . You are receiving this because you commented.Message ID: @.***>

-- Dave Paola https://davepaola.com

dpaola2 avatar Dec 09 '22 05:12 dpaola2

-> nano ~/.zshrc #copy and paste the below lines -> export PATH="$(brew --prefix)/opt/[email protected]/bin:$PATH" -> export LDFLAGS="-L$(brew --prefix)/opt/[email protected]/lib" -> export CPPFLAGS="-I$(brew --prefix)/opt/[email protected]/include" -> export PKG_CONFIG_PATH="$(brew --prefix)/opt/[email protected]/lib/pkgconfig" -> rvm install 2.6.1 #if still getting error of j8 copy and paste again the below lines make sure to reload your terminal when you make changes in your ~/.zshrc file -> export RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC -> export optflags="-Wno-error=implicit-function-declaration" -> source ~/.zshrc -> rvm install 2.6.1 #please update here if your query resolved

iAaquibjawed avatar Dec 09 '22 06:12 iAaquibjawed

-> nano ~/.zshrc #copy and paste the below lines -> export PATH="$(brew --prefix)/opt/[email protected]/bin:$PATH" -> export LDFLAGS="-L$(brew --prefix)/opt/[email protected]/lib" -> export CPPFLAGS="-I$(brew --prefix)/opt/[email protected]/include" -> export PKG_CONFIG_PATH="$(brew --prefix)/opt/[email protected]/lib/pkgconfig" -> rvm install 2.6.1 #if still getting error of j8 copy and paste again the below lines make sure to reload your terminal when you make changes in your ~/.zshrc file -> export RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC -> export optflags="-Wno-error=implicit-function-declaration" -> source ~/.zshrc -> rvm install 2.6.1 #please update here if your query resolved

still got same errors

ryudoawaru avatar Dec 11 '22 07:12 ryudoawaru

please follow this https://stackoverflow.com/questions/73976833/error-running-rvm-make-j10-while-installing-ruby-2-6-5-on-mac

iAaquibjawed avatar Dec 11 '22 07:12 iAaquibjawed

not working... I tried to install 2.6.10...its throwing same issue Error: ruby-2.6.10 - #post-configuration - please wait ruby-2.6.10 - #compiling - please wait Error running '__rvm_make -j8', please read /Users/xxxxxxx/.rvm/log/1671577997_ruby-2.6.10/make.log

hanumap avatar Dec 22 '22 16:12 hanumap

This worked for me (ruby 2.6.10 on M1 mac Ventura 13.2.1):

  • uninstall rvm & install asdf
  • export optflags="-w"
  • asdf install ruby 2.6.6

Source: https://github.com/asdf-vm/asdf-ruby/issues/301#issuecomment-1447506587

pragun16 avatar Mar 17 '23 23:03 pragun16

I had a similar issue on my mac m1 air 2020 with Ventura 13.5.2. The problem is with openssl default version. You have to bind it with ruby installation along with homebrew. If you bind it without brew you might get errors. So here is my solution that worked for me. rvm install ruby-3.2.2 --with-openssl-dir=/opt/homebrew/opt/[email protected]

ps-hmad avatar Oct 07 '23 06:10 ps-hmad

This has helped me, give it a try 😉: https://github.com/rvm/rvm/issues/4559#issuecomment-450759931

BaggioGiacomo avatar Oct 10 '23 08:10 BaggioGiacomo

2.6.8 instead?

mathieujobin avatar Oct 11 '23 00:10 mathieujobin

2.6.8 instead?

mathieujobin avatar Oct 11 '23 00:10 mathieujobin

I had a similar issue on my mac m1 air 2020 with Ventura 13.5.2. The problem is with openssl default version. You have to bind it with ruby installation along with homebrew. If you bind it without brew you might get errors. So here is my solution that worked for me. rvm install ruby-3.2.2 --with-openssl-dir=/opt/homebrew/opt/[email protected]

This worked for me!! I've been searching how to fix it for 2 days, thanks a lot!!

ignaciodelrio avatar Oct 11 '23 02:10 ignaciodelrio