You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Rajesh Malepati (JIRA)" <ji...@apache.org> on 2010/08/08 22:43:16 UTC

[jira] Updated: (THRIFT-664) Ruby extension fails to build with Ruby 1.9.1

     [ 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.