castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
425 stars 23 forks source link

Solargraph error install Windows 10 #163

Closed skelclique closed 3 years ago

skelclique commented 4 years ago

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

current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler

C:/Ruby27-x64/bin/ruby.exe -I C:/Ruby27-x64/lib/ruby/2.7.0 -r ./siteconf20200315-12020-1qboq28.rb extconf.rb creating Makefile

current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler make "DESTDIR=" clean current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler make "DESTDIR=" make failedNo such file or directory - make "DESTDIR="

Gem files will remain installed in C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jaro_winkler-1.5.4 for inspection. Results logged to C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/jaro_winkler-1.5.4/gem_make.out

castwide commented 4 years ago

It looks like you don't have the necessary development kits to build native extensions. The easiest way I know to get them is to use RubyInstaller.

antmelnyk commented 4 years ago

DevKit doesn't help, the issue occurs (with MSYS installed). Same for Ruby 2.6.

castwide commented 4 years ago

@pixelgoo Do you get the exact same error?

Solargraph doesn't use any native extensions other than dependencies, so this issue is probably specific to Nokogiri. Try gem install nokogiri first. If the problem persists, you might need to consult their documentation or post an issue to their repo.

antmelnyk commented 4 years ago

@pixelgoo Do you get the exact same error?

Solargraph doesn't use any native extensions other than dependencies, so this issue is probably specific to Nokogiri. Try gem install nokogiri first. If the problem persists, you might need to consult their documentation or post an issue to their repo.

Yes, I got the same exact error.

Nokogiri got installed separately, same issues occurs anyway.

Nokogiri is built with the packaged libraries: libxml2-2.9.10, libxslt-1.1.34, zlib-1.2.11, libiconv-1.15.
Successfully installed nokogiri-1.10.9-x64-mingw32

...

gem install solargraph
Fetching ast-2.4.1.gem
Fetching regexp_parser-1.7.1.gem
Fetching rubocop-0.85.1.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing solargraph:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/site_ruby/2.6.0 -r ./siteconf20200612-21928-axf2a0.rb extconf.rb
creating Makefile

current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
make "DESTDIR=" clean
current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
make "DESTDIR="
make failedNo such file or directory - make "DESTDIR="

Gem files will remain installed in C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4 for inspection.
Results logged to C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/jaro_winkler-1.5.4/gem_make.out

Same happens for 2.7.

castwide commented 4 years ago

That failure's from trying to compile jaro_winkler. Since it's happening with multiple native extensions, it might be a problem with your devkit setup. I haven't encountered errors with either nokogiri or jaro_winkler running Ruby 2.6.3 on Windows 10.

season-x commented 4 years ago

C:\WINDOWS\system32>gem install solargraph Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing solargraph: ERROR: Failed to build gem native extension.

current directory: C:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler C:/Program\ Files/Ruby26-x64/bin/ruby.exe -I C:/Program\ Files/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20200723-9792-161d8pr.rb extconf.rb creating Makefile

current directory: C:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler make "DESTDIR=" clean Makefile:269: *** 多个目标匹配。 停止。

current directory: C:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler make "DESTDIR=" Makefile:269: *** 多个目标匹配。 停止。

make failed, exit code 2

Gem files will remain installed in C:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jaro_winkler-1.5.4 for inspection. Results logged to C:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/jaro_winkler-1.5.4/gem_make.out

Yes, I got the same error,and I tried to run MSYS2 again, but it's failed. my systems is Win10 x64 bit

Slach commented 1 year ago

@skelclique what is solution for this issue?