You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Nathan Beyer (JIRA)" <ji...@apache.org> on 2012/10/01 20:57:08 UTC
[jira] [Comment Edited] (THRIFT-1673) Ruby compile flags for
extension for multi arch builds (os x)
[ https://issues.apache.org/jira/browse/THRIFT-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466680#comment-13466680 ]
Nathan Beyer edited comment on THRIFT-1673 at 10/2/12 5:55 AM:
---------------------------------------------------------------
Just to see what's really going on, I compare the generate Makefiles with and without the $CFLAGS setting on Ruby 1.8.7 and Ruby 1.9.3 to see the differences. Here's what's happening.
Ruby 1.8.7 diff between current state in trunk and after removing $CFLAGS assignment -
{code}
RUBY_EXTCONF_H =
-CFLAGS = -fno-common -g -O2 -Wall -Werror -g -O2 -fno-common -pipe -fno-common
+CFLAGS = -fno-common -g -O2 -fno-common -pipe -fno-common $(cflags)
INCFLAGS = -I. -I. -I/Users/me/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/i686-darwin11.4.0 -I.
DEFS =
CPPFLAGS = -DHAVE_STRLCPY -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
{code}
Ruby 1.9.3 diff between current state in trunk and after removing $CFLAGS assignment -
{code}
RUBY_EXTCONF_H =
cflags = $(optflags) $(debugflags) $(warnflags)
optflags = -O3
debugflags = -ggdb
warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration
-CFLAGS = -fno-common -g -O2 -Wall -Werror -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe $(ARCH_FLAG)
+CFLAGS = -fno-common $(cflags) -fno-common -pipe $(ARCH_FLAG)
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
DEFS =
CPPFLAGS = -DHAVE_STRLCPY -I/Users/nathan/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
{code}
The changes seem appropriate for Ruby 1.8.7, but I think they'll need to be either disable or adjusted to user the other, more discreet configuration parameters.
was (Author: nbeyer):
Just to see what's really going on, I compare the generate Makefiles with and without the $CFLAGS setting on Ruby 1.8.7 and Ruby 1.9.3 to see the differences. Here's what's happening.
Ruby 1.8.7 diff between current state in trunk and after removing $CFLAGS assignment -
{code}
RUBY_EXTCONF_H =
-CFLAGS = -fno-common -g -O2 -Wall -Werror -g -O2 -fno-common -pipe -fno-common
+CFLAGS = -fno-common -g -O2 -fno-common -pipe -fno-common $(cflags)
INCFLAGS = -I. -I. -I/Users/me/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/i686-darwin11.4.0 -I.
DEFS =
CPPFLAGS = -DHAVE_STRLCPY -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
{code}
Ruby 1.8.7 diff between current state in trunk and after removing $CFLAGS assignment -
{code}
RUBY_EXTCONF_H =
cflags = $(optflags) $(debugflags) $(warnflags)
optflags = -O3
debugflags = -ggdb
warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration
-CFLAGS = -fno-common -g -O2 -Wall -Werror -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe $(ARCH_FLAG)
+CFLAGS = -fno-common $(cflags) -fno-common -pipe $(ARCH_FLAG)
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
DEFS =
CPPFLAGS = -DHAVE_STRLCPY -I/Users/nathan/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
{code}
The changes seem appropriate for Ruby 1.8.7, but I think they'll need to be either disable or adjusted to user the other, more discreet configuration parameters.
> Ruby compile flags for extension for multi arch builds (os x)
> -------------------------------------------------------------
>
> Key: THRIFT-1673
> URL: https://issues.apache.org/jira/browse/THRIFT-1673
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Library
> Affects Versions: 0.9
> Environment: os x
> Reporter: Jake Farrell
> Assignee: Jake Farrell
> Fix For: 0.9
>
>
> ld: warning: ld: warning: ignoring file thrift_native.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): thrift_native.oignoring file struct.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): struct.o
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira