Rvm: Error running '__rvm_make -j 1',

Created on 3 Jun 2017  路  4Comments  路  Source: rvm/rvm

Description

After having run 'rvm requirements', I am unable to use rvm or do a gem install. The problem appears to be that rvm installed a version of openssl that breaks the usage via homebrew.

Steps to reproduce

  1. I am on a MacBook Pro running Sierra (10.12.4). I have Homebrew 1.2.1-175-g98959f1 and RVM 1.29.1.
  2. I ran the command "rvm requirements" and it installed a version of openssl. Here is the output:
    ==> Upgrading 1 outdated package, with result:
    [email protected] 1.1.0f
    ==> Upgrading [email protected]
    ==> Downloading https://homebrew.bintray.com/bottles/[email protected]
    ################################################################## 100.0%

==> Pouring [email protected]

  1. ...

Expected behavior

I expected rvm to continue to work properly as well as Homebrew.

Actual behavior

1.) Following the 'rvm requirements' command, I tried to do a gem install ('gem install rspec') and got this error:
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS
sources

2.) Because it had worked for me in the past, I deleted all versions of openssl:
Cellar swskinner$ rm -rf openssl
Cellar swskinner$ rm -rf openssl1098
Cellar swskinner$ rm -rf [email protected]

3) I then ran "brew install openssl". It installed but I still could not run "gem install rspec".

4.) On StackOverflow, I found the suggestion to run:
"rvm reinstall 2.4.1 --with-openssl-dir=brew --prefix openssl "

This generated the following error:

ruby-2.4.1 -
#compiling..................................................................................................................................|
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/swskinner/.rvm/log/1496520345_ruby-2.4.1/make.log
^~~~~~~
ossl_ssl.c:14:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
^
~~
ossl_ssl.c:2609:21: error: invalid application of 'sizeof' to an incomplete type 'const struct
(anonymous struct at ossl_ssl.c:52:14) []'
for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
^~~~~~~
ossl_ssl.c:14:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
^
~~
62 warnings and 9 errors generated.
make[2]: * [ossl_ssl.o] Error 1
make[1]:
[ext/openssl/all] Error 2
make: *
* [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.

5.) I tried again with this alternative command:
"rvm reinstall 2.4.1 --with-openssl-dir=/usr/local/opt/openssl" but I get verbatim the same output error.

6.) For the past six months or so, I have been wrestling with these sorts of errors while trying to use rvm. I get eventually get thing to work, but it seems as if there is something fundamentally incompatible between my install of homebrew and my install of rvm. They fight each other it seems.

7.) Thanks in advance for any advice you can give.

Environment info

swskinner$ rvm info

ruby-2.4.1:

system:
uname: "Darwin Kartikay.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64"
name: "OSX"
version: "10.12"
architecture: "x86_64"
bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)"
zsh: "/bin/zsh => zsh 5.2 (x86_64-apple-darwin16.0)"
remote path: "osx/10.12/x86_64"

rvm:
version: "rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]"
updated: "2 days 7 hours 4 minutes 38 seconds ago"
path: "/Users/swskinner/.rvm"
autolibs: "[enable] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

ruby:
interpreter: "ruby"
version: "2.4.1p111"
date: "2017-03-22"
platform: "x86_64-darwin16"
patchlevel: "2017-03-22 revision 58053"
full_version: "ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]"

homes:
gem: "/Users/swskinner/.rvm/gems/ruby-2.4.1"
ruby: "/Users/swskinner/.rvm/rubies/ruby-2.4.1"

binaries:
ruby: "/usr/local/bin/ruby"
irb: "/usr/local/bin/irb"
gem: "/usr/local/bin/gem"
rake: "/usr/local/bin/rake"

environment:
PATH: "/Users/swskinner/.rvm/gems/ruby-2.4.1/bin:/Users/swskinner/.rvm/gems/ruby-2.4.1@global/bin:/Users/swskinner/.rvm/rubies/ruby-2.4.1/bin:/Users/swskinner/.rvm/bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/local/sbin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin"
GEM_HOME: "/Users/swskinner/.rvm/gems/ruby-2.4.1"
GEM_PATH: "/Users/swskinner/.rvm/gems/ruby-2.4.1:/Users/swskinner/.rvm/gems/ruby-2.4.1@global"
MY_RUBY_HOME: "/Users/swskinner/.rvm/rubies/ruby-2.4.1"
IRBRC: "/Users/swskinner/.rvm/rubies/ruby-2.4.1/.irbrc"
RUBYOPT: ""
gemset: ""

feedback needed macos

Most helpful comment

@samskinnerphd this helped me to manage to install 2.4.0: https://stackoverflow.com/questions/41946652/setup-rvm-ruby-on-mac-os-x-sierra-unable-to-require-openssl/41971211

Since it seems that Ruby >= 2.4 requires [email protected] to compile in OSX, I had to fix the following env variables:

That, together with enabling rvm autolibs homebrew, let me install Ruby 2.4.0.

I hope it helps.

All 4 comments

same issue here

@samskinnerphd this helped me to manage to install 2.4.0: https://stackoverflow.com/questions/41946652/setup-rvm-ruby-on-mac-os-x-sierra-unable-to-require-openssl/41971211

Since it seems that Ruby >= 2.4 requires [email protected] to compile in OSX, I had to fix the following env variables:

That, together with enabling rvm autolibs homebrew, let me install Ruby 2.4.0.

I hope it helps.

can someone try it again after:

rvm get master

I got a feeling some of the problems might be addressed already

Closing due lack of feedback. Please reopen if needed...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haimsc picture haimsc  路  3Comments

COAB1 picture COAB1  路  3Comments

BrianHawley picture BrianHawley  路  3Comments

ain picture ain  路  3Comments

muzzotech picture muzzotech  路  3Comments