[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problems building extensions on arm64



Hi everyone.  I was just looking through the list of ruby modules that don't compile on arm64 and found an interesting problem.

For ruby-lapack and ruby-inotify, the rbconfig.rb contains at least one command line argument that's unsupported by gcc-4.8.  The rbconfig.rb includes -fstack–protector-strong for CFLAGS and other variables which causes extension compilation to fail:

"gcc -o conftest -I/usr/include/aarch64-linux-gnu/ruby-2.1.0 -I/usr/include/ruby-2.1.0/ruby/backward -I/usr/include/ruby-2.1.0 -I. -D_FORTIFY_SOURCE=2   -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c  -L. -L/usr/lib/aarch64-linux-gnu -L. -Wl,-z,relro -L/build/ruby2.1-NMeAuY/ruby2.1-2.1.3/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic     -lruby-2.1  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
gcc: error: unrecognized command line option '-fstack-protector-strong'
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

I can't think of any good solution to this, short of waiting for the default version of gcc to be updated to 4.9.  There doesn't seem to be any way to override anything in rbconfig.rb which would be the obvious fix.  )-:

Does anyone else have any ideas?  It's only a couple of modules so not a huge deal.

Tim Potter
Cloud Systems Engineer
HP Cloud Services

timothy.potter@hp.com
M +61 419 749 832
Hewlett-Packard Australia Pty Ltd

This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorised to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Reply to: