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

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

Closed
jbk2 opened this issue Nov 9, 2022 · 20 comments
Closed

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

jbk2 opened this issue Nov 9, 2022 · 20 comments

Comments

@jbk2
Copy link

jbk2 commented Nov 9, 2022

- 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: ""
`

@iAaquibjawed
Copy link

#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

@jbk2
Copy link
Author

jbk2 commented Nov 9, 2022

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.

@Pralish
Copy link

Pralish commented Nov 11, 2022

@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

@jbk2
Copy link
Author

jbk2 commented Nov 11, 2022

@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.

@iAaquibjawed
Copy link

iAaquibjawed commented Nov 11, 2022

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.

@jbk2
Copy link
Author

jbk2 commented Nov 11, 2022

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

@Pralish
Copy link

Pralish commented Nov 11, 2022

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.

@dpaola2
Copy link

dpaola2 commented Dec 8, 2022

Were you able to get this working?

@RuturajBisure
Copy link

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

@dpaola2
Copy link

dpaola2 commented Dec 9, 2022 via email

@iAaquibjawed
Copy link

iAaquibjawed commented Dec 9, 2022

-> 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

@ryudoawaru
Copy link

-> 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

@hanumap
Copy link

hanumap commented Dec 22, 2022

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

@pragun16
Copy link

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:
asdf-vm/asdf-ruby#301 (comment)

@ps-hmad
Copy link

ps-hmad commented Oct 7, 2023

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]

@BaggioGiacomo
Copy link

BaggioGiacomo commented Oct 10, 2023

This has helped me, give it a try 😉: #4559 (comment)

@mathieujobin
Copy link
Contributor

2.6.8 instead?

1 similar comment
@mathieujobin
Copy link
Contributor

2.6.8 instead?

@ignaciodelrio
Copy link

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!!

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

No branches or pull requests