[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-10-08 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-1673:


Integrated in Thrift #557 (See [https://builds.apache.org/job/Thrift/557/])
Thrift-1673: Ruby compile flags for exension for multi arch builds (os x)
Client: rb
Patch: Jake Farrell

Updating extconf to only grab arch flags from ruby binary to stop rvm version 
>= 1.9.x from breaking. (Revision 1395824)

 Result = ABORTED

> 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


[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-10-01 Thread Nathan Beyer (JIRA)

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

Nathan Beyer commented on THRIFT-1673:
--

Do you know what specific flags are missing? When I made the following change 
to extconf.rb, the flags seem to be copied from the original Ruby build 
appropriately.

{code}
Index: ext/extconf.rb
===
--- ext/extconf.rb  (revision 1392514)
+++ ext/extconf.rb  (working copy)
@@ -22,8 +22,6 @@
 else
   require 'mkmf'
 
-  $CFLAGS = "-g -O2 -Wall -Werror " + Config::CONFIG["CFLAGS"]
-
   have_func("strlcpy", "string.h")
 
   create_makefile 'thrift_native'
{code}

How is the original situation recreated?

> 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


[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-10-01 Thread Jake Farrell (JIRA)

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

Jake Farrell commented on THRIFT-1673:
--

To enable the multi arch the CFLAGS from ruby are needed, this is added in the 
extconf with Config::CONFIG["CFLAGS"]. We could skip all other flags that ruby 
was compiled with and just use the arch flags as needed within this ticket 
originally with Config::CONFIG['CFLAGS'].scan( /(-arch )(\S+)/ ).map{|x,y| x + 
y + ' ' }.join(''). Thoughts?
 

> 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


[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-10-01 Thread Nathan Beyer (JIRA)

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

Nathan Beyer commented on THRIFT-1673:
--

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


[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-09-30 Thread Nathan Beyer (JIRA)

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

Nathan Beyer commented on THRIFT-1673:
--

Does the '$CFLAGS' variable need to be set at all? Is there a particular 
parameter that needs to be included?

I tried remove the modification of '$CFLAGS' and everything seems to work just 
fine on Ruby 1.8.7-p370 and Ruby 1.9.3-p194 on OS X Lion. There are a lot of 
warnings for the native code when built via Ruby 1.9.3-p194, but the 
compilation and tests complete successfully.

> 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


[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-09-28 Thread Nathan Beyer (JIRA)

[ 
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


[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-09-28 Thread Nathan Beyer (JIRA)

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

Nathan Beyer commented on THRIFT-1673:
--

The the commit associated with this issue, I'm not able to build on OS X with 
Ruby 1.9.3-p194. I can build on OS X with Ruby 1.8.7-p370. Here's the output 
I'm seeing -

{code}
compiling binary_protocol_accelerated.c
cc1: warnings being treated as errors
binary_protocol_accelerated.c: In function ‘write_string_direct’:
binary_protocol_accelerated.c:83: warning: implicit conversion shortens 64-bit 
value into a 32-bit value
binary_protocol_accelerated.c: In function 
‘rb_thrift_binary_proto_write_double’:
binary_protocol_accelerated.c:203: warning: ISO C90 forbids mixed declarations 
and code
binary_protocol_accelerated.c: In function 
‘rb_thrift_binary_proto_write_string’:
binary_protocol_accelerated.c:215: warning: ISO C90 forbids mixed declarations 
and code
binary_protocol_accelerated.c: In function ‘read_i64_direct’:
binary_protocol_accelerated.c:252: warning: ISO C90 forbids mixed declarations 
and code
binary_protocol_accelerated.c: In function ‘Init_binary_protocol_accelerated’:
binary_protocol_accelerated.c:389: warning: implicit conversion shortens 64-bit 
value into a 32-bit value
binary_protocol_accelerated.c:390: warning: implicit conversion shortens 64-bit 
value into a 32-bit value
binary_protocol_accelerated.c:391: warning: implicit conversion shortens 64-bit 
value into a 32-bit value
binary_protocol_accelerated.c:393: warning: ISO C90 forbids mixed declarations 
and code
make: *** [binary_protocol_accelerated.o] Error 1
rake aborted!
Command failed with status (2): [make...]
{code}

When I remove the changes made in this bug it compiles fine. Any thoughts?

> 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


[jira] [Commented] (THRIFT-1673) Ruby compile flags for extension for multi arch builds (os x)

2012-08-09 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-1673:


Integrated in Thrift #515 (See [https://builds.apache.org/job/Thrift/515/])
Thrift-1673: Ruby compile flags for extension for multi arch builds (os x)
Client: ruby
Patch: Jake Farrell

Updating extension build to use ruby cflags which include the arch flags 
needed. (Revision 1371273)

 Result = FAILURE

> 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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira