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
Cross Compile looks for Ruby headers in the wrong directory #232
Comments
Do you want to cross compile on Windows? |
I want(ed) to cross compile from WSL Ubuntu to Windows. |
Could you show all command lines you used for it? (How to reproduce this?) |
|
Thanks. |
kou
pushed a commit
that referenced
this issue
Jan 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Edit: It could be that I used my existing RubyIntaller2 prebuild instead of letting
rake-compiler
rebuild the entire Ruby from source.Analysis
Cross Compile currently works by replacing
RbConfig::CONFIG
with afake.rb
script in the$LOAD_PATH
. Thisfake.rb
copy-pastes the the target platform’srbconfig.rb
verbatim.rake-compiler/lib/rake/extensiontask.rb
Lines 415 to 435 in 9baeced
However,
rbconfig.rb
begins with this for RubyIntaller2:Same for Ubuntu, for that matter:
With
__FILE__
being/path/to/project/tmp/fake.rb
rather than/path/to/target/ruby/rbconfig.rb
,RbConfig::TOPDIR
becomesnil
and leads to a cascade of fallbacks.The text was updated successfully, but these errors were encountered: