[ 
https://issues.apache.org/jira/browse/THRIFT-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465996#comment-13465996
 ] 

Nathan Beyer commented on THRIFT-1673:
--------------------------------------

I think I found the issue. With Ruby 1.8.7, the generated Makefile has this for 
CFLAGS - {code}CFLAGS   =  -fno-common -g -O2 -Wall -Werror -g -O2  -fno-common 
-pipe -fno-common   {code}.

With Ruby 1.9.3, the generated Makefile has this for CFLAGS - {code}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){code}

The particularly painful issue is the '-Werror=declaration-after-statement', 
which is generating all of the 'ISO C90 forbids mixed declarations and code'. 
Unfortunately, none of the C code is written to strict C90 in this regard 
(variables declared at the top of functions).
                
> 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

Reply via email to