ruby / racc

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

Installation on Ubuntu 20.04 fails #185

Closed JochenLutz closed 1 year ago

JochenLutz commented 2 years ago

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

current directory: /home/jolutz/.rvm/gems/ruby-3.0.0/gems/racc-1.6.0/ext/racc/cparse

/home/jolutz/.rvm/rubies/ruby-3.0.0/bin/ruby -I /home/jolutz/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r ./siteconf20220304-1130559-3adf2g.rb extconf.rb checking for rb_block_call()... yes checking for rb_ary_subseq()... yes creating Makefile

current directory: /home/jolutz/.rvm/gems/ruby-3.0.0/gems/racc-1.6.0/ext/racc/cparse make "DESTDIR=" clean

current directory: /home/jolutz/.rvm/gems/ruby-3.0.0/gems/racc-1.6.0/ext/racc/cparse make "DESTDIR=" compiling cparse.c linking shared-object racc/cparse.so

current directory: /home/jolutz/.rvm/gems/ruby-3.0.0/gems/racc-1.6.0/ext/racc/cparse make "DESTDIR=" install make: /usr/bin/mkdir: Command not found make: *** [Makefile:202: .sitearchdir.-.racc.time] Error 127

make install failed, exit code 2

Gem files will remain installed in /home/jolutz/.rvm/gems/ruby-3.0.0/gems/racc-1.6.0 for inspection. Results logged to /home/jolutz/.rvm/gems/ruby-3.0.0/extensions/x86_64-linux/3.0.0/racc-1.6.0/gem_make.out

mkdir exists in /bin.

PiotrBracha commented 2 years ago

You need to do one thing. Please take a look where do you have "mkdir" command:

  1. Execute command "whereis mkdir" or "locate mkdir".
  2. You will see some path to mkdir.
  3. Then you need to create symbolic link to the mkdir inside the path which you can see in error above - /usr/bin/mkdir.
  4. That's all. :)

PS The problem is not exactly on freshly installed 20.04 but on the 18.04 upgraded to 20.04. ;)

hsbt commented 1 year ago

see https://github.com/ruby/racc/issues/147#issuecomment-828490156