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 / make error in windows 10 #62

Closed
hdb opened this issue Dec 15, 2017 · 9 comments
Closed

Installation / make error in windows 10 #62

hdb opened this issue Dec 15, 2017 · 9 comments

Comments

@hdb
Copy link

hdb commented Dec 15, 2017

I'm trying to install commonmarker as a dependency for Jekyll. This is my first time using this gem, so I’m not exactly sure what I’m doing. I get an error when I attempt to bundle install packages. (using Windows 10, Ruby 2.4)

Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies......
Using concurrent-ruby 1.0.5
Using i18n 0.9.1
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.4
Using activesupport 4.2.9
Using public_suffix 2.0.5
Using addressable 2.5.2
Using bundler 1.16.0
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.1
Fetching commonmarker 0.17.7.1
Installing commonmarker 0.17.7.1 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.7.1/ext/commonmarker
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171214-12236-1b99ddk.rb extconf.rb
creating Makefile

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

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.7.1/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.7.1 for inspection.
Results logged to
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/commonmarker-0.17.7.1/gem_make.out

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

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

When I do gem install commonmarker I get the same error.

make: *** No rule to make target '/C/Ruby24-x64/include/ruby-2.4.0/ruby.h', needed by 'arena.o'. Stop.
seems like it could be the issue. I have the ruby.h file, so it appears that /C/Ruby24-x64/include/ruby-2.4.0/ruby.h should just be C:/Ruby24-x64/include/ruby-2.4.0/ruby.h. Besides that, I'm not sure what the issue is as I cannot find an arena.o file to modify.

@glittle
Copy link

glittle commented Dec 17, 2017

I have almost the same issue. Also on Windows 10.

$ gem install commonmarker -v '0.17.7.1'
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.7.1/ext/commonmarker
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171217-26712-1wpah7r.rb extconf.rb
creating Makefile

current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.7.1/ext/commonmarker
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.

current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commonmarker-0.17.7.1/ext/commonmarker
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.

make failed, exit code 1

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

@kivikakk
Copy link
Collaborator

@hdbhdb How have you installed Ruby? I've never seen this kind of error before.

@glittle You will need to install the Ruby DevKit.

@hdb
Copy link
Author

hdb commented Dec 20, 2017

@kivikakk I used the ruby installer for windows. I initially had an issue with make as well which I fixed using this suggested solution--so maybe I had an earlier issue with ruby or the devkit. I'm reinstalling ruby and seeing if that fixes things. will let you know

@hdb
Copy link
Author

hdb commented Dec 20, 2017

well that fixed it. I think I just had some sort of error with the devkit installation. I'm closing this issue.

@hdb hdb closed this as completed Dec 20, 2017
@kivikakk
Copy link
Collaborator

@hdbhdb Thanks so much for that link; I think it might be helpful in a related issue (github/pages-gem#508). I'm glad it's working for you now!

@thisismydesign
Copy link

thisismydesign commented Mar 25, 2018

I ran into the same issue after installing Ruby 2.5.0.2 via Chocolatey and the dev kit via ridk install. It is actually for another gem but it might be helpful to you. Steps to reproduce in PowerShell:

choco install ruby -y
Set-ExecutionPolicy RemoteSigned # Needed for `ridk` below
ridk install # Press ENTER and follow GUI install steps (install to C:\tools\)
copy C:\tools\msys64\mingw64\bin\mingw32-make.exe C:\tools\msys64\mingw64\bin\make.exe # To make `make` available
gem install commonmarker

@thisismydesign
Copy link

thisismydesign commented Mar 25, 2018

Found & solved a possible cause: oneclick/rubyinstaller2#105
TLDR; Don't use the solution proposed by @hdbhdb, remove manually created make.exe and follow instructions on MSYS2's Chocolatey page: https://chocolatey.org/packages/msys2

@gogforce
Copy link

Regarding the original issue, I can confirm it had to do with a faulty devkit installation. Install ruby (2.3 in my case) via the windows installer and than extract the self-extracting devkit into the ruby folder.

@trojblue
Copy link

trojblue commented Feb 5, 2022

^ had the exact same issue when using chocolaty to install ruby. Reinstalled with Ruby installer and works just fine.

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

6 participants