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

Failed to build gem native extension/ no rule to make target #67

Closed
ssterrett opened this issue Feb 24, 2018 · 3 comments
Closed

Failed to build gem native extension/ no rule to make target #67

ssterrett opened this issue Feb 24, 2018 · 3 comments

Comments

@ssterrett
Copy link

I am having the same issue as #62 but uninstalling Ruby and reinstalling have not worked and I have MSYS installed. I have no idea what arena.o is (Arena of Valor is all that shows up on google). Full details below.

I attempted bundle exec jekyll serve
and got the error bundler: command not found: jekyll Install missing gem executables with bundle install

So I attempted bundle install and got:

Fetching gem metadata from https://rubygems.org/..
Resolving dependencies.......
Using concurrent-ruby 1.0.5
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.9
Using public_suffix 2.0.5
Using addressable 2.5.2
Using latex-decode 0.3.1
Using bibtex-ruby 4.4.5
Using bundler 1.16.1
Using namae 1.0.1
Using citeproc 1.0.8
Using csl 1.5.0
Using citeproc-ruby 1.1.8
Using coffee-script-source 1.11.1
Using execjs 2.7.0
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ruby-enum 0.7.2
Fetching commonmarker 0.17.8
Installing commonmarker 0.17.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8/ext/commonmarker
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20180224-15172-1hah79b.rb extconf.rb
creating Makefile

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8/ext/commonmarker
make "DESTDIR=" clean

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8/ext/commonmarker
make "DESTDIR="
generating commonmarker-x64-mingw32.def
make: *** No rule to make target '/C/Ruby24-x64/include/ruby-2.4.0/ruby.h',
needed by 'arena.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8 for inspection.
Results logged to
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/commonmarker-0.17.8/gem_make.out

An error occurred while installing commonmarker (0.17.8), and Bundler cannot
continue.
Make sure that `gem install commonmarker -v '0.17.8'` succeeds before bundling.

In Gemfile:
  github-pages was resolved to 177, which depends on
    jekyll-commonmark-ghpages was resolved to 0.1.5, which depends on
      jekyll-commonmark was resolved to 1.1.0, which depends on
        commonmarker

So I attempted gem install commonmarker -v '0.17.8 and got:

Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions.  This could take a while...
ERROR:  Error installing commonmarker:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8/ext/commonmarker
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20180224-13424-1g6may2.rb extconf.rb
creating Makefile

current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8/ext/commonmarker
make "DESTDIR=" clean

current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8/ext/commonmarker
make "DESTDIR="
generating commonmarker-x64-mingw32.def
make: *** No rule to make target '/C/Ruby24-x64/include/ruby-2.4.0/ruby.h', needed by 'arena.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.8 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/commonmarker-0.17.8/gem_make.out
@ssterrett ssterrett changed the title No rule to make target Failed to build gem native extension/ no rule to make target Feb 24, 2018
@gjtorikian
Copy link
Owner

You didn't mention it so I'll ask just to be sure: do you have Ruby DevKit installed?

@ssterrett
Copy link
Author

I had assumed that was included when I installed MSYS2, since Ruby >= 2.4. I called ridk install and when asked

1 - MSYS2 base installation
   2 - MSYS2 system update
   3 - MSYS2 and MINGW development toolchain

Which components shall be installed? If unsure press ENTER [1,2,3]  

Previously I had ENTER, but choosing option 3 seems to have done the job. This issue is resolved. Thanks!

@hsraju
Copy link

hsraju commented Dec 20, 2021

The option 3 did the trick. I was struggling to install fluent-plugin-mongo on windows. Found out this was the actual issue. (BTW, I am using ruby just for the reason that it is a build dependency for Fluentd).

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

3 participants