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

Installation fails on Ubuntu 18.04 running Ruby 2.6.3 #31

Open
sjayanna opened this issue Oct 19, 2019 · 4 comments
Open

Installation fails on Ubuntu 18.04 running Ruby 2.6.3 #31

sjayanna opened this issue Oct 19, 2019 · 4 comments

Comments

@sjayanna
Copy link

sjayanna commented Oct 19, 2019

The jaro_winkler gem is failing to install on Ubuntu 18:04 using Ruby 2.6.3 but installs just fine if I revert back to Ruby 2.5.3. I was originally trying to install rubocop and this error popped up.

Building native extensions. This could take a while...
ERROR:  Error installing rubocop:
	ERROR: Failed to build gem native extension.

    current directory: /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3/ext/jaro_winkler
/home/sjayanna/.rvm/rubies/ruby-2.6.3/bin/ruby -I /home/sjayanna/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20191018-14011-1xlq2d.rb extconf.rb
creating Makefile

current directory: /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3/ext/jaro_winkler
make "DESTDIR=" clean

current directory: /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3/ext/jaro_winkler
make "DESTDIR="
compiling adj_matrix.c
gcc: error: unrecognized command line option '-Wduplicated-cond'
gcc: error: unrecognized command line option '-Wmisleading-indentation'
gcc: error: unrecognized command line option '-Wrestrict'
gcc: error: unrecognized command line option '-Wimplicit-fallthrough=0'
Makefile:243: recipe for target 'adj_matrix.o' failed
make: *** [adj_matrix.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3 for inspection.
Results logged to /home/sjayanna/.rvm/gems/ruby-2.6.3/extensions/x86_64-linux/2.6.0/jaro_winkler-1.5.3/gem_make.out```
@tonytonyjan
Copy link
Owner

Hi, @sjayanna, thanks for reporting this issue, unfortunately, I am not able to reproduce with the following Dockerfile.

FROM ubuntu:18.04

RUN apt-get update
RUN apt install -y curl autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
RUN curl https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.gz | tar -xz
RUN cd ruby-2.6.3 && ./configure --disable-install-doc && make install
RUN gem install jaro_winkler
CMD ruby -r jaro_winkler -e 'puts JaroWinkler.distance "tony", "tomy"'

It would be great if you can provide some instructions which can consistenly reportduce the issue.

@sjayanna
Copy link
Author

sjayanna commented Oct 20, 2019

Hi, @tonytonyjan Please see the below debugging information with ruby and linux version. I have installed all the dependencies you did. Maybe the ruby version?Which version of ruby did you pull above?

>> sudo apt install -y curl autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
[sudo] password for sjayanna: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libreadline-dev' instead of 'libreadline6-dev'
autoconf is already the newest version (2.69-11).
autoconf set to manually installed.
bison is already the newest version (2:3.0.4.dfsg-1build1).
build-essential is already the newest version (12.4ubuntu1).
libffi-dev is already the newest version (3.2.1-8).
libgdbm-dev is already the newest version (1.14.1-6).
libgdbm5 is already the newest version (1.14.1-6).
libreadline-dev is already the newest version (7.0-3).
libyaml-dev is already the newest version (0.1.7-2ubuntu3).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
curl is already the newest version (7.58.0-2ubuntu3.8).
libncurses5-dev is already the newest version (6.1-1ubuntu1.18.04).
libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

[~/code/playground/jaro_winkler] ○                                                                 [ruby-2.6.3] [08:58:55]
>> lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic
[~/code/playground/jaro_winkler] ○                                                                 [ruby-2.6.3] [08:58:58]
>> ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

[~/code/playground/jaro_winkler] ○                                                                 [ruby-2.6.3] [08:59:06]
>> gem install jaro_winkler
Building native extensions. This could take a while...
ERROR:  Error installing jaro_winkler:
	ERROR: Failed to build gem native extension.

    current directory: /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3/ext/jaro_winkler
/home/sjayanna/.rvm/rubies/ruby-2.6.3/bin/ruby -I /home/sjayanna/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20191020-24878-19m9yr8.rb extconf.rb
creating Makefile

current directory: /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3/ext/jaro_winkler
make "DESTDIR=" clean

current directory: /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3/ext/jaro_winkler
make "DESTDIR="
compiling adj_matrix.c
gcc: error: unrecognized command line option '-Wduplicated-cond'
gcc: error: unrecognized command line option '-Wmisleading-indentation'
gcc: error: unrecognized command line option '-Wrestrict'
gcc: error: unrecognized command line option '-Wimplicit-fallthrough=0'
Makefile:243: recipe for target 'adj_matrix.o' failed
make: *** [adj_matrix.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/sjayanna/.rvm/gems/ruby-2.6.3/gems/jaro_winkler-1.5.3 for inspection.
Results logged to /home/sjayanna/.rvm/gems/ruby-2.6.3/extensions/x86_64-linux/2.6.0/jaro_winkler-1.5.3/gem_make.out
[~/code/playground/jaro_winkler] ○                                                                 [ruby-2.6.3] [08:59:21]
1 >> ```

@marcomoauro
Copy link

marcomoauro commented Mar 27, 2020

i have the same problem of @sjayanna but in my case 2.5.3 not work instead 2.3.8 it work.
(I use Ubuntu 18.04)

@alanwilter
Copy link

This project seems dead. I only needed because of solargraph.

The issue for me was somehow when doing:

gem install jaro_winkler
...
make: /usr/bin/mkdir: Command not found !!! What ???!!!
...

Fixed with `sudo ln /bin/mkdir /usr/bin/mkdir` on my Ubuntu 20.

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