From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id CFAD11F4C0 for ; Wed, 23 Oct 2019 03:25:16 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 0E092120A5D; Wed, 23 Oct 2019 12:25:07 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 237A3120A5A for ; Wed, 23 Oct 2019 12:25:04 +0900 (JST) Received: by filter0047p3iad2.sendgrid.net with SMTP id filter0047p3iad2-17574-5DAFC814-3D 2019-10-23 03:25:08.430794327 +0000 UTC m=+29088.787265869 Received: from herokuapp.com (unknown [52.91.158.104]) by ismtpd0056p1iad2.sendgrid.net (SG) with ESMTP id CYQo0WnVShqpnJBBijWACw for ; Wed, 23 Oct 2019 03:25:08.617 +0000 (UTC) Date: Wed, 23 Oct 2019 03:25:08 +0000 (UTC) From: shyouhei@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 71080 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16271 X-Redmine-Issue-Author: jeremyevans0 X-Redmine-Issue-Assignee: nobu X-Redmine-Sender: shyouhei X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?jcfQDMoo=2FMGCmP3uu1SeyLQUxUPXq5PjHpHz3xSFn156ir8notyeSm3RWnIC=2Fa?= =?us-ascii?Q?IP89yKOpdGY6CtmUK21NhKv4GkTTVSCLUfPHzBz?= =?us-ascii?Q?ERzK+Wx3wq1RSwXAJMRCGlXDHq1rv7AMPXCpflP?= =?us-ascii?Q?Rwkit50hQnNVNLv6nhgnUPjtNce8E6J8AWMeRBV?= =?us-ascii?Q?yzPN96RF7ndT9je01VpkBvALHEL2qH0lt4w=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 95488 Subject: [ruby-core:95488] [Ruby master Bug#16271] Cannot build taglib-ruby gem on ruby-2.7.0-preview2 X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16271 has been updated by shyouhei (Shyouhei Urabe). Assignee changed from shyouhei (Shyouhei Urabe) to nobu (Nobuyoshi Nakada) jeremyevans0 (Jeremy Evans) wrote: > Attempting to build the taglib-ruby gem on ruby-2.7.0-preview2 fails with error messages such as: > > ``` > taglib_base_wrap.cxx:2101:9: error: no matching function for call to 'rb_rescue' > if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { > ^~~~~~~~~ > /usr/local/include/ruby-2.7/ruby/ruby.h:1989:7: note: candidate function not viable: no known conversion from 'VALUE (VALUE *)' (aka 'unsigned long (unsigned long *)') to 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') for 1st argument > VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE); > ``` > > I believe this is related to the CXX/ANYARGS changes made between ruby-2.7.0-preview1 and preview2. I was not aware these were expected to cause backwards compatibility issues, which is why I'm submitting the bug report here. > > I believe taglib-ruby uses code generated via SWIG. I'm not sure if SWIG needs to be adjusted, or if the issue is related to the use of SWIG. > > This may be a problem in the gem and not in our CXX handling. In that case, please let me know and I will post an issue in the gem's tracker. Well, it seems the function called `SWIG_ruby_failed` is prototyped as `VALUE SWIG_ruby_failed(void)` (source: https://github.com/swig/swig/blob/master/Lib/ruby/rubyprimtypes.swg). However the third argument of `rb_rescue()` is `VALUE (*)(VALUE, VALUE)` (source: ruby.h). So yes, the API change _revealed_ an arity mismatch here. `SWIG_ruby_failed` is getting more arguments than it expects, which is dangerous depending on machine ABI. It has to be fixed. I believe it's SWIG, not the gem, wihch has to handle this. ---------------------------------------- Bug #16271: Cannot build taglib-ruby gem on ruby-2.7.0-preview2 https://bugs.ruby-lang.org/issues/16271#change-82259 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Priority: Normal * Assignee: nobu (Nobuyoshi Nakada) * Target version: * ruby -v: ruby 2.7.0preview2 (2019-10-22 master 02aadf1032) [x86_64-openbsd] * Backport: 2.5: DONTNEED, 2.6: DONTNEED ---------------------------------------- Attempting to build the taglib-ruby gem on ruby-2.7.0-preview2 fails with error messages such as: ``` taglib_base_wrap.cxx:2101:9: error: no matching function for call to 'rb_rescue' if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { ^~~~~~~~~ /usr/local/include/ruby-2.7/ruby/ruby.h:1989:7: note: candidate function not viable: no known conversion from 'VALUE (VALUE *)' (aka 'unsigned long (unsigned long *)') to 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') for 1st argument VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE); ``` I believe this is related to the CXX/ANYARGS changes made between ruby-2.7.0-preview1 and preview2. I was not aware these were expected to cause backwards compatibility issues, which is why I'm submitting the bug report here. I believe taglib-ruby uses code generated via SWIG. I'm not sure if SWIG needs to be adjusted, or if the issue is related to the use of SWIG. This may be a problem in the gem and not in our CXX handling. In that case, please let me know and I will post an issue in the gem's tracker. -- https://bugs.ruby-lang.org/