From: Luis Lavena Date: 2010-12-03T10:59:10+09:00 Subject: [ruby-core:33531] [Backport87-Backport#3824] rbconfig.rb generated by cross-compilation do provide correct path for link process Issue #3824 has been updated by Luis Lavena. Category set to lib Assigned to set to Nobuyoshi Nakada Hello, I believe I had pinpoint the root of these issues to the definition of CROSS_COMPILING by my fake.rb (used outside ruby build process). Inspecting to mkmf.rb, around line 1713: $DEFLIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"] DEFLIBPATH is empty if CROSS_COMPILING is detected. I went ahead and removed that specific check: $DEFLIBPATH = $extmk ? ["$(topdir)"] : ["$(libdir)"] And both ruby bundled extensions compiled successfully and this allow me keep CROSS_COMPILING detection in my fake.rb file. The following patch correct the issue in ruby_1_8_7 branch, but I'm not aware of any other complication in relation to this. Thank you. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 416292d..733cf86 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1710,7 +1710,7 @@ def init_mkmf(config = CONFIG) $LIBRUBYARG = "" $LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC'] $LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED'] - $DEFLIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"] + $DEFLIBPATH = $extmk ? ["$(topdir)"] : ["$(libdir)"] $DEFLIBPATH.unshift(".") $LIBPATH = [] $INSTALLFILES = [] ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3824 ---------------------------------------- http://redmine.ruby-lang.org