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

Building native extensions fails (on Ruby 3.3.0) #268

Closed
mvz opened this issue Dec 30, 2023 · 3 comments
Closed

Building native extensions fails (on Ruby 3.3.0) #268

mvz opened this issue Dec 30, 2023 · 3 comments

Comments

@mvz
Copy link

mvz commented Dec 30, 2023

I'm getting a failure when trying to install version 1.0.3 on Ruby 3.3.0:

  thread 'main' panicked at 'generate bindings: ClangDiagnostic("/home/matijs/.rbenv/versions/3.3.0/include/ruby-3.3.0/ruby/ruby.h:23:10: fatal error: 'stdarg.h' file not found\n")', /home/matijs/.cargo/registry/src/github.com-1ecc6299db9ec823/rb-sys-0.9.85/build/main.rs:55:6

I don't know if the Ruby version is relevant, since installing on older Rubies just downloads the native gem from rubygems.

I do not yet know enough about rb_sys to debug this, so any pointers to what I should try or check are appreciated.

@mvz
Copy link
Author

mvz commented Dec 31, 2023

I figured it out: I needed to install the libclang-dev package. I've created a new issue in rb-sys asking for better documentation on this: oxidize-rb/rb-sys#300.

@gjtorikian
Copy link
Owner

When installing the version, you shouldn't need to compile the binaries. We ought to precompile them for you, based on your OS. See https://github.com/flavorjones/ruby-c-extensions-explained#strategy-3-precompiled for what that looks like in practice (albeit for C based gems, not Rust ones, the concept is the same).

But, I am currently waiting for oxidize-rb/rb-sys#298 to be released to ensure that every build dependency supports Ruby 3.3.

@gjtorikian
Copy link
Owner

xref #270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants