Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Wrong compile option during Rails installation on Clear Linux OS?

Đang mở
#82 4 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c, ruby
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Tái hiện việc cài đặt Rails trên Clear Linux OS và kiểm tra Makefile được tạo trong ext/websocket-driver sau khi extconf.rb chạy. So sánh các cờ trình biên dịch được sử dụng cho websocket_mask.c với các phiên bản Ruby và gcc được nêu trong issue. Được xem là hoàn tất khi extension native của websocket-driver xây dựng thành công trong quá trình cài đặt gem mà không có tùy chọn không được nhận dạng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Ruby
Star
238
Fork
49
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của faye/websocket-driver-ruby

Tất cả issue của faye/websocket-driver-ruby

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.