Skip to content
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

ruby 3.0.6 compilation error on MacOS Sonoma 14 related to maybe_unused #288

Closed
amkisko opened this issue Feb 21, 2024 · 1 comment
Closed

Comments

@amkisko
Copy link

amkisko commented Feb 21, 2024

I was trying to install ruby 3.0.6 on Sonoma 14.3.1 using rbenv:

ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
-> ./configure "--prefix=$HOME/.rbenv/versions/3.0.6" --with-openssl-dir=/usr/local/opt/openssl@1.1 --with-readline-dir=/usr/local/opt/readline --with-libyaml-dir=/usr/local/opt/libyaml --with-gmp-dir=/usr/local/opt/gmp --with-ext=openssl,psych,+ --disable-shared
-> make -j 16

BUILD FAILED (macOS 14.3.1 on x86_64 using ruby-build 20231225)

---

bigdecimal.c:249:5: error: 'maybe_unused' attribute cannot be applied to types
  249 |     ENTER(1);
      |     ^
bigdecimal.c:68:33: note: expanded from macro 'ENTER'
   68 | #define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0
      |                                 ^
../.././include/ruby/backward/2/attributes.h:168:28: note: expanded from macro 'RB_UNUSED_VAR'
  168 | #define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED()
      |                            ^
../.././include/ruby/internal/attr/maybe_unused.h:31:39: note: expanded from macro 'RBIMPL_ATTR_MAYBE_UNUSED'
   31 | # define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
      |                                       ^
bigdecimal.c:372:5: error: 'maybe_unused' attribute cannot be applied to types
  372 |     ENTER(1);
      |     ^

Does anybody have suggestions how to fix these?

Duplicate post here: rbenv/ruby-build#2185 (comment)

@amkisko amkisko changed the title ruby 3.0.6 compilation error on Sonoma 14 related to maybe_unused ruby 3.0.6 compilation error on MacOS Sonoma 14 related to maybe_unused Feb 21, 2024
@hsbt
Copy link
Member

hsbt commented Apr 22, 2024

Don't do multi posting.

@hsbt hsbt closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants