NetBSD Problem Report #54612

From www@netbsd.org  Fri Oct 11 10:15:34 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EC2717A172
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 11 Oct 2019 10:15:33 +0000 (UTC)
Message-Id: <20191011101532.ECE2B7A23C@mollari.NetBSD.org>
Date: Fri, 11 Oct 2019 10:15:32 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: security/gpgme not compatible with newer Pythons?
X-Send-Pr-Version: www-1.0

>Number:         54612
>Category:       pkg
>Synopsis:       security/gpgme not compatible with newer Pythons?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 11 10:20:00 +0000 2019
>Closed-Date:    Mon Jul 19 04:51:06 +0000 2021
>Last-Modified:  Mon Jul 19 04:51:06 +0000 2021
>Originator:     Joern Clausen
>Release:        
>Organization:
Bielefeld University
>Environment:
>Description:
I'm trying to build security/gpgme (as dependency of mail/mutt), and it fails with

python3.4-gpg/gpgme_wrap.c: In function '_PySwigObject_type':
python3.4-gpg/gpgme_wrap.c:1749:3: error: 'cmpfunc' undeclared (first use in this function)
 1749 |  (cmpfunc)SwigPyObject_compare,     /* tp_compare */
      |   ^~~~~~~
python3.4-gpg/gpgme_wrap.c:1749:3: note: each undeclared identifier is reported only once for each function it appears in
python3.4-gpg/gpgme_wrap.c:1749:11: error: expected '}' before 'SwigPyObject_compare'
 1749 |  (cmpfunc)SwigPyObject_compare,     /* tp_compare */
      |           ^~~~~~~~~~~~~~~~~~~~

I have python37-3.7.4 installed, and looking at gpgme_wrap.c, I assume that PyTypeObject has changed and the code has not been adjusted.


Actually, the pkgsrc Makefile does not mention Python or Swig at all, or accepted or incompatible versions. So I guess the creation of Python bindings happens accidentally, depending on the presence of a usable Python. I think this dependency should be made mandatory for this package, or made an option: The configure script offers "--enable-languages=", which could be set.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/54612: security/gpgme not compatible with newer Pythons?
Date: Mon, 19 Jul 2021 04:37:48 +0000

 On Fri, Oct 11, 2019 at 10:20:00AM +0000, joern.clausen@uni-bielefeld.de wrote:
  > I'm trying to build security/gpgme (as dependency of mail/mutt), and it fails with
  > 
  > python3.4-gpg/gpgme_wrap.c: In function '_PySwigObject_type':
  > python3.4-gpg/gpgme_wrap.c:1749:3: error: 'cmpfunc' undeclared (first use in this function)
  >  1749 |  (cmpfunc)SwigPyObject_compare,     /* tp_compare */
  >       |   ^~~~~~~
  > python3.4-gpg/gpgme_wrap.c:1749:3: note: each undeclared identifier is reported only once for each function it appears in
  > python3.4-gpg/gpgme_wrap.c:1749:11: error: expected '}' before 'SwigPyObject_compare'
  >  1749 |  (cmpfunc)SwigPyObject_compare,     /* tp_compare */
  >       |           ^~~~~~~~~~~~~~~~~~~~
  > 
  > I have python37-3.7.4 installed, and looking at gpgme_wrap.c, I
  > assume that PyTypeObject has changed and the code has not been
  > adjusted.

 This failure is a result of using a too-old version of swig; swig 1.x
 doesn't support python3.

  > Actually, the pkgsrc Makefile does not mention Python or Swig at
  > all, or accepted or incompatible versions. So I guess the creation
  > of Python bindings happens accidentally, depending on the presence
  > of a usable Python. I think this dependency should be made
  > mandatory for this package, or made an option: The configure script
  > offers "--enable-languages=", which could be set.

 This part was fixed recently, so I guess the issue is resolved...

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 19 Jul 2021 04:51:06 +0000
State-Changed-Why:
fixed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.