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

Error running '__rvm_make -j4' ruby 2.2.4 Ubuntu 18.04 #4370

Open
kewogc opened this issue Apr 30, 2018 · 4 comments
Open

Error running '__rvm_make -j4' ruby 2.2.4 Ubuntu 18.04 #4370

kewogc opened this issue Apr 30, 2018 · 4 comments

Comments

@kewogc
Copy link

kewogc commented Apr 30, 2018

Description

Fail compile 2.2.4 ruby on Ubuntu 18.04 LTS

Steps to reproduce

  1. Install clear Ubuntu 18.04 LTS
  2. \curl -sSL https://get.rvm.io | bash -s stable --ruby
  3. rvm install 2.2.4

Actual behavior

$ rvm install 2.2.4
ruby-2.2.4 - #removing src/ruby-2.2.4..
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/18.04/x86_64/ruby-2.2.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system....
Installing required packages: libreadline6-dev...
Requirements installation successful.
Installing Ruby from source to: /home/kew/.rvm/rubies/ruby-2.2.4, this may take a while depending on your cpu(s)...
ruby-2.2.4 - #downloading ruby-2.2.4, this may take a while depending on your connection...
ruby-2.2.4 - #extracting ruby-2.2.4 to /home/kew/.rvm/src/ruby-2.2.4....
ruby-2.2.4 - #applying patch /home/kew/.rvm/patches/ruby/2.2.4/fix_installing_bundled_gems.patch.
ruby-2.2.4 - #applying patch /home/kew/.rvm/patches/ruby/2.2.4/openssl3.patch.
ruby-2.2.4 - #configuring.........................................................
ruby-2.2.4 - #post-configuration..
ruby-2.2.4 - #compiling...............................................................................................................................................
Error running '__rvm_make -j4',
please read /home/kew/.rvm/log/1525092603_ruby-2.2.4/make.log
There has been an error while running make. Halting the installation.

make.log

/home/kew/.rvm/log/1525092603_ruby-2.2.4/make.log

Environment info

`
ruby-2.4.1:

system:
uname: "Linux pc 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux"
name: "Ubuntu"
version: "18.04"
architecture: "x86_64"
bash: "/bin/bash => GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
remote_path: "ubuntu/18.04/x86_64"

rvm:
version: "1.29.3 (latest)"
updated: "2 hours 29 minutes 39 seconds ago"
path: "/home/kew/.rvm"
autolibs: "[4] 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-linux"
patchlevel: "2017-03-22 revision 58053"
full_version: "ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]"

homes:
gem: "/home/kew/.rvm/gems/ruby-2.4.1"
ruby: "/home/kew/.rvm/rubies/ruby-2.4.1"

binaries:
ruby: "/home/kew/.rvm/rubies/ruby-2.4.1/bin/ruby"
irb: "/home/kew/.rvm/rubies/ruby-2.4.1/bin/irb"
gem: "/home/kew/.rvm/rubies/ruby-2.4.1/bin/gem"
rake: "/home/kew/.rvm/rubies/ruby-2.4.1/bin/rake"

environment:
PATH: "/home/kew/.rvm/gems/ruby-2.4.1/bin:/home/kew/.rvm/gems/ruby-2.4.1@global/bin:/home/kew/.rvm/rubies/ruby-2.4.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/kew/.rvm/bin"
GEM_HOME: "/home/kew/.rvm/gems/ruby-2.4.1"
GEM_PATH: "/home/kew/.rvm/gems/ruby-2.4.1:/home/kew/.rvm/gems/ruby-2.4.1@global"
MY_RUBY_HOME: "/home/kew/.rvm/rubies/ruby-2.4.1"
IRBRC: "/home/kew/.rvm/rubies/ruby-2.4.1/.irbrc"
RUBYOPT: ""
gemset: ""

`

@Sohair63
Copy link

Sohair63 commented Jul 7, 2018

for macOS high Sierra 10.13

i was getting

Error running '__rvm_make -j8',
please read /Users/sohair/.rvm/log/1530945891_ruby-2.3.6/make.log
There has been an error while running make. Halting the installation.

this is the content of the file make.log

cat /Users/sohair/.rvm/log/1530945891_ruby-2.3.6/make.log
[2018-07-06 23:46:04] __rvm_make
__rvm_make () 
{ 
    \make "$@" || return $?
}
current path: /Users/sohair/.rvm/src/ruby-2.3.6
PATH=/Users/sohair/.rvm/usr/bin:/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/sohair/Library/Python/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/opt/qt@5.5/bin:/usr/local/opt/imagemagick@6/bin:/usr/local/opt/imagemagick@6/bin:/Users/sohair/.rbenv/bin:/usr/local/bin:/usr/local/opt/dirmngr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sohair/.rvm/bin:/Users/sohair/.rvm/bin
command(2): __rvm_make -j8
++ make -j8
	CC = gcc
	LD = ld
	LDSHARED = gcc -dynamiclib
	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens   -fno-common -pipe 
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
	CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin17 -I./include -I.
	DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -install_name /Users/sohair/.rvm/rubies/ruby-2.3.6/lib/libruby.2.3.0.dylib -compatibility_version 2.3 -current_version 2.3.6  -fstack-protector -Wl,-u,_objc_msgSend -framework CoreFoundation  -fstack-protector -Wl,-u,_objc_msgSend -framework CoreFoundation  
	SOLIBS = -lpthread -lgmp -ldl -lobjc 
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
translating probes probes.d
compiling main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
compiling bignum.c
compiling class.c
compiling compar.c
. ./vm_opts.h
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling encoding.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
In file included from file.c:23:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:13:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
#       error Never include this file directly. Use <lzma.h> instead.
        ^
/usr/local/include/Block.h:93:2: error: unknown type name 'lzma_check'
        lzma_check check;
        ^
/usr/local/include/Block.h:148:2: error: unknown type name 'lzma_vli'
        lzma_vli compressed_size;
        ^
/usr/local/include/Block.h:172:2: error: unknown type name 'lzma_vli'
        lzma_vli uncompressed_size;
        ^
/usr/local/include/Block.h:200:2: error: unknown type name 'lzma_filter'
        lzma_filter *filters;
        ^
/usr/local/include/Block.h:217:20: error: use of undeclared identifier 'LZMA_CHECK_SIZE_MAX'
        uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
                          ^
/usr/local/include/Block.h:231:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int3;
        ^
/usr/local/include/Block.h:232:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int4;
        ^
/usr/local/include/Block.h:233:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int5;
        ^
/usr/local/include/Block.h:234:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int6;
        ^
/usr/local/include/Block.h:235:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int7;
        ^
/usr/local/include/Block.h:236:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int8;
        ^
/usr/local/include/Block.h:237:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum1;
        ^
/usr/local/include/Block.h:238:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum2;
        ^
/usr/local/include/Block.h:239:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum3;
        ^
/usr/local/include/Block.h:240:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum4;
        ^
/usr/local/include/Block.h:261:2: error: unknown type name 'lzma_bool'
        lzma_bool ignore_check;
        ^
/usr/local/include/Block.h:263:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool2;
        ^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool3;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
eval.c:776:8: warning: unused variable 'mid' [-Wunused-variable]
    ID mid = me->called_id;
       ^
compiling hash.c
20 errors generated.
make: *** [file.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
++ return 2

after applying so many solution I finally found sudo mv /usr/local/include /usr/local/include_old somewhere after which rvm install x.x.x worked.

@ChigboIO
Copy link

@Sohair63 – You solution works perfectly for me as well. Thank you.

@Sohair63
Copy link

@ChigboIO I'm glad it helped.

This error can also be resolved with this technique.

$ rvm pkg install openssl
$ rvm remove x.x.x
$ rvm install x.x.x -C --with-openssl-dir=$HOME/.rvm/usr

zhengphou added a commit to travis-ci/packer-templates that referenced this issue May 20, 2019
to make it link to ssl lib properply, it's a known issue from rvm
upstream
 rvm/rvm#4370
@srvance
Copy link

srvance commented Dec 5, 2019

@Sohair63 So it sounds like the conflicting headers are in /usr/local/include because of an installation of openssl? Any idea where that might have come from?

Moving /usr/local/include makes it so I can build rubies, but messes up homebrew. I can re-create the directory, but I'll also have to manually re-link the existing homebrew headers. If I do the local openssl trick, I have to remember that for every install.

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

4 participants