You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Byron Clark (JIRA)" <ji...@apache.org> on 2009/12/29 00:42:29 UTC
[jira] Created: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Ruby extension fails to build with Ruby 1.9.1
---------------------------------------------
Key: THRIFT-664
URL: https://issues.apache.org/jira/browse/THRIFT-664
Project: Thrift
Issue Type: Bug
Components: Library (Ruby)
Affects Versions: 0.2
Environment: OS: archlinux
Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
Reporter: Byron Clark
The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Posted by "Rajesh Malepati (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896408#action_12896408 ]
Rajesh Malepati commented on THRIFT-664:
----------------------------------------
Looks like THRIFT-605 also reports the same issue.
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
> Fix For: 0.4
>
> Attachments: ruby19-build-fix.patch
>
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Posted by "Byron Clark (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794972#action_12794972 ]
Byron Clark commented on THRIFT-664:
------------------------------------
The changes I made to build with 1.9.1 defintely break the 1.8.x build.
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (THRIFT-664) Ruby extension fails to build with Ruby
1.9.1
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-664.
--------------------------------
Assignee: Rajesh Malepati
Resolution: Fixed
OK, great. I just committed this patch. Thanks Rajesh!
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
> Assignee: Rajesh Malepati
> Fix For: 0.4
>
> Attachments: ruby19-build-fix.patch
>
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794966#action_12794966 ]
Bryan Duxbury commented on THRIFT-664:
--------------------------------------
Does this break the 1.8 build?
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Posted by "Rajesh Malepati (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896603#action_12896603 ]
Rajesh Malepati commented on THRIFT-664:
----------------------------------------
The addition of (void) is to suppress another failure with -Werror on GCC 4.5 (Just letting the compiler know that we want to discard the return value and that it's not an error)
I also recommend adding -pedantic -std=c99 to the CFLAGS as struct.c uses variable sized arrays and most of the C files have C++ style comments.
The rest is just <> --> "" conversion on non-standard header inclusion.
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
> Fix For: 0.4
>
> Attachments: ruby19-build-fix.patch
>
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-664:
---------------------------------
Fix Version/s: 0.4
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
> Fix For: 0.4
>
> Attachments: ruby19-build-fix.patch
>
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896590#action_12896590 ]
Bryan Duxbury commented on THRIFT-664:
--------------------------------------
What does this change do?
{code}
Index: compact_protocol.c
===================================================================
--- compact_protocol.c (revision 983480)
+++ compact_protocol.c (working copy)
@@ -20,8 +20,8 @@
#include <ruby.h>
#include <stdbool.h>
#include <stdint.h>
-#include <constants.h>
-#include <struct.h>
+#include "constants.h"
+#include "struct.h"
#include "macros.h"
#define LAST_ID(obj) FIX2INT(rb_ary_pop(rb_ivar_get(obj, last_field_id)))
@@ -458,7 +458,7 @@
if (modifier == 0) {
// not a delta. look ahead for the zigzag varint field id.
- LAST_ID(self);
+ (void) LAST_ID(self);
field_id = read_i16(self);
} else {
// has a delta. add the delta to the last read field id.
{code}
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
> Fix For: 0.4
>
> Attachments: ruby19-build-fix.patch
>
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-664) Ruby extension fails to build with
Ruby 1.9.1
Posted by "Rajesh Malepati (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajesh Malepati updated THRIFT-664:
-----------------------------------
Attachment: ruby19-build-fix.patch
Attaching patch against trunk. Ruby extension builds fine for me against 1.8.6/7 and 1.9.1/2 with this patch.
> Ruby extension fails to build with Ruby 1.9.1
> ---------------------------------------------
>
> Key: THRIFT-664
> URL: https://issues.apache.org/jira/browse/THRIFT-664
> Project: Thrift
> Issue Type: Bug
> Components: Library (Ruby)
> Affects Versions: 0.2
> Environment: OS: archlinux
> Ruby: ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> Reporter: Byron Clark
> Attachments: ruby19-build-fix.patch
>
>
> The have_func('strlcpy', 'string.h') call in lib/rb/ext/extconf.rb is broken in Ruby 1.9.1. The check always succeeds because Ruby now includes strlcpy in /usr/include/ruby-1.9.1/ruby/missing.h as long as HAVE_STRLCPY is undefined and the Ruby headers are always included by have_func. The call in extconf.rb finds the function and sets the HAVE_STRLCPY macro for the Makefile. /lib/rb/ext/struct.c then fails to build because neither the included strlcpy or the strlcpy provided by Ruby are used when HAVE_STRLCPY is set.
> Removing the have_func line from lib/rb/ext/extconf.rb and the definition of strlcpy in lib/rb/ext/struct.c fixes the build.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.