Benoit Daloze
Benoit Daloze
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 rb-sys is hardcoding CRuby internals, but it should use the `RSTRING_LEN` macro instead.
I found some more info in https://github.com/oxidize-rb/rb-sys/pull/229. So probably TruffleRuby should be treated like ruby-head then, because `ruby_3_2.rs` hardcoded macros are incompatible and CRuby-specific.
I submitted an issue to rb-sys: https://github.com/oxidize-rb/rb-sys/issues/424
Would be good to try again now that https://github.com/oxidize-rb/rb-sys/issues/424 got fixed
On truffleruby-head: `truffleruby 25.0.0-dev-c4775937, like ruby 3.3.5, GraalVM CE Native [x86_64-linux]` ``` $ gem i -V commonmarker ... Fetching rb_sys-0.9.106.gem Fetching commonmarker-2.0.2.1.gem ... error[E0432]: unresolved imports `rb_sys::rb_bug`, `rb_sys::rb_warning` --> /home/eregon/.rubies/truffleruby-dev/lib/gems/gems/commonmarker-2.0.2.1/ext/commonmarker/.rb-sys/stable/cargo/registry/src/index.crates.io-6f17d22bba15001f/magnus-0.7.1/src/error.rs:8:5...
I forgot to write here but TruffleRuby is already in rb-sys/rb_sys CI: https://github.com/oxidize-rb/rb-sys/blob/8548a8b6369494a4963eeeb6e08b918b0919fe08/.github/workflows/ci.yml#L48-L55 So at least some gems depending on rb-sys like `blake3-rb` already work fine. In general I don't...
Right probably all of https://github.com/oxidize-rb/rb-sys/milestone/2 is needed for Magnus.
I copy here the whole RbConfig::CONFIG. Note that NM is also incorrect and has the same problem (`"NM"=>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --no-llvm-bc",`). ``` /opt/homebrew/opt/[email protected]/bin/ruby -e 'pp RbConfig::CONFIG.sort.to_h' {"ADDITIONAL_DLDFLAGS"=>"", "ALLOCA"=>"", "AR"=>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar", "ARCHFILE"=>"", "ARCH_FLAG"=>"-arch arm64",...
> My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue. I ticked this box even though the output says differently...
Indeed, I see: ``` bash-3.2$ cc -print-prog-name=ar /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar bash-3.2$ cc -print-prog-name=nm /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm bash-3.2$ cc -print-prog-name=ld /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld ``` Interesting that LD above is not affected but AR and NM are. Any...