-
Notifications
You must be signed in to change notification settings - Fork 44
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
Wrong compile option during Rails installation on Clear Linux OS? #82
Comments
Same here. $ gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /home/seva/.rvm/gems/ruby-3.0.1/gems/websocket-driver-0.7.3/ext/websocket-driver
/usr/share/rvm/rubies/ruby-3.0.1/bin/ruby -I /usr/share/rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0 -r ./siteconf20210504-154939-ji16ct.rb extconf.rb
creating Makefile
current directory: /home/seva/.rvm/gems/ruby-3.0.1/gems/websocket-driver-0.7.3/ext/websocket-driver
make DESTDIR\= clean
current directory: /home/seva/.rvm/gems/ruby-3.0.1/gems/websocket-driver-0.7.3/ext/websocket-driver
make DESTDIR\=
compiling websocket_mask.c
linking shared-object websocket_mask.so
current directory: /home/seva/.rvm/gems/ruby-3.0.1/gems/websocket-driver-0.7.3/ext/websocket-driver
make DESTDIR\= install
make: /usr/bin/mkdir: command not found
make: *** [Makefile:202: .sitearchdir.time] Error 127
make install failed, exit code 2
Gem files will remain installed in /home/seva/.rvm/gems/ruby-3.0.1/gems/websocket-driver-0.7.3 for inspection |
I had a similar issue (and build) as @Volosh1n reported. As inspired by: https://mulmandu17.tistory.com/63 Solution was:
Another attempt at gem installing rails worked OK, and this gem: Building native extensions. This could take a while... got built successfully. |
We don't do anything special with the extension config, we just tell rubygems about it:
For development we use I'm not able to provide support for OSes other than Ubuntu and macOS, but usually compiler issues aren't to do with this gem specifically but some other problem with the environment gems are being compiled in. |
Found here |
I wonder whether this is caused by the installation mechanism of this gem, or Ruby.
Install Rails with "sudo gem install rails" on Clear Linux OS, building gem is failed at "websocket-driver".
Error said
"gcc: error: unrecognized command-line option ‘-mzero-caller-saved-regs=used’; did you mean ‘-fzero-call-used-regs=’?"
It looks associated with the next topic.
https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550018.html
Is an inappropriate building option set in Makefile dynamically generated during installation process? Although I over-write this option as "-fzero-call-used-regs=", Makefile itself is overwritten in installation process.
Steps to reproduce
Process of installation
install following bundles with command "sudo swupd bundle-add"
-ruby-basic
-sqlite
-nodejs-basic
-c-basic
-devpkg-sqlite-autoconf
setup command of ruby and rails
sudo gem update --system
Error at "websocket-driver"
Expected behavior
Rails is successfully installed.
Actual behavior
Next error is reported.
System configuration
Rails version:
Ruby version:
Clear Linux OS:
The text was updated successfully, but these errors were encountered: