Project

General

Profile

Actions

Bug #13215

closed

Cross compiling Ruby Gems uses Build System Linker Options

Added by rkeene (Roy Keene) almost 8 years ago. Updated almost 8 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
[ruby-core:79531]

Description

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:

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)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0