Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Wrong compile option during Rails installation on Clear Linux OS?

オープン
#82 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c, ruby

調査の方向性

Clear Linux OS 上で Rails のインストールを再現し、extconf.rb の実行後に ext/websocket-driver 配下へ生成される Makefile を調査します。websocket_mask.c に使用されるコンパイラフラグを、issue に記載された Ruby と gcc のバージョンと比較します。gem のインストール中に websocket-driver のネイティブ拡張が、認識されないオプションなしで正常にビルドされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

  1. install following bundles with command "sudo swupd bundle-add"
    -ruby-basic
    -sqlite
    -nodejs-basic
    -c-basic
    -devpkg-sqlite-autoconf

  2. 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.

wsluser@paulownia~ $ sudo gem install rails
Password:
Building native extensions. This could take a while...
ERROR:  Error installing rails:
        ERROR: Failed to build gem native extension.

    current directory: /usr/lib64/ruby/gems/2.7.0/gems/websocket-driver-0.7.3/ext/websocket-driver
/usr/bin/ruby -I /usr/lib64/ruby/site_ruby/2.7.0 -r ./siteconf20210501-2471-f0bjii.rb extconf.rb
creating Makefile

current directory: /usr/lib64/ruby/gems/2.7.0/gems/websocket-driver-0.7.3/ext/websocket-driver
make DESTDIR\= clean

current directory: /usr/lib64/ruby/gems/2.7.0/gems/websocket-driver-0.7.3/ext/websocket-driver
make DESTDIR\=
compiling websocket_mask.c
gcc: error: unrecognized command-line option ‘-mzero-caller-saved-regs=used’; did you mean ‘-fzero-call-used-regs=’?
make: *** [Makefile:245: websocket_mask.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/lib64/ruby/gems/2.7.0/gems/websocket-driver-0.7.3 for inspection.
Results logged to /usr/lib64/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/websocket-driver-0.7.3/gem_make.out
System configuration

Rails version:

wsluser@paulownia~ $ rails -v
Rails 6.1.3.1

Ruby version:

wsluser@paulownia~ $ ruby -v
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux-gnu]

Clear Linux OS:

wsluser@paulownia~ $ cat /etc/os-release
NAME="Clear Linux OS"
VERSION=1
ID=clear-linux-os
ID_LIKE=clear-linux-os
VERSION_ID=34560
PRETTY_NAME="Clear Linux OS"
ANSI_COLOR="1;35"
HOME_URL="https://clearlinux.org"
SUPPORT_URL="https://clearlinux.org"
BUG_REPORT_URL="mailto:[email protected]"
PRIVACY_POLICY_URL="http://www.intel.com/privacy"
BUILD_ID=34560
主要言語
Ruby
スター
238
フォーク
49
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

faye/websocket-driver-ruby のほかの issue

faye/websocket-driver-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。