-
Notifications
You must be signed in to change notification settings - Fork 185
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
Gem commonmarker 1.x fails to compile native extensions with rust #3396
Comments
Gems that use the rb-sys for rust don't appear to work. I'm running into an identical issue with truffleruby 24.0.2 trying to install the polars-df gem (https://github.com/ankane/ruby-polars) which also uses the rb-sys crate. |
I have heard @nirvdrum has been looking at this recently. |
With #3664 fixed, I tried
OK I guess I need to install libclang on Linux: https://github.com/oxidize-rb/rb-sys?tab=readme-ov-file#what-dependencies-do-i-need-to-build-a-ruby-extension-in-rust
OK, so after
So we are still missing
^ @andrykonchin Could you make a PR adding that? |
Doing a quick workaround for that, similar to what Randy did in the first post: # config.rb
RbConfig::CONFIG["archincludedir"] = "#{RbConfig::CONFIG["includedir"]}/#{RbConfig::CONFIG["arch"]}" I get:
Re rb_gc_adjust_memory_usage, TruffleRuby does define that as truffleruby/lib/cext/include/ruby/internal/intern/gc.h Lines 388 to 395 in e834bb5
I guess Rust doesn't find it because it doesn't end up in the libruby then, we could fix that by declaring it in src/main/c/cext/gc.c instead.
Regarding RData, no clue. Regarding |
@andrykonchin added |
Looking at the first flags error, it comes from https://github.com/oxidize-rb/rb-sys/blob/991df6de21d244631e1b889070a8e4136f4220fe/crates/rb-sys/src/stable_api/ruby_3_2.rs#L19 |
I found some more info in oxidize-rb/rb-sys#229. |
I submitted an issue to rb-sys: oxidize-rb/rb-sys#424 |
Would be good to try again now that oxidize-rb/rb-sys#424 got fixed |
Using the latest commit and a
jvm-ce
buildwith the latest gem version (1.0.4)
installation fails due to several items missing from
RbConfig::CONFIG
:If I add these values (and use something like
export TRUFFLERUBYOPT=-r$PWD/config
) I get past those issues.Then I get other errors:
The text was updated successfully, but these errors were encountered: