On Sun, Nov 28, 2010 at 10:56 PM, Urabe S.
[email protected] wrote:
(2010/11/29 9:53), Luis L. wrote:
Config::MAKEFILE_CONFIG["top_srcdir"] = $top_srcdir =
“…/ruby” unless e; \
Curious. You get the exact same error message as you pasted in #4094 ?
It seems your source directory is …/ruby so …/ruby/ruby.h should exist and
the error will not raise.
On the original report (#2531), I was getting a reference to the base
ruby used to cross-compile:
Generating callback.func
mkmf.rb can’t find header files for ruby at
/home/luis/.rvm/ruby-1.8.7-p248/lib/ruby/ruby.h
While on #4094
Generating callback.func
mkmf.rb can’t find header files for ruby at …/ruby/ruby.h
On that report, I’ve tried to cross-compile “inside” ruby checkout
(mkdir build; cd build; sh …/configure)
I’ve tried that:
Generating callback.func
mkmf.rb can’t find header files for ruby at …/ruby.h
And also outside ruby dir (cd …; mkdir build-ruby; cd build-ruby; sh
…/ruby/configure)
Generating callback.func
mkmf.rb can’t find header files for ruby at …/ruby/ruby.h
===
But, noticed the following on master, that top_srcdir is build
relative to the build dir, so this patch:
diff --git a/Makefile.in b/Makefile.in
index 4faabc3…3135f08 100644
— a/Makefile.in
+++ b/Makefile.in
@@ -138,7 +138,8 @@ fake.rb: Makefile
end;
end;
prehook = proc do |e|; \
= “@top_srcdir@” unless e; \
= File.expand_path("@top_srcdir@", builddir) unle
untrace_var(:$$extmk, prehook);
end;
trace_var(:$$extmk, prehook); \
===
Seems to correct the issue: https://gist.github.com/719946
I’m still unsure why this works on ruby_1_8 but not on ruby_1_8_7 (and
why don’t see similar code there related to fake.rb) but setting the
top_srcdir relative to the build directory, works.
Thank you for your time, adding the patch to the ticket.