Issue #13215 has been updated by Nobuyoshi Nakada. RubyGems is bundled but not a part of Ruby. The upstream is https://github.com/rubygems/rubygems. I have never cross-compiled gems with extension libraries. ---------------------------------------- Bug #13215: Cross compiling Ruby Gems uses Build System Linker Options https://bugs.ruby-lang.org/issues/13215#change-62990 * Author: Roy Keene * Status: Third Party's Issue * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- When cross-compiling Ruby Gems under Ruby 2.4.0, the rbconfig system uses the build system's configuration to cross-compile Ruby Gems, resulting in linker flags that do not work for the host system's linker. Example: ~~~ text curb_errors.c: At top level: cc1: warning: unrecognized command line option "-Wno-self-assign" cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" cc1: warning: unrecognized command line option "-Wno-parentheses-equality" cc1: warning: unrecognized command line option "-Wno-tautological-compare" compiling curb_multi.c curb_multi.c: In function 'ruby_curl_multi_perform': curb_multi.c:688:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] VALUE hash = rbcm->requests; ^ curb_multi.c: At top level: cc1: warning: unrecognized command line option "-Wno-self-assign" cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" cc1: warning: unrecognized command line option "-Wno-parentheses-equality" cc1: warning: unrecognized command line option "-Wno-tautological-compare" compiling curb_postfield.c compiling curb_upload.c linking shared-object curb_core.so x86_64-coreadaptive-linux-gnu-ld: unrecognized option '--compress-debug-sections=zlib' x86_64-coreadaptive-linux-gnu-ld: use the --help option for usage information collect2: error: ld returned 1 exit status Makefile:257: recipe for target 'curb_core.so' failed make[2]: *** [curb_core.so] Error 1 make[2]: Leaving directory '/home/rkeene/devel/aurae/node/root/packages/installed/pkgs/workdir-NraJ6njvdJOx.tmp/lib/ruby/gems/2.4.0/gems/curb-0.9.3/ext' make failed, exit code 2 Gem files will remain installed in /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/workdir-NraJ6njvdJOx.tmp/lib/ruby/gems/2.4.0/gems/curb-0.9.3 for inspection. Results logged to /home/rkeene/devel/aurae/node/root/packages/installed/pkgs/workdir-NraJ6njvdJOx.tmp/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/curb-0.9.3/gem_make.out ~~~ Cross-compiling from Linux/x86_64 to Linux/x86_64 (different platforms) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>