Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Wrong compile option during Rails installation on Clear Linux OS?

未关闭
#82 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
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 版本进行比较。当 websocket-driver 原生扩展在 gem 安装期间能够成功构建且不再出现无法识别的选项时,即视为完成。

由索引模型根据 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. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

faye/websocket-driver-ruby 的其他 Issue

查看 faye/websocket-driver-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。