ruby / racc

Racc is an LALR(1) parser generator. It is written in Ruby itself, and generates ruby programs.
Other
535 stars 88 forks source link

Failed to install on Windows #261

Closed thaianhduc closed 5 months ago

thaianhduc commented 5 months ago

System Information: Windows 11 Home Version: 10.0.22631

Ruby version: 3.2.3 with DevKit installed

Command

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

    current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/racc-1.7.3/ext/racc/cparse
C:/Ruby32-x64/bin/ruby.exe extconf.rb
creating Makefile

current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/racc-1.7.3/ext/racc/cparse
C:Program Files \(x86\)GnuWin32binmake.exe DESTDIR\= sitearchdir\=./.gem.20240329-15248-sqtjyp sitelibdir\=./.gem.20240329-15248-sqtjyp clean
current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/racc-1.7.3/ext/racc/cparse
C:Program Files \(x86\)GnuWin32binmake.exe DESTDIR\= sitearchdir\=./.gem.20240329-15248-sqtjyp sitelibdir\=./.gem.20240329-15248-sqtjyp
make failedNo such file or directory - C:Program

Gem files will remain installed in C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/racc-1.7.3 for inspection.
Results logged to C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/racc-1.7.3/gem_make.out
hsbt commented 5 months ago

C:Program Files (x86)GnuWin32binmake.exe

You should put make command to path that is without space.

thaianhduc commented 5 months ago

Thanks @hsbt . I did, but same error "make failedNo such file or directory - C:GnuWin32binmake.exe", the make path is "C:\GnuWin32\bin\make.exe"

hsbt commented 5 months ago

I could install racc with my Windows environment.

PS C:\Users\hsbt> gem i racc
Fetching racc-1.7.3.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
Successfully installed racc-1.7.3
Parsing documentation for racc-1.7.3
Installing ri documentation for racc-1.7.3
Done installing documentation for racc after 3 seconds
1 gem installed

A new release of RubyGems is available: 3.4.19 → 3.5.7!
Run `gem update --system 3.5.7` to update your installation.

It caused by your devkit environment or installation issue. Unfortunately, I can't advice that.