rvm
rvm copied to clipboard
Facing the error '__rvm_make -j4'
I have already looked into the solution available in the other reported issues but the issue persist
Similar
MBA Mac M2 Ventura 13.5.2 (22G91)
rvm install 3.3
Warning! PATH is not properly set up, /Users/scott/.rvm/gems/ruby-3.0.4/bin is not at first place.
Usually this is caused by shell initialization files. Search for PATH=... entries.
You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
To fix it temporarily in this shell session run: rvm use ruby-3.0.4
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
ruby-3.3.0 - #removing src/ruby-3.3.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.5/arm64/ruby-3.3.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/opt/homebrew/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/scott/.rvm/rubies/ruby-3.3.0, this may take a while depending on your cpu(s)...
ruby-3.3.0 - #downloading ruby-3.3.0, this may take a while depending on your connection...
ruby-3.3.0 - #extracting ruby-3.3.0 to /Users/scott/.rvm/src/ruby-3.3.0 - please wait
ruby-3.3.0 - #autogen.sh - please wait
ruby-3.3.0 - #configuring - please wait
ruby-3.3.0 - #post-configuration - please wait
ruby-3.3.0 - #compiling - please wait
Error running '__rvm_make -j8',
please read /Users/scott/.rvm/log/1703599753_ruby-3.3.0/make.log
There has been an error while running make. Halting the installation.
make.log has lots of:
In file included from ./ossl.h:175:
./openssl_missing.h:195:11: warning: 'TS_VERIFY_CTS_set_certs' macro redefined [-Wmacro-redefined]
# define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
^
/opt/homebrew/Cellar/openssl@3/3.1.4/include/openssl/ts.h:426:11: note: previous definition is here
# define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
^
1 warning generated.
In file included from ./ossl.h:175:
./openssl_missing.h:195:11: warning: 'TS_VERIFY_CTS_set_certs' macro redefined [-Wmacro-redefined]
# define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
^
/opt/homebrew/Cellar/openssl@3/3.2.0_1/include/openssl/ts.h:426:11: note: previous definition is here
# define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
^
ossl_hmac.c:249:35: error: incomplete definition of type 'struct evp_md_ctx_st'
pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_get_pkey_ctx(ctx));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./openssl_missing.h:230:41: note: expanded from macro 'EVP_MD_CTX_get_pkey_ctx'
# define EVP_MD_CTX_get_pkey_ctx(x) (x)->pctx
~~~^
/opt/homebrew/Cellar/openssl@3/3.2.0_1/include/openssl/types.h:107:16: note: forward declaration of 'struct evp_md_ctx_st'
typedef struct evp_md_ctx_st EVP_MD_CTX;
^
1 warning and 1 error generated.
Updated openssl and had same result
Same error under macos 14.2.1 23.2.0 Darwin Kernel Version 23.2.0:
OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)
But suddenly this compiles ruby:
wget https://ftp.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.tar.gz
cd ruby-3.3.0 && ./configure && make
This helped me to install ruby-3.3.0 by rvm: https://github.com/rbenv/homebrew-tap/issues/9
rvm install 3.3.0 --with-openssl-dir=`brew --prefix openssl@3
I have also faced this same error while installing ruby-2.6.2
using rvm
, and tried many solutions but at last, this worked for me 🎉
# check if you have installed [email protected]
brew list | grep [email protected]
# if not installed, install it via this 👇 command
brew install [email protected]
# Unlink the openssl@3, you can also find via brew list | grip openssl@3
brew unlink openssl@3
# Link the downgraded [email protected]
brew link [email protected]
# Finally Install your required ruby version
rvm install 2.6.2
Below are the logs and errors
ruby-2.6.2 - #removing src/ruby-2.6.2 - please wait
Checking requirements for osx.
Certificates bundle '/usr/local/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/mac/.rvm/rubies/ruby-2.6.2, this may take a while depending on your cpu(s)...
ruby-2.6.2 - #downloading ruby-2.6.2, this may take a while depending on your connection...
ruby-2.6.2 - #extracting ruby-2.6.2 to /Users/mac/.rvm/src/ruby-2.6.2 - please wait
ruby-2.6.2 - #configuring - please wait
ruby-2.6.2 - #post-configuration - please wait
ruby-2.6.2 - #compiling - please wait
Error running '__rvm_make -j4',
please read /Users/mac/.rvm/log/1704123979_ruby-2.6.2/make.log
There has been an error while running make. Halting the installation.
__rvm_make:0> make -j4
BASERUBY = /usr/bin/ruby --disable=gems
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arit$
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN
CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/[email protected]/include -D_XOPEN_SOURCE -$
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/lo$
SOLIBS = -lpthread -lgmp -ldl -lobjc
LANG =
LC_ALL =
LC_CTYPE = UTF-8
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
translating probes probes.d
compiling ast.c
compiling bignum.c
. ./vm_opts.h
compiling class.c
compiling compar.c
ast.c:132:19: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
rb_funcall(f, rb_intern("set_encoding"), 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-"));
^~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:1826:23: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
./include/ruby/ruby.h:2602:20: note: expanded from macro 'rb_funcall'
rb_funcallv(recv, mid, \
^~~
ast.c:132:19: note: '{' token is here
rb_funcall(f, rb_intern("set_encoding"), 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-"));
This appears to be because of RVM installs OpenSSL v1.1, but that hit EOL in September of last year. If you have OpenSSL v3 installed it messes with what is expected here, I think. There may be ways around it, but I'm not sure at the moment.